Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
b8906443
Commit
b8906443
authored
May 24, 2018
by
Jan Möbius
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://www.graphics.rwth-aachen.de:9000/OpenFlipper-Free/OpenFlipper
parents
cd161990
5875bf0c
Changes
138
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
1004 additions
and
413 deletions
+1004
-413
BasePlugin/AboutInfoInterface.hh
BasePlugin/AboutInfoInterface.hh
+0
-4
BasePlugin/BackupInterface.hh
BasePlugin/BackupInterface.hh
+0
-4
BasePlugin/ContextMenuInterface.hh
BasePlugin/ContextMenuInterface.hh
+0
-4
BasePlugin/INIInterface.hh
BasePlugin/INIInterface.hh
+0
-4
BasePlugin/KeyInterface.hh
BasePlugin/KeyInterface.hh
+0
-4
BasePlugin/MenuInterface.hh
BasePlugin/MenuInterface.hh
+0
-4
BasePlugin/MetadataInterface.hh
BasePlugin/MetadataInterface.hh
+0
-8
BasePlugin/MouseInterface.hh
BasePlugin/MouseInterface.hh
+0
-4
BasePlugin/OptionsInterface.hh
BasePlugin/OptionsInterface.hh
+0
-4
BasePlugin/PickingInterface.hh
BasePlugin/PickingInterface.hh
+0
-4
BasePlugin/PluginFunctionsCore.hh
BasePlugin/PluginFunctionsCore.hh
+1
-7
BasePlugin/ProcessInterface.hh
BasePlugin/ProcessInterface.hh
+0
-4
BasePlugin/RPCWrappers.cc
BasePlugin/RPCWrappers.cc
+4
-4
BasePlugin/SecurityInterface.hh
BasePlugin/SecurityInterface.hh
+0
-4
BasePlugin/SelectionInterface.hh
BasePlugin/SelectionInterface.hh
+0
-4
BasePlugin/StatusbarInterface.hh
BasePlugin/StatusbarInterface.hh
+0
-4
BasePlugin/TextureInterface.hh
BasePlugin/TextureInterface.hh
+0
-4
BasePlugin/ToolbarInterface.hh
BasePlugin/ToolbarInterface.hh
+0
-4
BasePlugin/ToolboxInterface.hh
BasePlugin/ToolboxInterface.hh
+0
-4
BasePlugin/ViewInterface.hh
BasePlugin/ViewInterface.hh
+0
-4
BasePlugin/ViewModeInterface.hh
BasePlugin/ViewModeInterface.hh
+0
-4
Core/Core.cc
Core/Core.cc
+21
-18
Core/Core.hh
Core/Core.hh
+5
-6
Core/PluginCommunication.cc
Core/PluginCommunication.cc
+2
-4
Core/PluginInfo.hh
Core/PluginInfo.hh
+10
-0
Core/PluginLoader.cc
Core/PluginLoader.cc
+211
-91
Core/RPC.cc
Core/RPC.cc
+8
-8
Core/saveSettings.cc
Core/saveSettings.cc
+3
-0
Core/scripting.cc
Core/scripting.cc
+10
-10
CoreApp/CMakeLists.txt
CoreApp/CMakeLists.txt
+11
-1
Documentation/DeveloperHelpSources/changelog.docu
Documentation/DeveloperHelpSources/changelog.docu
+1
-0
Documentation/DeveloperHelpSources/options.docu
Documentation/DeveloperHelpSources/options.docu
+7
-0
LicenseManager/keyGen/keygen.cc
LicenseManager/keyGen/keygen.cc
+1
-5
LicenseManager/keyGen/keygenWidget.cc
LicenseManager/keyGen/keygenWidget.cc
+1
-6
OpenFlipper.cc
OpenFlipper.cc
+204
-33
PluginLib/CMakeLists.txt
PluginLib/CMakeLists.txt
+1
-0
Shaders/Picking/passColors_fs.glsl
Shaders/Picking/passColors_fs.glsl
+5
-0
Shaders/Picking/pick_face.glsl
Shaders/Picking/pick_face.glsl
+2
-6
Shaders/Picking/pick_vertices_fs.glsl
Shaders/Picking/pick_vertices_fs.glsl
+1
-4
Shaders/Picking/pick_vertices_fs2.glsl
Shaders/Picking/pick_vertices_fs2.glsl
+1
-5
Shaders/Picking/pick_vertices_vs.glsl
Shaders/Picking/pick_vertices_vs.glsl
+0
-4
Shaders/Picking/single_color_fs.glsl
Shaders/Picking/single_color_fs.glsl
+1
-5
Shaders/Picking/vertex.glsl
Shaders/Picking/vertex.glsl
+0
-4
Shaders/Picking/vertexPassColors.glsl
Shaders/Picking/vertexPassColors.glsl
+7
-0
Shaders/ShaderGen/SG_LIGHTING.GLSL
Shaders/ShaderGen/SG_LIGHTING.GLSL
+29
-7
StackWalker/StackWalker.cc
StackWalker/StackWalker.cc
+60
-25
StackWalker/StackWalker.hh
StackWalker/StackWalker.hh
+7
-7
cmake/CMakeLists.txt
cmake/CMakeLists.txt
+3
-3
cmake/FindASSIMP.cmake
cmake/FindASSIMP.cmake
+11
-4
cmake/FindBLAS.cmake
cmake/FindBLAS.cmake
+4
-0
cmake/FindCBC.cmake
cmake/FindCBC.cmake
+4
-0
cmake/FindCGL.cmake
cmake/FindCGL.cmake
+4
-0
cmake/FindCLP.cmake
cmake/FindCLP.cmake
+4
-0
cmake/FindCOINUTILS.cmake
cmake/FindCOINUTILS.cmake
+4
-0
cmake/FindEIGEN3.cmake
cmake/FindEIGEN3.cmake
+12
-7
cmake/FindGLUT.cmake
cmake/FindGLUT.cmake
+16
-2
cmake/FindLAPACK.cmake
cmake/FindLAPACK.cmake
+4
-0
cmake/FindMETIS.cmake
cmake/FindMETIS.cmake
+4
-0
cmake/FindMUMPS.cmake
cmake/FindMUMPS.cmake
+4
-0
cmake/FindOSI.cmake
cmake/FindOSI.cmake
+4
-0
cmake/FindOpenVolumeMesh.cmake
cmake/FindOpenVolumeMesh.cmake
+0
-1
cmake/FindQwt6.cmake
cmake/FindQwt6.cmake
+18
-7
cmake/FindSPECTRA.cmake
cmake/FindSPECTRA.cmake
+5
-1
cmake/plugin.cmake
cmake/plugin.cmake
+1
-1
cmake/type.cmake
cmake/type.cmake
+1
-0
common/BaseObject.hh
common/BaseObject.hh
+0
-9
common/FileTypes.cc
common/FileTypes.cc
+2
-4
common/FileTypes.hh
common/FileTypes.hh
+3
-6
common/GlobalOptions.cc
common/GlobalOptions.cc
+86
-13
common/GlobalOptions.hh
common/GlobalOptions.hh
+15
-3
common/OFGLWidget.hh
common/OFGLWidget.hh
+0
-10
common/PluginStorage.cc
common/PluginStorage.cc
+90
-0
common/PluginStorage.hh
common/PluginStorage.hh
+87
-0
common/glew_wrappers.cc
common/glew_wrappers.cc
+3
-0
libs_required/ACG/CMakeLists.txt
libs_required/ACG/CMakeLists.txt
+1
-2
No files found.
BasePlugin/AboutInfoInterface.hh
View file @
b8906443
...
...
@@ -51,11 +51,7 @@
#pragma once
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
/** \file AboutInfoInterface.hh
...
...
BasePlugin/BackupInterface.hh
View file @
b8906443
...
...
@@ -53,11 +53,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
/** \file BackupInterface.hh
*
...
...
BasePlugin/ContextMenuInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#define CONTEXTMENUINTERFACE_HH
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
...
...
BasePlugin/INIInterface.hh
View file @
b8906443
...
...
@@ -53,11 +53,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
...
...
BasePlugin/KeyInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#define KEYINTERFACE_HH
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
...
...
BasePlugin/MenuInterface.hh
View file @
b8906443
...
...
@@ -51,11 +51,7 @@
#define MENUBARINTERFACE_HH
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
...
...
BasePlugin/MetadataInterface.hh
View file @
b8906443
...
...
@@ -55,9 +55,7 @@
#include <QObject>
#include <QString>
#if QT_VERSION >= 0x050000
#include <QJsonDocument>
#endif
...
...
@@ -110,14 +108,12 @@ class MetadataInterface {
virtual
void
slotObjectMetadataDeserialized
(
QString
object_name
,
QString
value
)
{};
#if QT_VERSION >= 0x050000
/**
* Triggered for every piece of object specific meta data encapsulated
* in "Mesh Comments" if it is valid JSON.
*/
virtual
void
slotObjectMetadataDeserializedJson
(
QString
object_name
,
QJsonDocument
value
)
{};
#endif
signals:
/**
...
...
@@ -154,10 +150,6 @@ to find out which specific signal suits your needs.
*/
#if QT_VERSION >= 0x050000
Q_DECLARE_INTERFACE
(
MetadataInterface
,
"OpenFlipper.MetadataInterface_qt5/1.0"
)
#else
Q_DECLARE_INTERFACE
(
MetadataInterface
,
"OpenFlipper.MetadataInterface_qt4/1.0"
)
#endif
#endif // METADATAINTERFACE_HH
BasePlugin/MouseInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#define MOUSEINTERFACE_HH
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
/** \file MouseInterface.hh
...
...
BasePlugin/OptionsInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#define OPTIONSINTERFACE_HH
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
/** \file OptionsInterface.hh
...
...
BasePlugin/PickingInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
...
...
BasePlugin/PluginFunctionsCore.hh
View file @
b8906443
...
...
@@ -68,13 +68,7 @@
#ifndef OPENFLIPPERCORE
#ifndef OPENFLIPPERPLUGINLIB
#ifdef WIN32
#pragma message("PluginFunctionsCore is only allowed to be used from within OpenFlippers Core application!")
#else
#warning PluginFunctionsCore is only allowed to be used from within OpenFlippers Core application!
#error Bla
#endif
#error PluginFunctionsCore is only allowed to be used from within OpenFlippers Core application!
#endif
#endif
...
...
BasePlugin/ProcessInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#include <OpenFlipper/threads/OpenFlipperThread.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
/** \file ProcessInterface.hh
...
...
BasePlugin/RPCWrappers.cc
View file @
b8906443
...
...
@@ -64,10 +64,10 @@ QScriptValue callFunction( QString _plugin, QString _functionName , std::vector<
RPCHelper
h
;
Qt
::
ConnectionType
connection
=
Qt
::
DirectConnection
;
if
(
h
.
thread
()
!=
Q
Thread
::
currentT
hread
())
if
(
h
.
thread
()
!=
Q
Application
::
instance
()
->
t
hread
())
{
h
.
moveToThread
(
QApplication
::
instance
()
->
thread
());
connection
=
Qt
::
QueuedConnection
;
connection
=
Qt
::
Blocking
QueuedConnection
;
}
QScriptValue
retVal
;
...
...
@@ -90,10 +90,10 @@ QScriptValue callFunction( QString _plugin, QString _functionName ) {
RPCHelper
h
;
Qt
::
ConnectionType
connection
=
Qt
::
DirectConnection
;
if
(
h
.
thread
()
!=
Q
Thread
::
currentT
hread
())
if
(
h
.
thread
()
!=
Q
Application
::
instance
()
->
t
hread
())
{
h
.
moveToThread
(
QApplication
::
instance
()
->
thread
());
connection
=
Qt
::
QueuedConnection
;
connection
=
Qt
::
Blocking
QueuedConnection
;
}
QScriptValue
retVal
;
...
...
BasePlugin/SecurityInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
/** \file SecurityInterface.hh
...
...
BasePlugin/SelectionInterface.hh
View file @
b8906443
...
...
@@ -55,11 +55,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
/** \file SelectionInterface.hh
...
...
BasePlugin/StatusbarInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QStatusBar>
...
...
BasePlugin/TextureInterface.hh
View file @
b8906443
...
...
@@ -53,11 +53,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
...
...
BasePlugin/ToolbarInterface.hh
View file @
b8906443
...
...
@@ -52,11 +52,7 @@
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
#include <QStringList>
...
...
BasePlugin/ToolboxInterface.hh
View file @
b8906443
...
...
@@ -51,11 +51,7 @@
#define TOOLBOXINTERFACE_HH
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
#include <QStringList>
...
...
BasePlugin/ViewInterface.hh
View file @
b8906443
...
...
@@ -51,11 +51,7 @@
#define VIEWINTERFACE_HH
#include <OpenFlipper/common/Types.hh>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
...
...
BasePlugin/ViewModeInterface.hh
View file @
b8906443
...
...
@@ -51,11 +51,7 @@
#define VIEWMODEINTERFACE_HH
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QtGui>
#endif
#include <QMenuBar>
#include <QStringList>
...
...
Core/Core.cc
View file @
b8906443
...
...
@@ -67,11 +67,6 @@
#include <ACG/QtWidgets/QtFileDialog.hh>
// -------------------- Qt
#if QT_VERSION >= 0x050000
#else
#undef QT_NO_OPENGL
#include <QGLFormat>
#endif
#include "OpenFlipper/BasePlugin/KeyInterface.hh"
#include "OpenFlipper/BasePlugin/MouseInterface.hh"
...
...
@@ -93,6 +88,8 @@
#include <OpenFlipper/widgets/messageBox/StaysOnTopMessageBox.hh>
#include <OpenFlipper/common/PluginStorage.hh>
#define WIDGET_HEIGHT 800
#define WIDGET_WIDTH 800
...
...
@@ -241,7 +238,7 @@ Core::init() {
Qt
::
AlignBottom
|
Qt
::
AlignLeft
,
Qt
::
white
);
}
coreWidget_
=
new
CoreWidget
(
viewModes_
,
plugins_
,
coreSlots_
);
coreWidget_
=
new
CoreWidget
(
viewModes_
,
coreSlots_
);
spinBoxEventFilter_
.
registerScrollArea
(
coreWidget_
->
getToolboxScrollArea
());
spinBoxEventFilter_
.
registerScrollArea
(
coreWidget_
->
getToolboxArea
());
...
...
@@ -723,6 +720,12 @@ Core::~Core()
//-----------------------------------------------------------------------------
std
::
vector
<
PluginInfo
>&
Core
::
plugins
()
{
return
PluginStorage
::
plugins
();
};
//-----------------------------------------------------------------------------
void
Core
::
slotMouseEventIdentify
(
QMouseEvent
*
_event
)
{
...
...
@@ -1174,8 +1177,8 @@ void Core::slotExit() {
clearAll
();
// Notify plugins of imminent exit.
for
(
uint
i
=
0
;
i
<
plugins
_
.
size
()
;
++
i
){
BaseInterface
*
basePlugin
=
qobject_cast
<
BaseInterface
*
>
(
plugins
_
[
i
].
plugin
);
for
(
uint
i
=
0
;
i
<
plugins
()
.
size
()
;
++
i
){
BaseInterface
*
basePlugin
=
qobject_cast
<
BaseInterface
*
>
(
plugins
()
[
i
].
plugin
);
// Dont call exit if we cannot get the Plugin
if
(
basePlugin
)
...
...
@@ -1183,7 +1186,7 @@ void Core::slotExit() {
}
// Delete Plugins to actually call their destructor
for
(
PluginInfo
p
:
plugins
_
)
for
(
PluginInfo
p
:
plugins
()
)
delete
p
.
plugin
;
// close the log file to ensure everything is writeen correctly
...
...
@@ -1305,9 +1308,9 @@ void Core::slotSetSlotDescription(QString _slotName, QString _slotDescrip
//find plugin
PluginInfo
*
pluginInfo
=
0
;
for
(
uint
i
=
0
;
i
<
plugins
_
.
size
();
i
++
)
if
(
plugins
_
[
i
].
plugin
==
sender
())
pluginInfo
=
&
plugins
_
[
i
];
for
(
uint
i
=
0
;
i
<
plugins
()
.
size
();
i
++
)
if
(
plugins
()
[
i
].
plugin
==
sender
())
pluginInfo
=
&
plugins
()
[
i
];
if
(
pluginInfo
==
0
){
emit
log
(
LOGERR
,
tr
(
"Unable to set slot-description. Plugin not found!"
));
...
...
@@ -1383,9 +1386,9 @@ void Core::slotGetDescription(QString _function, QString& _fnDescript
//find plugin
PluginInfo
*
pluginInfo
=
0
;
for
(
uint
i
=
0
;
i
<
plugins
_
.
size
();
i
++
)
if
(
plugins
_
[
i
].
rpcName
==
pluginName
)
pluginInfo
=
&
plugins
_
[
i
];
for
(
uint
i
=
0
;
i
<
plugins
()
.
size
();
i
++
)
if
(
plugins
()
[
i
].
rpcName
==
pluginName
)
pluginInfo
=
&
plugins
()
[
i
];
if
(
pluginInfo
==
0
){
emit
log
(
LOGERR
,
tr
(
"Unable to get slot-description. Plugin not found!"
));
...
...
@@ -1529,12 +1532,12 @@ void Core::writeVersionNumbers(QString _filename){
ini
.
add_entry
(
"Core"
,
"VersionLinux"
,
OpenFlipper
::
Options
::
coreVersion
()
);
//add pluginVersions
for
(
uint
i
=
0
;
i
<
plugins
_
.
size
();
i
++
){
for
(
uint
i
=
0
;
i
<
plugins
()
.
size
();
i
++
){
if
(
OpenFlipper
::
Options
::
isWindows
()
)
ini
.
add_entry
(
plugins
_
[
i
].
name
,
"VersionWindows"
,
plugins
_
[
i
].
version
);
ini
.
add_entry
(
plugins
()
[
i
].
name
,
"VersionWindows"
,
plugins
()
[
i
].
version
);
else
ini
.
add_entry
(
plugins
_
[
i
].
name
,
"VersionLinux"
,
plugins
_
[
i
].
version
);
ini
.
add_entry
(
plugins
()
[
i
].
name
,
"VersionLinux"
,
plugins
()
[
i
].
version
);
}
ini
.
disconnect
();
...
...
Core/Core.hh
View file @
b8906443
...
...
@@ -121,7 +121,6 @@
#include <OpenFlipper/threads/JobInfo.hh>
#include <OpenFlipper/common/FileTypes.hh>
#include <OpenFlipper/common/InformationPlugins.hh>
#include "SpinBoxEventFilter.hh"
...
...
@@ -1214,17 +1213,19 @@ private slots:
//===========================================================================
public
:
const
std
::
vector
<
PluginInfo
>
plugins
()
const
{
return
plugins_
;
}
;
std
::
vector
<
PluginInfo
>
&
plugins
();
private:
/// List of all loaded plugins_
std
::
vector
<
PluginInfo
>
plugins_
;
/// Index of Plugins toolbox widget
int
toolboxindex_
;
/// Load all plugins from default plugin directory and from INI-File
void
loadPlugins
();
/// Print all info collected about plugin during loading
void
printPluginLoadLog
(
const
QString
&
errors
,
const
QString
&
warnings
);
private
slots
:
/// Show Plugins Dialog
void
slotShowPlugins
();
...
...
@@ -1250,10 +1251,8 @@ private slots:
signals:
void
genericMetadataDeserialized
(
QString
key
,
QString
value
);
void
objectMetadataDeserialized
(
QString
object_name
,
QString
value
);
#if QT_VERSION >= 0x050000
void
objectMetadataDeserializedJson
(
QString
object_name
,
QJsonDocument
value
);
#endif
private
slots
:
void
slotMetadataDeserialized
(
const
QVector
<
QPair
<
QString
,
QString
>
>
&
data
);
...
...
Core/PluginCommunication.cc
View file @
b8906443
...
...
@@ -467,11 +467,11 @@ void connectPlugins( Core* c, const std::vector<PluginInfo>& plugins_, QString _
}
void
Core
::
slotCrossPluginConnect
(
QString
_pluginName1
,
const
char
*
_signal
,
QString
_pluginName2
,
const
char
*
_slot
)
{
connectPlugins
(
this
,
plugins
_
,
_pluginName1
,
_signal
,
_pluginName2
,
_slot
,
false
);
connectPlugins
(
this
,
plugins
()
,
_pluginName1
,
_signal
,
_pluginName2
,
_slot
,
false
);
}
void
Core
::
slotCrossPluginConnectQueued
(
QString
_pluginName1
,
const
char
*
_signal
,
QString
_pluginName2
,
const
char
*
_slot
)
{
connectPlugins
(
this
,
plugins
_
,
_pluginName1
,
_signal
,
_pluginName2
,
_slot
,
true
);
connectPlugins
(
this
,
plugins
()
,
_pluginName1
,
_signal
,
_pluginName2
,
_slot
,
true
);
}
//========================================================================================
...
...
@@ -533,7 +533,6 @@ void Core::slotMetadataDeserialized(
const
QStringRef
value
=
obj_metadata
.
midRef
(
cursor
,
next
-
cursor
);
emit
objectMetadataDeserialized
(
current_object_name
,
value
.
toString
());
#if QT_VERSION >= 0x050000
QJsonParseError
json_error
;
QJsonDocument
json_doc
=
QJsonDocument
::
fromJson
(
value
.
toUtf8
(),
&
json_error
);
...
...
@@ -541,7 +540,6 @@ void Core::slotMetadataDeserialized(
emit
objectMetadataDeserializedJson
(
current_object_name
,
json_doc
);
}
#endif
cursor
=
next
+
re_end
.
matchedLength
();
state
=
STATE_SEARCH_BEGIN
;
break
;
...
...
Core/PluginInfo.hh
View file @
b8906443
...
...
@@ -85,6 +85,8 @@ class PluginInfo{
version
(
""
),
path
(
""
),
rpcName
(
""
),
errors
(
""
),
warnings
(
""
),
optionsWidget
(
0
),
buildIn
(
true
),
status
(
FAILED
)
...
...
@@ -108,6 +110,8 @@ class PluginInfo{
version
(
_i
.
version
),
path
(
_i
.
path
),
rpcName
(
_i
.
rpcName
),
errors
(
_i
.
errors
),
warnings
(
_i
.
warnings
),
rpcFunctions
(
_i
.
rpcFunctions
),
slotInfos
(
_i
.
slotInfos
),
keys
(
_i
.
keys
),
...
...
@@ -141,6 +145,12 @@ class PluginInfo{
/// Clean rpc name of the plugin
QString
rpcName
;
/// Store errors encountered during plugin loading
QString
errors
;
/// Store warnings encountered during plugin loading
QString
warnings
;
/// List of exported rpc slots
QStringList
rpcFunctions
;
...
...
Core/PluginLoader.cc
View file @
b8906443
This diff is collapsed.
Click to expand it.
Core/RPC.cc
View file @
b8906443
...
...
@@ -68,8 +68,8 @@
void
Core
::
slotPluginExists
(
QString
_pluginName
,
bool
&
_exists
)
{
for
(
int
i
=
0
;
i
<
(
int
)
plugins
_
.
size
();
++
i
)
{
if
(
plugins
_
[
i
].
rpcName
==
_pluginName
)
{
for
(
int
i
=
0
;
i
<
(
int
)
plugins
()
.
size
();
++
i
)
{
if
(
plugins
()
[
i
].
rpcName
==
_pluginName
)
{
_exists
=
true
;
return
;
}
...
...
@@ -82,8 +82,8 @@ void Core::slotFunctionExists( QString _pluginName , QString _functionName , boo
//Find plugin
int
plugin
=
-
1
;
for
(
int
i
=
0
;
i
<
(
int
)
plugins
_
.
size
();
++
i
)
{
if
(
plugins
_
[
i
].
rpcName
==
_pluginName
)
{
for
(
int
i
=
0
;
i
<
(
int
)
plugins
()
.
size
();
++
i
)
{
if
(
plugins
()
[
i
].
rpcName
==
_pluginName
)
{
plugin
=
i
;
break
;
}
...
...
@@ -94,15 +94,15 @@ void Core::slotFunctionExists( QString _pluginName , QString _functionName , boo
return
;
}
_exists
=
plugins
_
[
plugin
].
rpcFunctions
.
contains
(
_functionName
);
_exists
=
plugins
()
[
plugin
].
rpcFunctions
.
contains
(
_functionName
);
}
void
Core
::
slotCall
(
QString
_pluginName
,
QString
_functionName
,
bool
&
_success
)
{
//Find plugin
int
plugin
=
-
1
;
for
(
int
i
=
0
;
i
<
(
int
)
plugins
_
.
size
();
++
i
)
{
if
(
plugins
_
[
i
].
rpcName
==
_pluginName
)
{
for
(
int
i
=
0
;
i
<
(
int
)
plugins
()
.
size
();
++
i
)
{
if
(
plugins
()
[
i
].
rpcName
==
_pluginName
)
{
plugin
=
i
;
break
;
}
...
...
@@ -114,7 +114,7 @@ void Core::slotCall( QString _pluginName , QString _functionName , bool& _succes
return
;
}
if
(
!
plugins
_
[
plugin
].
rpcFunctions
.
contains
(
_functionName
)
)
{
if
(
!
plugins
()
[
plugin
].
rpcFunctions
.
contains
(
_functionName
)
)
{
_success
=
false
;
emit
log
(
LOGERR
,
tr
(
"Unable to call function from Plugin : "
)
+
_pluginName
);
emit
log
(
LOGERR
,
tr
(
"Function "
)
+
_functionName
+
tr
(
" not found!"
));
...
...
Core/saveSettings.cc
View file @
b8906443
...
...
@@ -52,6 +52,9 @@
//#include <ObjectTypes/Light/Light.hh>
#include <OpenFlipper/common/FileTypes.hh>
/// Save Settings (slot is called from CoreWidget's File-Menu)
void
Core
::
saveSettings
(){
...
...
Core/scripting.cc
View file @
b8906443
...
...
@@ -231,13 +231,13 @@ void Core::setToolBoxSide(QString _side) {
//-----------------------------------------------------------------------------
QWidget
*
Core
::
getToolbox
(
QString
_pluginName
,
QString
_toolboxName
)
{
std
::
vector
<
PluginInfo
>::
const_iterator
pluginIt
=
plugins
_
.
end
();
for
(
std
::
vector
<
PluginInfo
>::
const_iterator
it
=
plugins
_
.
begin
(),
it_end
=
plugins
_
.
end
();
it
!=
it_end
;
++
it
)
{
std
::
vector
<
PluginInfo
>::
const_iterator
pluginIt
=
plugins
()
.
end
();
for
(
std
::
vector
<
PluginInfo
>::
const_iterator
it
=
plugins
()
.
begin
(),
it_end
=
plugins
()
.
end
();
it
!=
it_end
;
++
it
)
{
if
(
it
->
name
==
_pluginName
)
{
pluginIt
=
it
;
}
}
if
(
pluginIt
==
plugins
_
.
end
())
return
0
;
if
(
pluginIt
==
plugins
()
.
end
())
return
0
;
for
(
std
::
vector
<
std
::
pair
<
QString
,
QWidget
*>
>::
const_iterator
it
=
pluginIt
->
toolboxWidgets
.
begin
(),
it_end
=
pluginIt
->
toolboxWidgets
.
end
();
it
!=
it_end
;
++
it
)
{
...
...
@@ -266,8 +266,8 @@ void Core::addToolbox(QString _name ,QWidget* _widget, QIcon* _icon,
int
id
=
-
1
;
// Find the plugin which added this Toolbox
for
(
uint
i
=
0
;
i
<
plugins
_
.
size
();
++
i
)
{
if
(
plugins
_
[
i
].
plugin
==
sender
()
)
{
for
(
uint
i
=
0
;
i
<
plugins
()
.
size
();
++
i
)
{
if
(
plugins
()
[
i
].
plugin
==
sender
()
)
{
id
=
i
;
break
;
}
...
...
@@ -275,8 +275,8 @@ void Core::addToolbox(QString _name ,QWidget* _widget, QIcon* _icon,
// Find the scripting plugin because we assign this toolBox to it as we did not find the original sender