[rkward-cvs] SF.net SVN: rkward:[3674] trunk/rkward/rkward/plugin
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Sun Jun 5 13:24:08 UTC 2011
Revision: 3674
http://rkward.svn.sourceforge.net/rkward/?rev=3674&view=rev
Author: tfry
Date: 2011-06-05 13:24:07 +0000 (Sun, 05 Jun 2011)
Log Message:
-----------
Fixes to the new checkable frame's.
Modified Paths:
--------------
trunk/rkward/rkward/plugin/rkpluginframe.cpp
trunk/rkward/rkward/plugin/rkpluginframe.h
Modified: trunk/rkward/rkward/plugin/rkpluginframe.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkpluginframe.cpp 2011-06-05 13:23:33 UTC (rev 3673)
+++ trunk/rkward/rkward/plugin/rkpluginframe.cpp 2011-06-05 13:24:07 UTC (rev 3674)
@@ -45,7 +45,7 @@
frame->setCheckable (true);
frame->setChecked (xml->getBoolAttribute (element, "checked", false, DL_INFO));
initCheckedProperty ();
- connect (frame, SIGNAL (toggled(bool)), this, SLOT (checkedChanged()));
+ connect (frame, SIGNAL (toggled(bool)), this, SLOT (checkedChanged(bool)));
}
}
@@ -61,7 +61,7 @@
return;
}
- addChild ("checked", checked = new RKComponentPropertyBool (this, false, frame->isChecked ()));
+ addChild ("checked", checked = new RKComponentPropertyBool (this, false, frame->isChecked (), "1", "0"));
connect (checked, SIGNAL (valueChanged (RKComponentPropertyBase *)), this, SLOT (propertyChanged (RKComponentPropertyBase *)));
checked->setInternal (true);
}
@@ -75,14 +75,18 @@
RK_TRACE (PLUGIN);
RK_ASSERT (checked && (property == checked));
- if (frame->isChecked () != checked->boolValue ()) frame->setChecked (checked->boolValue ());
+ if (frame->isChecked () == checked->boolValue ()) return;
+ frame->setChecked (checked->boolValue ());
+ changed ();
}
-void RKPluginFrame::checkedChanged () {
+void RKPluginFrame::checkedChanged (bool new_state) {
RK_TRACE (PLUGIN);
RK_ASSERT (checked);
- if (frame->isChecked () != checked->boolValue ()) checked->setBoolValue (frame->isChecked ());
+ if (new_state == checked->boolValue ()) return;
+ checked->setBoolValue (new_state);
+ changed ();
}
#include "rkpluginframe.moc"
Modified: trunk/rkward/rkward/plugin/rkpluginframe.h
===================================================================
--- trunk/rkward/rkward/plugin/rkpluginframe.h 2011-06-05 13:23:33 UTC (rev 3673)
+++ trunk/rkward/rkward/plugin/rkpluginframe.h 2011-06-05 13:24:07 UTC (rev 3674)
@@ -43,7 +43,7 @@
private slots:
/** called when checked property changes */
void propertyChanged (RKComponentPropertyBase *property);
- void checkedChanged ();
+ void checkedChanged (bool new_state);
private:
void initCheckedProperty ();
RKComponentPropertyBool *checked;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list