Commit 1546b974 authored by Jan Möbius's avatar Jan Möbius
Browse files

Finaly cleanup update_view to updateView and

updated_objects to updatedObject

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@4182 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 508fab47
...@@ -63,16 +63,18 @@ class BaseInterface { ...@@ -63,16 +63,18 @@ class BaseInterface {
* This should be done for example if you changed a scenegraph node or a mesh and have * This should be done for example if you changed a scenegraph node or a mesh and have
* to redraw it. * to redraw it.
*/ */
virtual void update_view() {}; virtual void updateView() {};
/** \brief The object list has been changed by this plugin /** \brief The object list has been changed by this plugin
* *
* Emit this Signal, if the object list has changed (e.g. Source or Target changed).\n * Emit this Signal, if you updated an object (e.g. Source or Target changed).\n
* If you changed the element itself (geometry, topology,..) You should also emit this signal.\n * If you changed the element itself (geometry, topology,..) You also have to emit this signal.\n
* Dont emit this Signal in BaseInterface::slotObjectUpdated() as this causes an endless Loop!! * Dont emit this Signal in BaseInterface::slotObjectUpdated() as this causes an endless Loop!!
* Give the id of the new object as parameter or -1 if you deleted an object. * Give the id of the new object as parameter or -1 if you deleted an object.
*
* The parameter has to be the id of the object or -1 if refering to all objects.
*/ */
virtual void updated_objects(int) {}; virtual void updatedObject(int ) {};
/** \brief The active object has been switched by this plugin /** \brief The active object has been switched by this plugin
* *
...@@ -102,7 +104,7 @@ class BaseInterface { ...@@ -102,7 +104,7 @@ class BaseInterface {
* an existing object has been changed. This could mean, that objects are added or deleted * an existing object has been changed. This could mean, that objects are added or deleted
* or that for an existing object with the given id has been modified. * or that for an existing object with the given id has been modified.
* If you store local information about one of these Objects, you should check if its still valid!\n * If you store local information about one of these Objects, you should check if its still valid!\n
* Dont emit BaseInterface::updated_objects(int) in this slot as this causes an endless Loop!! * Dont emit BaseInterface::updatedObject(int) in this slot as this causes an endless Loop!!
* @param _identifier Identifier of the updated/new object or -1 if one is deleted * @param _identifier Identifier of the updated/new object or -1 if one is deleted
*/ */
virtual void slotObjectUpdated( int /*_identifier*/ ) {}; virtual void slotObjectUpdated( int /*_identifier*/ ) {};
......
...@@ -64,7 +64,7 @@ void Core::slotObjectUpdated(int _identifier) { ...@@ -64,7 +64,7 @@ void Core::slotObjectUpdated(int _identifier) {
if ( OpenFlipper::Options::doSlotDebugging() ) { if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) { if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) { if ( sender()->metaObject() != 0 ) {
emit log(LOGINFO,"updated_objects( " + QString::number(_identifier) + " ) called by " + emit log(LOGINFO,"updatedObject( " + QString::number(_identifier) + " ) called by " +
QString( sender()->metaObject()->className() ) ); QString( sender()->metaObject()->className() ) );
} }
} }
...@@ -83,6 +83,7 @@ void Core::slotObjectUpdated(int _identifier) { ...@@ -83,6 +83,7 @@ void Core::slotObjectUpdated(int _identifier) {
// just inform the plugins as we dont do anything else // just inform the plugins as we dont do anything else
emit signalObjectUpdated(_identifier); emit signalObjectUpdated(_identifier);
updateView();
} }
/** This function is called if the active object has changed. The information is passed to all plugins. /** This function is called if the active object has changed. The information is passed to all plugins.
......
...@@ -451,11 +451,26 @@ void Core::loadPlugin(QString filename, bool silent){ ...@@ -451,11 +451,26 @@ void Core::loadPlugin(QString filename, bool silent){
} }
if ( checkSignal(plugin,"update_view()") ) // Check for baseInterface of old style!
connect(plugin,SIGNAL(update_view()),this,SLOT(updateView())); if ( checkSignal(plugin,"updated_objects(int)") ) {
log(LOGERR,"Plugin Uses old style updated_objects! Convert to updated_objects!");
emit log(LOGOUT,"=============================================================================================");
return;
}
if ( checkSignal(plugin,"update_view()") ) {
log(LOGERR,"Plugin Uses old style update_view! Convert to updateView!");
emit log(LOGOUT,"=============================================================================================");
return;
}
if ( checkSignal(plugin,"updateView()") )
connect(plugin,SIGNAL(updateView()),this,SLOT(updateView()));
if ( checkSignal(plugin,"updatedObject(int)") )
connect(plugin,SIGNAL(updatedObject(int)),this,SLOT(slotObjectUpdated(int)));
if ( checkSignal(plugin,"updated_objects(int)") )
connect(plugin,SIGNAL(updated_objects(int)),this,SLOT(slotObjectUpdated(int)));
if ( checkSlot(plugin,"slotAllCleared()") ) if ( checkSlot(plugin,"slotAllCleared()") )
connect(this,SIGNAL(allCleared()),plugin,SLOT(slotAllCleared())); connect(this,SIGNAL(allCleared()),plugin,SLOT(slotAllCleared()));
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<ignoreparts/> <ignoreparts/>
<projectdirectory>../</projectdirectory> <projectdirectory>../</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath> <absoluteprojectpath>false</absoluteprojectpath>
<description/> <description></description>
<projectname>gui</projectname> <projectname>gui</projectname>
<defaultencoding/> <defaultencoding></defaultencoding>
<versioncontrol>kdevsubversion</versioncontrol> <versioncontrol>kdevsubversion</versioncontrol>
</general> </general>
<kdevcustomproject> <kdevcustomproject>
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
<mainprogram>/data/home1/moebius/projects/OpenFlipper/OpenFlipper/Debian_64_Debug/OpenFlipper</mainprogram> <mainprogram>/data/home1/moebius/projects/OpenFlipper/OpenFlipper/Debian_64_Debug/OpenFlipper</mainprogram>
<directoryradio>executable</directoryradio> <directoryradio>executable</directoryradio>
<customdirectory>/</customdirectory> <customdirectory>/</customdirectory>
<programargs/> <programargs></programargs>
<terminal>false</terminal> <terminal>false</terminal>
<autocompile>true</autocompile> <autocompile>true</autocompile>
<envvars/> <envvars/>
<globaldebugarguments/> <globaldebugarguments></globaldebugarguments>
<globalcwd>/data/home1/moebius/projects/OpenFlipper</globalcwd> <globalcwd>/data/home1/moebius/projects/OpenFlipper</globalcwd>
<useglobalprogram>false</useglobalprogram> <useglobalprogram>false</useglobalprogram>
<autoinstall>false</autoinstall> <autoinstall>false</autoinstall>
...@@ -31,19 +31,21 @@ ...@@ -31,19 +31,21 @@
</run> </run>
<build> <build>
<buildtool>make</buildtool> <buildtool>make</buildtool>
<builddir/> <builddir></builddir>
</build> </build>
<make> <make>
<abortonerror>false</abortonerror> <abortonerror>false</abortonerror>
<numberofjobs>6</numberofjobs> <numberofjobs>6</numberofjobs>
<prio>0</prio> <prio>0</prio>
<dontact>false</dontact> <dontact>false</dontact>
<makebin/> <makebin></makebin>
<defaulttarget/> <defaulttarget></defaulttarget>
<makeoptions>-i</makeoptions> <makeoptions>-i</makeoptions>
<selectedenvironment>default</selectedenvironment> <selectedenvironment>Debug</selectedenvironment>
<environments> <environments>
<default/> <Debug>
<envvar value="debug" name="CONFIG" />
</Debug>
</environments> </environments>
</make> </make>
<filetypes> <filetypes>
...@@ -79,11 +81,12 @@ ...@@ -79,11 +81,12 @@
<other> <other>
<prio>0</prio> <prio>0</prio>
<otherbin>acgmake -max</otherbin> <otherbin>acgmake -max</otherbin>
<defaulttarget/> <defaulttarget></defaulttarget>
<otheroptions/> <otheroptions></otheroptions>
<selectedenvironment>default</selectedenvironment> <selectedenvironment>Debug</selectedenvironment>
<environments> <environments>
<default/> <default/>
<Debug/>
</environments> </environments>
</other> </other>
<general> <general>
...@@ -92,12 +95,12 @@ ...@@ -92,12 +95,12 @@
</kdevcustomproject> </kdevcustomproject>
<kdevdebugger> <kdevdebugger>
<general> <general>
<dbgshell/> <dbgshell></dbgshell>
<programargs/> <programargs/>
<gdbpath/> <gdbpath></gdbpath>
<configGdbScript/> <configGdbScript></configGdbScript>
<runShellScript/> <runShellScript></runShellScript>
<runGdbScript/> <runGdbScript></runGdbScript>
<breakonloadinglibs>true</breakonloadinglibs> <breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty> <separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar> <floatingtoolbar>false</floatingtoolbar>
...@@ -210,7 +213,7 @@ ...@@ -210,7 +213,7 @@
<resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental> <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
</codecompletion> </codecompletion>
<creategettersetter> <creategettersetter>
<prefixGet/> <prefixGet></prefixGet>
<prefixSet>set</prefixSet> <prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable> <prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName> <parameterName>theValue</parameterName>
......
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