Commit 5685414c authored by Jan Möbius's avatar Jan Möbius

Renamed idList to IdList

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7874 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 83afb915
......@@ -103,19 +103,19 @@ void callFunction( QString _plugin, QString _functionName, T0 _t0) {
std::vector< QScriptValue > parameters;
// QVariant bla = qVariantFromValue(_t0);
//
// idList list = qVariantValue<idList>( bla ) ;
// IdList list = qVariantValue<IdList>( bla ) ;
// std::cerr << "iDList size:" << list.size() << std::endl;;
// std::cerr << list[0] << std::endl;
// std::cerr << list[1] << std::endl;
// std::cerr << "Type id is : " << QMetaType::type("idList") << std::endl;
// std::cerr << "Type id is : " << QMetaType::type("IdList") << std::endl;
// engine->globalObject().setProperty("ParameterData22",engine->toScriptValue(list));
/*
QVariant blubb = engine->globalObject().property("ParameterData22").toVariant();
idList list1 = qVariantValue<idList>( blubb ) ;
IdList list1 = qVariantValue<IdList>( blubb ) ;
std::cerr << "iDList1 size:" << list1.size() << std::endl;;
std::cerr << list1[0] << std::endl;
std::cerr << list1[1] << std::endl;
std::cerr << "Type id is : " << QMetaType::type("idList") << std::endl;*/
std::cerr << "Type id is : " << QMetaType::type("IdList") << std::endl;*/
parameters.push_back( engine->toScriptValue(_t0) );
......
......@@ -432,8 +432,8 @@ Core::init() {
// scriptEngine_.globalObject().setProperty("ObjectId", ctor);
// Register idList Type to scripting Engine
qScriptRegisterSequenceMetaType< idList >(&scriptEngine_);
// Register IdList Type to scripting Engine
qScriptRegisterSequenceMetaType< IdList >(&scriptEngine_);
qScriptRegisterSequenceMetaType< QVector< int > >(&scriptEngine_);
......
......@@ -44,7 +44,7 @@
//=============================================================================
//
// Wrapper for idList ( std::vector< int > ) - IMPLEMENTATION
// Wrapper for IdList ( std::vector< int > ) - IMPLEMENTATION
//
//=============================================================================
......@@ -55,7 +55,7 @@
//== IMPLEMENTATION ==========================================================
QScriptValue toScriptValueIdList(QScriptEngine *engine, const idList &s)
QScriptValue toScriptValueIdList(QScriptEngine *engine, const IdList &s)
{
QScriptValue obj = engine->newObject();
obj.setProperty("size", QScriptValue(engine, (int)s.size() ));
......@@ -65,7 +65,7 @@ QScriptValue toScriptValueIdList(QScriptEngine *engine, const idList &s)
return obj;
}
void fromScriptValueIdList(const QScriptValue &obj, idList &s)
void fromScriptValueIdList(const QScriptValue &obj, IdList &s)
{
int size = obj.property("size").toNumber();
......@@ -75,7 +75,7 @@ void fromScriptValueIdList(const QScriptValue &obj, idList &s)
QScriptValue createIdList(QScriptContext *context, QScriptEngine *engine)
{
idList s;
IdList s;
QScriptValue callee = context->callee();
......
......@@ -49,17 +49,17 @@
#include <QtScript/QtScript>
//===========================================================================
/** @name Script Wrappers for idList Type ( standard vector of ints )
/** @name Script Wrappers for IdList Type ( standard vector of ints )
* @{ */
//===========================================================================
/// Convert idList to scriptvalue
QScriptValue toScriptValueIdList(QScriptEngine *engine, const idList &s);
/// Convert IdList to scriptvalue
QScriptValue toScriptValueIdList(QScriptEngine *engine, const IdList &s);
/// Convert scriptvalue to idList
void fromScriptValueIdList(const QScriptValue &obj, idList &s);
/// Convert scriptvalue to IdList
void fromScriptValueIdList(const QScriptValue &obj, IdList &s);
/// Create an empty idList in Scripting environment
/// Create an empty IdList in Scripting environment
QScriptValue createIdList(QScriptContext *, QScriptEngine *engine);
QScriptValue idListToString(QScriptContext *context, QScriptEngine *engine);
......
......@@ -102,11 +102,11 @@ typedef unsigned int DataType;
/// Standard Type for 3d Vector used for scripting
typedef ACG::Vec3d Vector;
/// Standard Type for id Lists used for scripting
typedef std::vector< int > idList;
typedef std::vector< int > IdList;
/// Standard Type for a 4x4 Matrix used for scripting
typedef ACG::Matrix4x4d Matrix4x4;
Q_DECLARE_METATYPE(idList);
Q_DECLARE_METATYPE(IdList);
Q_DECLARE_METATYPE(QVector< int >);
Q_DECLARE_METATYPE(Vector);
Q_DECLARE_METATYPE(Matrix4x4);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment