[rkward-cvs] rkward/rkward/core rkvariable.cpp,1.23,1.24 rkvariable.h,1.16,1.17
Pierre
ecoch at users.sourceforge.net
Sat Apr 2 08:48:12 UTC 2005
- Previous message: [rkward-cvs] rkward/rkward/plugin rkinput.cpp,1.1,1.2 rkpluginbrowser.cpp,1.1,1.2 rkvarselector.cpp,1.11,1.12 rkvarselector.h,1.6,1.7 rkvarslot.cpp,1.7,1.8 rkvarslot.h,1.5,1.6
- Next message: [rkward-cvs] rkward/rkward/plugins/writetable - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/rkward/rkward/rkward/core
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10506/core
Modified Files:
rkvariable.cpp rkvariable.h
Log Message:
Patch by Adrien + using nice icons instead of '-->' in varslot
Index: rkvariable.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/core/rkvariable.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** rkvariable.cpp 7 Oct 2004 15:58:18 -0000 1.23
--- rkvariable.cpp 2 Apr 2005 08:48:09 -0000 1.24
***************
*** 27,30 ****
--- 27,31 ----
#define UPDATE_DIM_COMMAND 1
+ #define UPDATE_CLASS_COMMAND 2
#define GET_STORAGE_MODE_COMMAND 10
#define GET_DATA_COMMAND 11
***************
*** 41,44 ****
--- 42,47 ----
var_type = Unknown;
length = 0;
+ num_classes = 0 ;
+ classname = 0 ;
}
***************
*** 110,114 ****
void RKVariable::rCommandDone (RCommand *command) {
RK_TRACE (OBJECTS);
!
RObject::rCommandDone (command);
--- 113,118 ----
void RKVariable::rCommandDone (RCommand *command) {
RK_TRACE (OBJECTS);
!
! bool properties_changed = false;
RObject::rCommandDone (command);
***************
*** 126,129 ****
--- 130,138 ----
parent->childUpdateComplete ();
+
+ RCommand *command = new RCommand ("class (" + getFullName () + ")", RCommand::App | RCommand::Sync | RCommand::GetStringVector, "", this, UPDATE_CLASS_COMMAND);
+ RKGlobals::rInterface ()->issueCommand (command, RKGlobals::rObjectList()->getUpdateCommandChain ());
+
+
} else if (command->getFlags () == GET_STORAGE_MODE_COMMAND) {
RK_ASSERT (command->intVectorLength () == 2);
***************
*** 179,182 ****
--- 188,203 ----
}
setSyncing (true);
+ } else if (command->getFlags () == UPDATE_CLASS_COMMAND) {
+ if (num_classes != command->stringVectorLength ()) {
+ num_classes = command->stringVectorLength ();
+ delete classname;
+ classname = new QString [num_classes];
+ properties_changed = true;
+ }
+ for (int cn=0; cn < num_classes; ++cn) {
+ if (classname[cn] != command->getStringVector ()[cn]) properties_changed = true;
+ classname[cn] = command->getStringVector ()[cn];
+ }
+ if (properties_changed) RKGlobals::tracker ()->objectMetaChanged (this);
}
}
***************
*** 925,926 ****
--- 946,962 ----
/////////////////// END: data-handling ///////////////////////////
+
+
+ QString RKVariable::makeClassString (const QString &sep)
+ {
+ RK_TRACE (OBJECTS);
+ QString ret;
+ for (int i=0; i < num_classes; ++i) {
+ ret.append (classname[i]);
+ if (i < (num_classes - 1)) {
+ ret.append (sep);
+ }
+ }
+ return ret;
+
+ }
Index: rkvariable.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/core/rkvariable.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** rkvariable.h 7 Oct 2004 15:58:18 -0000 1.16
--- rkvariable.h 2 Apr 2005 08:48:09 -0000 1.17
***************
*** 59,62 ****
--- 59,64 ----
void writeMetaData (RCommandChain *chain);
protected:
+ int num_classes;
+ QString *classname;
friend class RContainerObject;
int length;
***************
*** 154,157 ****
--- 156,160 ----
/** returns alignment to use for this variable */
CellAlign getAlignment ();
+ QString makeClassString (const QString &sep);
protected:
/** Extended from RObject::EditData to actually contain data. */
- Previous message: [rkward-cvs] rkward/rkward/plugin rkinput.cpp,1.1,1.2 rkpluginbrowser.cpp,1.1,1.2 rkvarselector.cpp,1.11,1.12 rkvarselector.h,1.6,1.7 rkvarslot.cpp,1.7,1.8 rkvarslot.h,1.5,1.6
- Next message: [rkward-cvs] rkward/rkward/plugins/writetable - New directory
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the rkward-tracker
mailing list