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 {
* This should be done for example if you changed a scenegraph node or a mesh and have
* to redraw it.
*/
virtual void update_view() {};
virtual void updateView() {};
/** \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
* If you changed the element itself (geometry, topology,..) You should also emit this signal.\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 also have to emit this signal.\n
* 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.
*
* 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
*
......@@ -102,7 +104,7 @@ class BaseInterface {
* 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.
* 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
*/
virtual void slotObjectUpdated( int /*_identifier*/ ) {};
......
......@@ -64,7 +64,7 @@ void Core::slotObjectUpdated(int _identifier) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 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() ) );
}
}
......@@ -83,6 +83,7 @@ void Core::slotObjectUpdated(int _identifier) {
// just inform the plugins as we dont do anything else
emit signalObjectUpdated(_identifier);
updateView();
}
/** 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){
}
if ( checkSignal(plugin,"update_view()") )
connect(plugin,SIGNAL(update_view()),this,SLOT(updateView()));
// Check for baseInterface of old style!
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()") )
connect(this,SIGNAL(allCleared()),plugin,SLOT(slotAllCleared()));
......
......@@ -9,9 +9,9 @@
<ignoreparts/>
<projectdirectory>../</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description/>
<description></description>
<projectname>gui</projectname>
<defaultencoding/>
<defaultencoding></defaultencoding>
<versioncontrol>kdevsubversion</versioncontrol>
</general>
<kdevcustomproject>
......@@ -19,11 +19,11 @@
<mainprogram>/data/home1/moebius/projects/OpenFlipper/OpenFlipper/Debian_64_Debug/OpenFlipper</mainprogram>
<directoryradio>executable</directoryradio>
<customdirectory>/</customdirectory>
<programargs/>
<programargs></programargs>
<terminal>false</terminal>
<autocompile>true</autocompile>
<envvars/>
<globaldebugarguments/>
<globaldebugarguments></globaldebugarguments>
<globalcwd>/data/home1/moebius/projects/OpenFlipper</globalcwd>
<useglobalprogram>false</useglobalprogram>
<autoinstall>false</autoinstall>
......@@ -31,19 +31,21 @@
</run>
<build>
<buildtool>make</buildtool>
<builddir/>
<builddir></builddir>
</build>
<make>
<abortonerror>false</abortonerror>
<numberofjobs>6</numberofjobs>
<prio>0</prio>
<dontact>false</dontact>
<makebin/>
<defaulttarget/>
<makebin></makebin>
<defaulttarget></defaulttarget>
<makeoptions>-i</makeoptions>
<selectedenvironment>default</selectedenvironment>
<selectedenvironment>Debug</selectedenvironment>
<environments>
<default/>
<Debug>
<envvar value="debug" name="CONFIG" />
</Debug>
</environments>
</make>
<filetypes>
......@@ -79,11 +81,12 @@
<other>
<prio>0</prio>
<otherbin>acgmake -max</otherbin>
<defaulttarget/>
<otheroptions/>
<selectedenvironment>default</selectedenvironment>
<defaulttarget></defaulttarget>
<otheroptions></otheroptions>
<selectedenvironment>Debug</selectedenvironment>
<environments>
<default/>
<Debug/>
</environments>
</other>
<general>
......@@ -92,12 +95,12 @@
</kdevcustomproject>
<kdevdebugger>
<general>
<dbgshell/>
<dbgshell></dbgshell>
<programargs/>
<gdbpath/>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
<gdbpath></gdbpath>
<configGdbScript></configGdbScript>
<runShellScript></runShellScript>
<runGdbScript></runGdbScript>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar>
......@@ -210,7 +213,7 @@
<resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
</codecompletion>
<creategettersetter>
<prefixGet/>
<prefixGet></prefixGet>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<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