[rkward-cvs] SF.net SVN: rkward:[4014] trunk/rkward
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue Nov 1 11:39:48 UTC 2011
Revision: 4014
http://rkward.svn.sourceforge.net/rkward/?rev=4014&view=rev
Author: tfry
Date: 2011-11-01 11:39:47 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
Make 'checked' the default property for checkable frames.
Modified Paths:
--------------
trunk/rkward/doc/rkwardplugins/index.docbook
trunk/rkward/rkward/plugin/rkpluginframe.cpp
trunk/rkward/rkward/plugin/rkpluginframe.h
Modified: trunk/rkward/doc/rkwardplugins/index.docbook
===================================================================
--- trunk/rkward/doc/rkwardplugins/index.docbook 2011-10-31 16:12:10 UTC (rev 4013)
+++ trunk/rkward/doc/rkwardplugins/index.docbook 2011-11-01 11:39:47 UTC (rev 4014)
@@ -2678,7 +2678,7 @@
</varlistentry>
<varlistentry>
<term><frame></term>
-<listitem><para>No default property.
+<listitem><para>Default property is "checked", if - and only if - the frame is checkable. For non-checkable frames, there is no default property.
<variablelist>
<varlistentry>
<term>checked</term>
Modified: trunk/rkward/rkward/plugin/rkpluginframe.cpp
===================================================================
--- trunk/rkward/rkward/plugin/rkpluginframe.cpp 2011-10-31 16:12:10 UTC (rev 4013)
+++ trunk/rkward/rkward/plugin/rkpluginframe.cpp 2011-11-01 11:39:47 UTC (rev 4014)
@@ -70,6 +70,12 @@
return RKComponentBase::lookupComponent(identifier, remainder);
}
+QString RKPluginFrame::value (const QString &modifier) {
+ if (!frame->isCheckable ()) return RKComponent::value (modifier);
+ if (!checked) initCheckedProperty();
+ return checked->value (modifier);
+}
+
void RKPluginFrame::propertyChanged (RKComponentPropertyBase* property) {
RK_TRACE (PLUGIN);
Modified: trunk/rkward/rkward/plugin/rkpluginframe.h
===================================================================
--- trunk/rkward/rkward/plugin/rkpluginframe.h 2011-10-31 16:12:10 UTC (rev 4013)
+++ trunk/rkward/rkward/plugin/rkpluginframe.h 2011-11-01 11:39:47 UTC (rev 4014)
@@ -37,6 +37,8 @@
/** returns the page child elements should be drawn in */
KVBox *getPage () { return page; };
int type () { return ComponentFrame; };
+/** reimplemented to return the value of the checked property by default */
+ QString value (const QString &modifier);
/** re-implemented to create "checked" property on demand. */
RKComponentBase* lookupComponent (const QString &identifier, QString *remainder);
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