[rkward-cvs] rkward/rkward/plugin rkcheckbox.cpp,1.2,1.3 rkcheckbox.h,1.2,1.3 rkformula.cpp,1.5,1.6 rkformula.h,1.3,1.4 rkplugin.cpp,1.12,1.13 rkplugin.h,1.5,1.6 rkpluginspinbox.cpp,1.3,1.4 rkpluginspinbox.h,1.2,1.3 rkpluginwidget.cpp,1.3,1.4 rkpluginwidget.h,1.2,1.3 rkradio.cpp,1.2,1.3 rkradio.h,1.2,1.3 rkvarselector.cpp,1.9,1.10 rkvarselector.h,1.4,1.5 rkvarslot.cpp,1.5,1.6 rkvarslot.h,1.3,1.4
Pierre
ecoch at users.sourceforge.net
Mon Mar 14 17:10:39 UTC 2005
Update of /cvsroot/rkward/rkward/rkward/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10074
Modified Files:
rkcheckbox.cpp rkcheckbox.h rkformula.cpp rkformula.h
rkplugin.cpp rkplugin.h rkpluginspinbox.cpp rkpluginspinbox.h
rkpluginwidget.cpp rkpluginwidget.h rkradio.cpp rkradio.h
rkvarselector.cpp rkvarselector.h rkvarslot.cpp rkvarslot.h
Log Message:
Adding patch by Adrien d'Hardemare, adding a feature to the plugin interface.
Index: rkvarselector.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkvarselector.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkvarselector.h 22 Sep 2004 14:06:10 -0000 1.4
--- rkvarselector.h 14 Mar 2005 17:10:37 -0000 1.5
***************
*** 38,41 ****
--- 38,42 ----
*/
+
class RKVarSelector : public RKPluginWidget {
Q_OBJECT
***************
*** 50,57 ****
--- 51,62 ----
/** find out, whether the given object is available in the RKVarselector (i.e. it a) exists and b) matched the filter requirements) */
bool containsObject (RObject *object);
+ void setEnabled(bool);
public slots:
void objectListChanged ();
+ void active();
+ void active(bool);
private:
RKObjectListView *list_view;
+ QString depend;
};
Index: rkpluginwidget.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkpluginwidget.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkpluginwidget.cpp 22 Sep 2004 14:06:10 -0000 1.3
--- rkpluginwidget.cpp 14 Mar 2005 17:10:37 -0000 1.4
***************
*** 43,44 ****
--- 43,46 ----
return true;
}
+
+
Index: rkradio.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkradio.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkradio.cpp 22 Sep 2004 14:06:10 -0000 1.2
--- rkradio.cpp 14 Mar 2005 17:10:37 -0000 1.3
***************
*** 32,35 ****
--- 32,36 ----
label = new QLabel (element.attribute ("label", "Select one:"), this);
vbox->addWidget (label);
+ depend = element.attribute ("depend", "");
// create ButtonGroup
***************
*** 85,86 ****
--- 86,126 ----
emit (changed ());
}
+
+ void RKRadio::setEnabled(bool checked){
+ group->setEnabled(checked);
+ }
+
+
+ void RKRadio::active(){
+ bool isOk = group->isEnabled();
+ group->setEnabled(! isOk) ;
+ }
+
+ void RKRadio::active(bool isOk){
+ group->setEnabled(isOk) ;
+ }
+
+ QRadioButton * RKRadio::findLabel (QString lab) {
+ QRadioButton * sol = 0 ;
+ OptionsMap::iterator findlab;
+ for (findlab = options.begin(); findlab != options.end(); ++findlab) {
+ if (findlab != options.end () ) {
+ // qDebug ("looking : %s", findlab.data().latin1 ()) ;
+ if ( findlab.data() == lab) { return findlab.key() ;};
+ };
+ };
+ return sol ;
+ }
+
+ bool RKRadio::isOk(QString val) {
+ QString sol ;
+ OptionsMap::Iterator it;
+ for (it = options.begin(); it != options.end(); ++it) {
+ if (it.key()->isChecked ()) {
+ sol = it.data() ;
+ };
+ };
+ if (sol == val) return true ;
+ else return false;
+
+ }
\ No newline at end of file
Index: rkformula.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkformula.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkformula.cpp 1 Oct 2004 16:38:00 -0000 1.5
--- rkformula.cpp 14 Mar 2005 17:10:37 -0000 1.6
***************
*** 39,42 ****
--- 39,43 ----
RK_TRACE (PLUGIN);
QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::spacingHint ());
+ depend = element.attribute ("depend", "");
type_selector = new QButtonGroup (this);
Index: rkvarselector.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkvarselector.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rkvarselector.cpp 22 Sep 2004 14:06:10 -0000 1.9
--- rkvarselector.cpp 14 Mar 2005 17:10:37 -0000 1.10
***************
*** 31,35 ****
RKVarSelector::RKVarSelector (const QDomElement &element, QWidget *parent, RKPlugin *plugin) : RKPluginWidget (element, parent, plugin) {
RK_TRACE (PLUGIN);
! QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::spacingHint ());
label = new QLabel (element.attribute ("label", "Select Variable(s)"), this);
--- 31,36 ----
RKVarSelector::RKVarSelector (const QDomElement &element, QWidget *parent, RKPlugin *plugin) : RKPluginWidget (element, parent, plugin) {
RK_TRACE (PLUGIN);
! QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::spacingHint ());
! depend = element.attribute ("depend", "");
label = new QLabel (element.attribute ("label", "Select Variable(s)"), this);
***************
*** 106,107 ****
--- 107,121 ----
return false;
}
+
+ void RKVarSelector::setEnabled(bool checked){
+ list_view->setEnabled(checked);
+ }
+
+ void RKVarSelector::active(){
+ bool isOk = list_view->isEnabled();
+ list_view->setEnabled(! isOk) ;
+ }
+
+ void RKVarSelector::active(bool isOk){
+ list_view->setEnabled(isOk) ;
+ }
Index: rkpluginspinbox.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkpluginspinbox.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkpluginspinbox.h 22 Sep 2004 14:06:10 -0000 1.2
--- rkpluginspinbox.h 14 Mar 2005 17:10:37 -0000 1.3
***************
*** 17,20 ****
--- 17,21 ----
#ifndef RKPLUGINSPINBOX_H
#define RKPLUGINSPINBOX_H
+ #define SPINBOX_WIDGET 3 // comme ma note d'interro
#include <rkpluginwidget.h>
***************
*** 32,39 ****
--- 33,46 ----
~RKPluginSpinBox();
QString value (const QString &modifier);
+ int type() {return SPINBOX_WIDGET ;} ;
+ void setEnabled(bool);
public slots:
void valueChanged (int);
+ void active();
+ void active(bool);
+
private:
RKSpinBox *spinbox;
+ QString depend;
};
Index: rkvarslot.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkvarslot.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkvarslot.cpp 22 Sep 2004 14:06:10 -0000 1.5
--- rkvarslot.cpp 14 Mar 2005 17:10:37 -0000 1.6
***************
*** 68,71 ****
--- 68,72 ----
// further infos
source_id = element.attribute ("source");
+ depend = element.attribute ("depend", "");
required = (element.attribute ("required") == "true");
num_vars = 0;
***************
*** 263,264 ****
--- 264,282 ----
return i18n (" - You have to select a variable for the \"" + label->text () + "\"-field\n");
}
+
+ void RKVarSlot::setEnabled(bool checked){
+ line_edit->setEnabled(checked);
+ select->setEnabled(checked);
+ }
+
+ void RKVarSlot::active(){
+ bool isOk = line_edit->isEnabled();
+ line_edit->setEnabled(! isOk) ;
+ select->setEnabled(! isOk) ;
+ }
+
+ void RKVarSlot::active(bool isOk){
+ line_edit->setEnabled(isOk) ;
+ select->setEnabled(isOk) ;
+ }
+
Index: rkcheckbox.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkcheckbox.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkcheckbox.cpp 22 Sep 2004 14:06:10 -0000 1.2
--- rkcheckbox.cpp 14 Mar 2005 17:10:36 -0000 1.3
***************
*** 27,42 ****
qDebug ("creating checkbox");
! QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::spacingHint ());
checkbox = new QCheckBox (element.attribute ("label"), this);
vbox->addWidget (checkbox);
!
value_if_checked = element.attribute ("value", "1");
value_if_unchecked = element.attribute ("value_unchecked", "");
if (element.attribute ("checked") == "true") {
checkbox->setChecked (true);
}
connect (checkbox, SIGNAL (stateChanged (int)), this, SLOT (changedState (int)));
}
--- 27,45 ----
qDebug ("creating checkbox");
! QVBoxLayout *vbox = new QVBoxLayout (this, RKGlobals::spacingHint ());
checkbox = new QCheckBox (element.attribute ("label"), this);
vbox->addWidget (checkbox);
! isOk =false;
value_if_checked = element.attribute ("value", "1");
value_if_unchecked = element.attribute ("value_unchecked", "");
+ depend = element.attribute ("depend", "");
if (element.attribute ("checked") == "true") {
checkbox->setChecked (true);
+ isOk =true ;
}
connect (checkbox, SIGNAL (stateChanged (int)), this, SLOT (changedState (int)));
+ connect(checkbox,SIGNAL(clicked()), SIGNAL(clicked()) );
}
***************
*** 44,47 ****
--- 47,56 ----
}
+
+ void RKCheckBox::setEnabled(bool checked){
+ checkbox->setEnabled(checked);
+ }
+
+
QString RKCheckBox::value (const QString &) {
if (checkbox->isChecked ()) {
***************
*** 52,57 ****
--- 61,77 ----
}
+
void RKCheckBox::changedState (int) {
emit (changed ());
}
+ void RKCheckBox::active(bool isOk){
+ checkbox->setEnabled(isOk) ;
+ }
+
+
+ void RKCheckBox::active(){
+ bool isOk = checkbox->isEnabled();
+ checkbox->setEnabled(! isOk) ;
+ }
+
Index: rkpluginspinbox.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkpluginspinbox.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkpluginspinbox.cpp 22 Sep 2004 14:06:10 -0000 1.3
--- rkpluginspinbox.cpp 14 Mar 2005 17:10:37 -0000 1.4
***************
*** 30,33 ****
--- 30,34 ----
label = new QLabel (element.attribute ("label", "Enter value:"), this);
vbox->addWidget (label);
+ depend = element.attribute ("depend", "");
spinbox = new RKSpinBox (this);
***************
*** 44,47 ****
--- 45,52 ----
}
+ void RKPluginSpinBox::setEnabled(bool checked){
+ spinbox->setEnabled(checked);
+ }
+
QString RKPluginSpinBox::value (const QString &) {
return (spinbox->text ());
***************
*** 51,52 ****
--- 56,66 ----
plugin ()->changed ();
}
+
+ void RKPluginSpinBox::active(){
+ bool isOk = spinbox->isEnabled();
+ spinbox->setEnabled(! isOk) ;
+ }
+
+ void RKPluginSpinBox::active(bool isOk){
+ spinbox->setEnabled( isOk) ;
+ }
Index: rkpluginwidget.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkpluginwidget.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkpluginwidget.h 22 Sep 2004 14:06:10 -0000 1.2
--- rkpluginwidget.h 14 Mar 2005 17:10:37 -0000 1.3
***************
*** 58,61 ****
--- 58,62 ----
/** Returns, what type of widget this is */
virtual int type () { return GENERIC_WIDGET; };
+ bool isOk;
/** Performs any initialization that has to be delayed unitl all widgets are constructed (if any) */
virtual void initialize () { ; };
***************
*** 65,68 ****
--- 66,71 ----
QWidget *_parent;
RKPlugin *_plugin;
+
+
};
Index: rkplugin.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkplugin.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** rkplugin.cpp 25 Feb 2005 15:53:13 -0000 1.12
--- rkplugin.cpp 14 Mar 2005 17:10:37 -0000 1.13
***************
*** 72,83 ****
// create an error-dialog
! error_dialog = new RKErrorDialog (i18n ("The R engine reported errors while processing the plugin ") + caption () + i18n (". This may lead to an incorrect ouput and is likely due to a bug in the plugin.\nError messages are shown below."), i18n ("R-Error"), false);
// initialize the PHP-backend with the code-template
should_updatecode=false;
!
! // Correcting a bug. Not sure about what I'm doing though. (Pierre)
! //QString dummy = QFileInfo (QFile (filename)).dirPath () + "/code.php";
! QString dummy = QFileInfo (filename).dirPath () + "/code.php";
backend = new PHPBackend ();
connect (backend, SIGNAL (commandDone (int)), this, SLOT (backendCommandDone (int)));
--- 72,80 ----
// create an error-dialog
! error_dialog = new RKErrorDialog (i18n ("The R-backend has reported one or more error(s) while processing the plugin ") + caption () + i18n (". This may lead to an incorrect ouput and is likely due to a bug in the plugin.\nA transcript of the error message(s) is shown below."), i18n ("R-Error"), false);
// initialize the PHP-backend with the code-template
should_updatecode=false;
! QString dummy = QFileInfo (QFile (filename)).dirPath () + "/code.php";
backend = new PHPBackend ();
connect (backend, SIGNAL (commandDone (int)), this, SLOT (backendCommandDone (int)));
***************
*** 278,281 ****
--- 275,323 ----
num_pages = 1;
+
+
+ // inserting connection for enabling widgets - or not...
+ // work only if widget are on the same page
+ // valid for every widget excet formula (too weird)
+ Dependancies::Iterator it;
+ for (it = dependant.begin(); it != dependant.end(); ++it) {
+ qDebug ("id : %s", it.key().latin1 ()) ;
+ if (it.data() != "#free#"){
+ WidgetsMap::iterator master ;
+ for (master = widgets.begin(); master != widgets.end(); ++master) {
+ // qDebug ("I depend on : %s", it.data().latin1 ()) ;
+ // qDebug ("Am I your master ? I am : %s", master.key().latin1 ()) ;
+ if (master.data ()->type () == CHECKBOX_WIDGET && master.key() == it.data() ){
+ // qDebug ("I am your master I am : %s", master.key().latin1 ()) ;
+ WidgetsMap::iterator slave = widgets.find (it.key());
+ if (slave != widgets.end () ) {
+ if( ! (RKCheckBox *) master.data()->isOk ){
+ slave.data()->setEnabled(false );
+ };
+ qDebug ("Connecting %s to %s",slave.key().latin1(),master.key().latin1()) ;
+ connect( (RKCheckBox *) master.data(), SIGNAL(clicked()) ,(RKCheckBox *) slave.data(), SLOT(active()));
+ qDebug ("You are very right to choose me OK") ;
+ };
+ };
+ if (master.data ()->type () == RADIO_WIDGET ){
+ // qDebug ("Is your master a radio ?") ;
+ // qDebug ("I look if %s is in %s", it.data().latin1() , master.key().latin1 ()) ;
+ RKRadio * temp = (RKRadio * ) master.data() ;
+ QButton * sol = (QButton *) temp->findLabel(it.data()) ;
+ if ( sol != 0){
+ WidgetsMap::iterator slave = widgets.find (it.key());
+ if (slave != widgets.end () ) {
+ // qDebug ("Yes it is") ;
+ if (! temp->isOk(it.data()) ) slave.data()->setEnabled(false );
+ connect( sol , SIGNAL(toggled(bool)) , slave.data(), SLOT(active(bool)));
+ };
+ }
+ // else qDebug ("No it isn't") ;
+ };
+ };
+ };
+ };
+
+
}
***************
*** 339,342 ****
--- 381,425 ----
wizard_stack->raiseWidget (0);
+
+ // inserting connection for enabling widgets - or not...
+ // work only if widget are on the same page
+ // valid for every widget excet formula (too weird)
+ Dependancies::Iterator it;
+ for (it = dependant.begin(); it != dependant.end(); ++it) {
+ qDebug ("id : %s", it.key().latin1 ()) ;
+ if (it.data() != "#free#"){
+ WidgetsMap::iterator master ;
+ for (master = widgets.begin(); master != widgets.end(); ++master) {
+ // qDebug ("I depend on : %s", it.data().latin1 ()) ;
+ // qDebug ("Am I your master ? I am : %s", master.key().latin1 ()) ;
+ if (master.data ()->type () == CHECKBOX_WIDGET && master.key() == it.data() ){
+ // qDebug ("I am your master I am : %s", master.key().latin1 ()) ;
+ WidgetsMap::iterator slave = widgets.find (it.key());
+ if (slave != widgets.end () ) {
+ if( ! (RKCheckBox *) master.data()->isOk ){
+ slave.data()->setEnabled(false );
+ };
+ connect( (RKCheckBox *) master.data(), SIGNAL(clicked()) , slave.data(), SLOT(active()));
+ qDebug ("You are very right to choose me OK") ;
+ };
+ };
+ if (master.data ()->type () == RADIO_WIDGET ){
+ // qDebug ("Is your master a radio ?") ;
+ // qDebug ("I look if %s is in %s", it.data().latin1() , master.key().latin1 ()) ;
+ RKRadio * temp = (RKRadio * ) master.data() ;
+ QButton * sol = (QButton *) temp->findLabel(it.data()) ;
+ if ( sol != 0){
+ WidgetsMap::iterator slave = widgets.find (it.key());
+ if (slave != widgets.end () ) {
+ // qDebug ("Yes it is") ;
+ if (! temp->isOk(it.data()) ) slave.data()->setEnabled(false );
+ connect( sol , SIGNAL(toggled(bool)) , slave.data(), SLOT(active(bool)));
+ };
+ }
+ // else qDebug ("No it isn't") ;
+ };
+ };
+ };
+ };
}
***************
*** 378,382 ****
} else if (e.tagName () == "checkbox") {
widget = new RKCheckBox (e, pwidget, this);
! } else if (e.tagName () == "spinbox") {
widget = new RKPluginSpinBox (e, pwidget, this);
} else if (e.tagName () == "varslot") {
--- 461,465 ----
} else if (e.tagName () == "checkbox") {
widget = new RKCheckBox (e, pwidget, this);
! } else if (e.tagName () == "spinbox") {
widget = new RKPluginSpinBox (e, pwidget, this);
} else if (e.tagName () == "varslot") {
***************
*** 390,394 ****
if (widget) {
playout->addWidget (widget);
! registerWidget (widget, e.attribute ("id", "#noid#"), num_pages);
}
}
--- 473,478 ----
if (widget) {
playout->addWidget (widget);
! registerWidget (widget, e.attribute ("id", "#noid#"), e.attribute("depend","#free#"),
! num_pages);
}
}
***************
*** 500,506 ****
}
! void RKPlugin::registerWidget (RKPluginWidget *widget, const QString &id, int page) {
widgets.insert (id, widget);
page_map.insert (widget, page);
}
--- 584,591 ----
}
! void RKPlugin::registerWidget (RKPluginWidget *widget, const QString &id , const QString &dep, int page) {
widgets.insert (id, widget);
page_map.insert (widget, page);
+ dependant.insert (id,dep);
}
***************
*** 575,579 ****
} else {
widget = 0;
! RK_DO (qDebug ("Couldn't find value for $%s$!", id.latin1 ()), PLUGIN, DL_ERROR);
return ("#unavailable#");
}
--- 660,664 ----
} else {
widget = 0;
! RK_DO (qDebug ("Couldn't find value for $%s$ !", id.latin1 ()), PLUGIN, DL_ERROR);
return ("#unavailable#");
}
Index: rkplugin.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkplugin.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkplugin.h 2 Sep 2004 10:50:25 -0000 1.5
--- rkplugin.h 14 Mar 2005 17:10:37 -0000 1.6
***************
*** 101,105 ****
typedef QMap<RKPluginWidget*, int> PageMap;
PageMap page_map;
!
/** Called from activated (). builds the GUI */
void buildDialog (const QDomElement &dialog_element, bool wizard_available);
--- 101,108 ----
typedef QMap<RKPluginWidget*, int> PageMap;
PageMap page_map;
!
! typedef QMap<QString, QString> Dependancies;
! Dependancies dependant;
!
/** Called from activated (). builds the GUI */
void buildDialog (const QDomElement &dialog_element, bool wizard_available);
***************
*** 108,112 ****
void buildStructure (const QDomElement &element, QBoxLayout *parent, QWidget *pwidget);
! void registerWidget (RKPluginWidget *widget, const QString &id, int page=0);
QString current_code;
--- 111,115 ----
void buildStructure (const QDomElement &element, QBoxLayout *parent, QWidget *pwidget);
! void registerWidget (RKPluginWidget *widget, const QString &id, const QString &dep, int page=0);
QString current_code;
Index: rkradio.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkradio.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkradio.h 22 Sep 2004 14:06:10 -0000 1.2
--- rkradio.h 14 Mar 2005 17:10:37 -0000 1.3
***************
*** 26,29 ****
--- 26,32 ----
class QRadioButton;
+ #define RADIO_WIDGET 666 // comme la radio pirate de caen
+
+
/** This RKPluginWidget provides a group of radio-buttons.
*@author Thomas Friedrichsmeier
***************
*** 35,44 ****
--- 38,55 ----
RKRadio(const QDomElement &element, QWidget *parent, RKPlugin *plugin);
~RKRadio();
+ void setEnabled(bool);
+ int type() {return RADIO_WIDGET ; };
+ QRadioButton * findLabel(QString);
+ bool isOk (QString) ;
public slots:
void buttonClicked (int id);
+ void active();
+ void active(bool);
+
private:
QButtonGroup *group;
typedef QMap<QRadioButton *, QString> OptionsMap;
OptionsMap options;
+ QString depend;
protected:
/** Returns the value of the currently selected option. */
Index: rkformula.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkformula.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkformula.h 22 Sep 2004 14:06:10 -0000 1.3
--- rkformula.h 14 Mar 2005 17:10:37 -0000 1.4
***************
*** 61,65 ****
QListView *model_view;
QListView *predictors_view;
!
QPushButton *add_button;
QPushButton *remove_button;
--- 61,65 ----
QListView *model_view;
QListView *predictors_view;
! QString depend ;
QPushButton *add_button;
QPushButton *remove_button;
Index: rkvarslot.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkvarslot.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkvarslot.h 22 Sep 2004 14:06:10 -0000 1.3
--- rkvarslot.h 14 Mar 2005 17:10:37 -0000 1.4
***************
*** 44,47 ****
--- 44,50 ----
int getNumVars () { return num_vars; };
QValueList<RKVariable*> getVariables ();
+ int type() {return VARSLOT_WIDGET ;};
+ void setEnabled(bool);
+
public slots:
/** Called when the select-button is pressed */
***************
*** 50,53 ****
--- 53,58 ----
/// find out whether all items are still present, remove items which are no longer present and update text for all others
void objectListChanged ();
+ void active();
+ void active(bool);
private:
QLineEdit *line_edit;
***************
*** 56,60 ****
RKVarSelector *source;
QString source_id;
! int min_vars;
int num_vars;
bool multi;
--- 61,66 ----
RKVarSelector *source;
QString source_id;
! QString depend;
! int min_vars;
int num_vars;
bool multi;
***************
*** 64,68 ****
ItemMap item_map;
void updateState ();
- int type () { return VARSLOT_WIDGET; };
protected:
bool isSatisfied ();
--- 70,73 ----
Index: rkcheckbox.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkcheckbox.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rkcheckbox.h 22 Sep 2004 14:06:10 -0000 1.2
--- rkcheckbox.h 14 Mar 2005 17:10:37 -0000 1.3
***************
*** 22,27 ****
--- 22,31 ----
#include <qstring.h>
+ #define CHECKBOX_WIDGET 51 // comme le pastis
+
+
class QCheckBox;
+
/**
This RKPluginWidget provides a checkbox
***************
*** 34,46 ****
--- 38,61 ----
RKCheckBox (const QDomElement &element, QWidget *parent, RKPlugin *plugin);
~RKCheckBox ();
+ int type() {return CHECKBOX_WIDGET ; };
+ // bool isOk ;
+ void setEnabled(bool);
public slots:
void changedState (int);
+ void active();
+ void active(bool);
+
+
private:
QCheckBox *checkbox;
QString value_if_checked;
QString value_if_unchecked;
+ QString depend;
protected:
/** Returns the value of the currently selected option. */
QString value (const QString &modifier);
+
+ signals: // Signals
+ void clicked();
};
More information about the rkward-tracker
mailing list