[rkward-cvs] rkward/rkward/plugin rkcomponent.cpp,1.1,1.2 rkcomponent.h,1.1,1.2
Thomas Friedrichsmeier
tfry at users.sourceforge.net
Fri Feb 17 16:32:32 UTC 2006
- Previous message: [rkward-cvs] rkward/po de.po,1.1,1.2 es.po,1.8,1.9 fr.po,1.14,1.15 it.po,1.15,1.16 pl.po,1.7,1.8 rkward.pot,1.9,1.10
- Next message: [rkward-cvs] rkward README,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/rkward/rkward/rkward/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5303/rkward/plugin
Modified Files:
rkcomponent.cpp rkcomponent.h
Log Message:
Mostly small stuff. Starting to refamiliarize myself with the code...
Index: rkcomponent.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkcomponent.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** rkcomponent.cpp 13 Dec 2005 15:10:24 -0000 1.1
--- rkcomponent.cpp 17 Feb 2006 16:32:30 -0000 1.2
***************
*** 20,23 ****
--- 20,50 ----
#include "../debug.h"
+ //############### RKComponentBase #####################
+
+ RKComponentBase* RKComponentBase::lookupComponent (const QString &identifier, QString *modifier) {
+ RK_TRACE (PLUGIN);
+
+ if (identifier.isNull ()) return this;
+
+ RKComponentBase *child = child_map.find (identifier.section ("::", 0, 0));
+ if (!child) { // if we do not have such a child, return 0 (RKComponentBase does not support modifiers)
+ RK_DO (qDebug ("Failed component lookup"), PLUGIN, DL_WARNING);
+ return 0;
+ } else { // else do recursive lookup
+ return child->lookupComponent (identifier.section ("::", 1), modifier);
+ }
+ }
+
+ void RKComponentBase::addChild (const QString &id, RKComponentBase *child) {
+ RK_TRACE (PLUGIN);
+
+ child_map.insert (id, child);
+ }
+
+
+
+
+ //############### RKComponent ########################
+
RKComponent::RKComponent (RKComponent *parent) : QWidget (parent) {
RK_TRACE (PLUGIN);
***************
*** 65,68 ****
--- 92,106 ----
}
+ void RKComponent::setVisible (bool visible) {
+ visibilityProperty ()->setBoolValue (visible);
+ }
+
+ void RKComponent::setEnabled (bool enabled) {
+ enablednessProperty ()->setBoolValue (enabled);
+ }
+
+ void RKComponent::setRequired (bool required) {
+ requirednessProperty ()->setBoolValue (required);
+ }
#include "rkcomponent.moc"
Index: rkcomponent.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkcomponent.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** rkcomponent.h 13 Dec 2005 15:10:24 -0000 1.1
--- rkcomponent.h 17 Feb 2006 16:32:30 -0000 1.2
***************
*** 31,35 ****
/** tries to locate a component (or property) described by identifier as a child (of any generation) of this RKComponentBase. If found, a pointer to this is returned. Also, the modifier parameter is set to hold any remaining modifier contained in the identifier.
! @param identifier The identifier string to look for (including a potential modifier suffix.
@param modifier If a non null pointer to QString is given, this will be set to the value of the remaining modifier (only if successful)
@returns a pointer to the RKComponentBase, if found, or 0, if no such RKComponentBase exists as a child of this RKComponentBase. */
--- 31,35 ----
/** tries to locate a component (or property) described by identifier as a child (of any generation) of this RKComponentBase. If found, a pointer to this is returned. Also, the modifier parameter is set to hold any remaining modifier contained in the identifier.
! @param identifier The identifier string to look for (including a potential modifier suffix).
@param modifier If a non null pointer to QString is given, this will be set to the value of the remaining modifier (only if successful)
@returns a pointer to the RKComponentBase, if found, or 0, if no such RKComponentBase exists as a child of this RKComponentBase. */
***************
*** 65,74 ****
RKComponentPropertyBool *requirednessProperty () { return requiredness_property; };
/** convenience call to set visibilty property (and hence visibility of this component) */
! void setVisible (bool visible) { visibilityProperty ()->setBoolValue (visible); };
! /** convenience call to set visibilty property (and hence visibility of this component) */
! void setEnabled (bool enabled) { enablednessProperty ()->setBoolValue (enabled); };
/** convenience call to set visibilty property (and hence visibility of this component) */
! void setRequired (bool required) { requirednessProperty ()->setBoolValue (required); };
/** The parent of this component. Should be notified, whenever isSatisfied () or isReady ()-state changed. */
--- 65,74 ----
RKComponentPropertyBool *requirednessProperty () { return requiredness_property; };
+ /** convenience call to set visibilty property (and hence visibility of this component). Can't inline due to inclusion problems. */
+ void setVisible (bool visible);
/** convenience call to set visibilty property (and hence visibility of this component) */
! void setEnabled (bool enabled);
/** convenience call to set visibilty property (and hence visibility of this component) */
! void setRequired (bool required);
/** The parent of this component. Should be notified, whenever isSatisfied () or isReady ()-state changed. */
***************
*** 87,91 ****
RKComponent *_parent;
private:
! /** also notifies the parent, if applicable */
void setSatisfied (bool satisfied);
void setReady (bool ready);
--- 87,91 ----
RKComponent *_parent;
private:
! /** Internal function to use when satisfaction state changes. Also notifies the parent, if applicable */
void setSatisfied (bool satisfied);
void setReady (bool ready);
- Previous message: [rkward-cvs] rkward/po de.po,1.1,1.2 es.po,1.8,1.9 fr.po,1.14,1.15 it.po,1.15,1.16 pl.po,1.7,1.8 rkward.pot,1.9,1.10
- Next message: [rkward-cvs] rkward README,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the rkward-tracker
mailing list