@@ -387,34 +387,237 @@ PYBIND11_EMBEDDED_MODULE(openflipper, m) {
core.def("viewerSnapshot",static_cast<void(Core::*)()>(&Core::viewerSnapshot),QCoreApplication::translate("PythonDocCore","Take a snapshot from all viewers").toLatin1().data());
// /// Scriptable snapshot method offering full control
core.def("writeVersionNumbers",&Core::writeVersionNumbers,QCoreApplication::translate("PythonDocCore","Write the current versions of all plugins to ini file").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","Full path to a file where the versions should be written to.").toLatin1().data()));
// /// return the list of available object that has the given selection and type
core.def("blockSceneGraphUpdates",&Core::blockSceneGraphUpdates,QCoreApplication::translate("PythonDocCore","Block the scenegraph updates for improved performance").toLatin1().data());
core.def("unblockSceneGraphUpdates",&Core::unblockSceneGraphUpdates,QCoreApplication::translate("PythonDocCore","Unblock the scenegraph updates").toLatin1().data());
core.def("setView",&Core::setView,QCoreApplication::translate("PythonDocCore","Set the encoded view for the primary viewport.").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","The encoded view. (You can obtain one through \"Copy View\" in the context menu of the coordinates.)").toLatin1().data()));
core.def("setViewAndWindowGeometry",&Core::setViewAndWindowGeometry,QCoreApplication::translate("PythonDocCore","Set the encoded view for the primary viewport and the full geometry of the application").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","The encoded view. (You can obtain one through \"Copy View\" in the context menu of the coordinates.)").toLatin1().data()));
// /** \brief Scripting function to set toolboxes in a view mode
// *
// * @param _modeName Name of the View Mode
// * @param _toolboxList ; separated list of toolboxes in the view mode
// /// Save the current options to the standard ini file
// void saveOptions();
core.def("saveOptions",&Core::saveOptions,QCoreApplication::translate("PythonDocCore","Save the current options to the standard ini file").toLatin1().data());
core.def("applyOptions",&Core::applyOptions,QCoreApplication::translate("PythonDocCore","After ini-files have been loaded and core is up or if options have been changed -> apply Options").toLatin1().data());
// /** \brief Load information from an ini file
// *
// * This function will open an ini file and load the information in it.
// *
// * @param _filename Name of the ini file
// * @param _coreSettings Load core settings from the file
// * @param _perPluginSettings Load per plugin settings from the file
// * @param _loadObjects Load objects defined in the ini file
// *
// */
// void openIniFile( QString _filename,
// bool _coreSettings ,
// bool _perPluginSettings,
// bool _loadObjects );
//
// /** \brief Create an script object from a ui file
// *
// * This function will load an ui file, set up a qwidget from that and makes it available
// * under _objectName for scripting.
// * @param _objectName The name in scripting environment used for the new object
core.def("setViewMode",&Core::setViewMode,QCoreApplication::translate("PythonDocCore","Switch to the given viewmode").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","Name of the viewmode to enable").toLatin1().data()));
core.def("getCurrentViewMode",&Core::getCurrentViewMode,QCoreApplication::translate("PythonDocCore","Get the name of the current viewMode").toLatin1().data());
core.def("setViewModeIcon",&Core::setViewModeIcon,QCoreApplication::translate("PythonDocCore","Set an icon for a view Mode").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","Name of the mode for the icon").toLatin1().data()),
py::arg(QCoreApplication::translate("PythonDocCore","Filename of the icon").toLatin1().data()));
core.def("moveToolBoxToTop",&Core::moveToolBoxToTop,QCoreApplication::translate("PythonDocCore","Move selected toolbox to the top of side area").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","Name of the Toolbox to be moved").toLatin1().data()));
core.def("moveToolBoxToBottom",&Core::moveToolBoxToBottom,QCoreApplication::translate("PythonDocCore","Move selected toolbox to the bottom of side area").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","Name of the Toolbox to be moved").toLatin1().data()));
core.def("showReducedMenuBar",&Core::showReducedMenuBar,QCoreApplication::translate("PythonDocCore","Show only a reduced menubar").toLatin1().data(),
core.def("executePythonScriptFile",&Core::executePythonScriptFile,QCoreApplication::translate("PythonDocCore","Open the given file and execute its contents as a python script").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","Filename of the script").toLatin1().data()));
core.def("executePythonScript",&Core::executePythonScript,QCoreApplication::translate("PythonDocCore","Execute a text as a python script").toLatin1().data(),
py::arg(QCoreApplication::translate("PythonDocCore","The text of the script").toLatin1().data()));
core.def("exitApplication",&Core::exitApplication,QCoreApplication::translate("PythonDocCore","Exit the application").toLatin1().data());
core.def("exitFailure",&Core::exitFailure,QCoreApplication::translate("PythonDocCore","Use this function in unit tests, if you detected a failure. Therefore the test functions will recognize that something went wrong.").toLatin1().data());
core.def("finishSplash",&Core::finishSplash,QCoreApplication::translate("PythonDocCore","Hide the splash screen").toLatin1().data());
// emit setSlotDescription("deleteObject(int)", tr("Delete an object from the scene."), QStringList("ObjectId"), QStringList(tr("Id of the object to delete")));
...
...
@@ -422,18 +625,8 @@ PYBIND11_EMBEDDED_MODULE(openflipper, m) {
//
// emit slotSetSlotDescriptionGlobalFunction("printToFile(QString,QString)", tr("Print a message to a file"), QStringList(QString("Filename;Values").split(";")), QStringList(QString("Filename to print into;Arbitrary number of arguments").split(";")));
// emit slotSetSlotDescriptionGlobalFunction("help(QString)", tr("Print help about something"), QStringList("Help Entry"), QStringList("help about what?"));
// emit setSlotDescription("resizeViewer(int,int)", tr("Resize the viewer"),
// QString(tr("width,height")).split(","),
// QString(tr("new width for the viewer,new height for the viewer")).split(","));
// emit setSlotDescription("writeVersionNumbers(QString)", tr("write the current versions of all plugins to INI file"),
// QStringList(tr("filename")),
// QStringList(tr("fullpath to a file where the versions should be written to.")));
// //save slots
// emit setSlotDescription("saveObject(int,QString)", tr("Save object to file. If the file exists it will be overwritten."),
// QString(tr("object-id,filename")).split(","),
...
...
@@ -506,8 +699,8 @@ PYBIND11_EMBEDDED_MODULE(openflipper, m) {
// tr("The plugin which the requested toolbox belongs to.\rThe name of the requested toolbox.").split("\r"));
//
// emit setSlotDescription("unblockSceneGraphUpdates()", tr("Enable Scenegraph Updates (e.g. before loading or adding a large number of files)"),QStringList(), QStringList());
// emit setSlotDescription("setView", tr("Set the encoded view for the primary viewport."), QStringList(tr("view")), QStringList(tr("The encoded view. (You can obtain one through \"Copy View\" in the context menu of the coordinates.)")));