QObject importer into scripting. More...
#include <qsimporter.h>
Public Slots | |
| QObject * | getQSObj () |
Public Member Functions | |
| virtual | ~QSImporter () |
| void | addQSObj (QObject *obj, const QString &name) |
| QSCObject * | createQSObject (boost::shared_ptr< PdfOperator > op) |
| QSCObject * | createQSObject (boost::shared_ptr< IProperty > ip) |
| QSCObject * | createQSObject (boost::shared_ptr< CDict > dict) |
| QSCObject * | createQSObject (boost::shared_ptr< CPage > page) |
| QSCObject * | createQSObject (TreeItemAbstract *item) |
| QSPdf * | createQSObject (boost::shared_ptr< CPdf > pdf) |
| QSImporter (QSProject *_qp, QObject *_context, BaseCore *_base) | |
Static Public Member Functions | |
| static QSCObject * | createQSObject (boost::shared_ptr< IProperty > ip, BaseCore *_base) |
| static QSCObject * | createQSObject (TreeItemAbstract *item, BaseCore *_base) |
Private Attributes | |
| QObject * | qobj |
| QObject * | context |
| QSInterpreter * | qs |
| QSProject * | qp |
| BaseCore * | base |
QObject importer into scripting.
QSImporter -> import QObjects from application without re-evaluating project
Adding objects via addObject have disadvantage of clearing interpreter state (thus removing all functions loaded from initscript) Adding via addTransientObject disallow removing the object later. Can import any QObject into scripting layer under specified name and also can create QSCObjects from some common types (dict, page ..)
| gui::QSImporter::~QSImporter | ( | ) | [virtual] |
destructor
| gui::QSImporter::QSImporter | ( | QSProject * | _qp, | |
| QObject * | _context, | |||
| BaseCore * | _base | |||
| ) |
Construct importer object for current QSProject to given context. Must be contructed before any scripts are evaluated
| _qp | QSProject in which this importer is installed | |
| _context | Context in which all objects will be imported | |
| _base | scripting base under which all objects will be created |
| void gui::QSImporter::addQSObj | ( | QObject * | obj, | |
| const QString & | name | |||
| ) |
Import object into interpreter under specified name
| obj | Object to import | |
| name | Name of object in scripting |
Overloaded factory function to create QSCObjects from various C... classes Returns QSCObject that can be added directly with addQSObj()
| CPdf to wrap into to QSPdf |
| QSCObject * gui::QSImporter::createQSObject | ( | TreeItemAbstract * | item | ) |
Overloaded factory function to create QSCObjects from various C... classes Returns QSCObject that can be added directly with addQSObj()
| item | TreeItemAbstract to wrap into to QSTreeItem |
Overloaded factory function to create QSCObjects from various C... classes Returns QSCObject that can be added directly with addQSObj()
| page | CPage (shared_ptr) to wrap into to QSPage |
References base.
Overloaded factory function to create QSCObjects from various C... classes Returns QSCObject that can be added directly with addQSObj()
| dict | CDict to wrap into to QSDict |
References base.
Overloaded factory function to create QSCObjects from various C... classes Returns QSCObject that can be added directly with addQSObj()
| ip | IProperty to wrap into to QSIProperty |
References base, and createQSObject().
| QSCObject * gui::QSImporter::createQSObject | ( | boost::shared_ptr< PdfOperator > | op | ) |
Overloaded factory function to create QSCObjects from various classes Returns QSCObject that can be added directly with addQSObj()
| op | PdfOperator to wrap into to QSPdfOperator |
References base.
| QSCObject * gui::QSImporter::createQSObject | ( | TreeItemAbstract * | item, | |
| BaseCore * | _base | |||
| ) | [static] |
Static version of factory function to create QSCObjects from various C... classes Returns QSCObject that can be added directly with addQSObj()
| item | TreeItemAbstract to wrap into to QSTreeItem | |
| _base | Scripting base |
| QSCObject * gui::QSImporter::createQSObject | ( | boost::shared_ptr< IProperty > | ip, | |
| BaseCore * | _base | |||
| ) | [static] |
Static version of factory function to create QSCObjects from various C... classes Returns QSCObject that can be added directly with addQSObj()
| ip | IProperty to wrap into to QSIProperty | |
| _base | Scripting base |
Referenced by gui::QSTreeItem::child(), gui::QSDict::child(), gui::QSArray::child(), createQSObject(), gui::QSTreeItem::parent(), gui::QSStream::property(), gui::QSIPropertyArray::property(), gui::QSDict::property(), gui::QSArray::property(), and gui::QSIProperty::ref().
| QObject * gui::QSImporter::getQSObj | ( | ) | [slot] |
Internal importing function. Do not use outside this class.
BaseCore* gui::QSImporter::base [private] |
Scripting base for created objects
Referenced by createQSObject().
QObject* gui::QSImporter::context [private] |
context in which objects will be imported
QObject* gui::QSImporter::qobj [private] |
Current QObject to import
QSProject* gui::QSImporter::qp [private] |
QSProject in which this importer is installed.
QSInterpreter* gui::QSImporter::qs [private] |
Interpreter from QProject qp. All objects will be imported in it.