[rkward-cvs] rkward/rkward/plugin rkcheckbox.cpp,1.3,1.4 rkcheckbox.h,1.4,1.5 rkformula.cpp,1.6,1.7 rkformula.h,1.4,1.5 rkplugin.cpp,1.13,1.14 rkpluginspinbox.cpp,1.4,1.5 rkpluginspinbox.h,1.3,1.4 rkradio.cpp,1.3,1.4 rkradio.h,1.3,1.4 rktext.h,1.2,1.3 rkvarselector.cpp,1.10,1.11 rkvarselector.h,1.5,1.6 rkvarslot.cpp,1.6,1.7 rkvarslot.h,1.4,1.5

Pierre ecoch at users.sourceforge.net
Sat Mar 26 10:32:20 UTC 2005


Update of /cvsroot/rkward/rkward/rkward/plugin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30913/rkward/plugin

Modified Files:
	rkcheckbox.cpp rkcheckbox.h rkformula.cpp rkformula.h 
	rkplugin.cpp rkpluginspinbox.cpp rkpluginspinbox.h rkradio.cpp 
	rkradio.h rktext.h rkvarselector.cpp rkvarselector.h 
	rkvarslot.cpp rkvarslot.h 
Log Message:
Modifs by Adrien + various pre-release stuff

Index: rkvarselector.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkvarselector.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** rkvarselector.h	14 Mar 2005 17:10:37 -0000	1.5
--- rkvarselector.h	26 Mar 2005 10:32:17 -0000	1.6
***************
*** 54,59 ****
  public slots:
  	void objectListChanged ();
!   void active();
!   void active(bool);
  private:
  	RKObjectListView *list_view;
--- 54,59 ----
  public slots:
  	void objectListChanged ();
!   void slotActive();
!   void slotActive(bool);
  private:
  	RKObjectListView *list_view;

Index: rkradio.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkradio.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkradio.cpp	14 Mar 2005 17:10:37 -0000	1.3
--- rkradio.cpp	26 Mar 2005 10:32:17 -0000	1.4
***************
*** 89,102 ****
  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) ;
  }
  
--- 89,105 ----
  void RKRadio::setEnabled(bool checked){
    group->setEnabled(checked);
+   label->setEnabled(checked);
    }
  
  
! void RKRadio::slotActive(){
  bool isOk = group->isEnabled();
  group->setEnabled(! isOk) ;
+ label->setEnabled(! isOk) ;
  }
  
! void RKRadio::slotActive(bool isOk){
  group->setEnabled(isOk) ;
+ label->setEnabled(isOk) ;
  }
  

Index: rkformula.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkformula.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** rkformula.cpp	14 Mar 2005 17:10:37 -0000	1.6
--- rkformula.cpp	26 Mar 2005 10:32:17 -0000	1.7
***************
*** 462,464 ****
--- 462,479 ----
  }
  
+ void RKFormula::setEnabled(bool checked){
+ type_selector->setEnabled(checked);
+ }
+ 
+ void RKFormula::slotActive(){
+   bool isOk = type_selector->isEnabled();
+   type_selector->setEnabled(! isOk);
+ }
+ 
+ void RKFormula::slotActive(bool isOk){
+   type_selector->setEnabled( isOk);
+   }
+ 
+ 
+ 
  #include "rkformula.moc"

Index: rkvarselector.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkvarselector.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** rkvarselector.cpp	14 Mar 2005 17:10:37 -0000	1.10
--- rkvarselector.cpp	26 Mar 2005 10:32:17 -0000	1.11
***************
*** 112,121 ****
    }
  
! void RKVarSelector::active(){
  bool isOk = list_view->isEnabled();
  list_view->setEnabled(! isOk) ;
  }
  
! void RKVarSelector::active(bool isOk){
  list_view->setEnabled(isOk) ;
  }
--- 112,121 ----
    }
  
! void RKVarSelector::slotActive(){
  bool isOk = list_view->isEnabled();
  list_view->setEnabled(! isOk) ;
  }
  
! void RKVarSelector::slotActive(bool isOk){
  list_view->setEnabled(isOk) ;
  }

Index: rkpluginspinbox.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkpluginspinbox.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkpluginspinbox.h	14 Mar 2005 17:10:37 -0000	1.3
--- rkpluginspinbox.h	26 Mar 2005 10:32:17 -0000	1.4
***************
*** 22,25 ****
--- 22,26 ----
  
  class RKSpinBox;
+ class QLabel ;
  
  /**
***************
*** 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;
  };
  
--- 34,50 ----
  	~RKPluginSpinBox();
  	QString value (const QString &modifier);
!   	QLabel * label ;
!   	int type() {return SPINBOX_WIDGET ;} ;
!   	void setEnabled(bool);
! 	void adjust(int, int);
  public slots:
  	void valueChanged (int);
!   	void slotActive();
!   	void slotActive(bool);
    
  private:
  	RKSpinBox *spinbox;
!   	QString depend;
! 	QString size;
  };
  

Index: rktext.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rktext.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rktext.h	22 Sep 2004 14:06:10 -0000	1.2
--- rktext.h	26 Mar 2005 10:32:17 -0000	1.3
***************
*** 19,22 ****
--- 19,23 ----
  #define RKTEXT_H
  
+ 
  #include <rkpluginwidget.h>
  
***************
*** 26,31 ****
  
  class RKText : public RKPluginWidget  {
! public: 
  	RKText(const QDomElement &element, QWidget *parent, RKPlugin *plugin);
  	~RKText();
  };
--- 27,33 ----
  
  class RKText : public RKPluginWidget  {
! public:
  	RKText(const QDomElement &element, QWidget *parent, RKPlugin *plugin);
+  
  	~RKText();
  };

Index: rkvarslot.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkvarslot.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** rkvarslot.cpp	14 Mar 2005 17:10:37 -0000	1.6
--- rkvarslot.cpp	26 Mar 2005 10:32:17 -0000	1.7
***************
*** 270,274 ****
      }
  
! void RKVarSlot::active(){
    bool isOk = line_edit->isEnabled();
    line_edit->setEnabled(! isOk) ;
--- 270,274 ----
      }
  
! void RKVarSlot::slotActive(){
    bool isOk = line_edit->isEnabled();
    line_edit->setEnabled(! isOk) ;
***************
*** 276,280 ****
  }
  
! void RKVarSlot::active(bool isOk){
    line_edit->setEnabled(isOk) ;
    select->setEnabled(isOk) ;
--- 276,280 ----
  }
  
! void RKVarSlot::slotActive(bool isOk){
    line_edit->setEnabled(isOk) ;
    select->setEnabled(isOk) ;

Index: rkpluginspinbox.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkpluginspinbox.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkpluginspinbox.cpp	14 Mar 2005 17:10:37 -0000	1.4
--- rkpluginspinbox.cpp	26 Mar 2005 10:32:17 -0000	1.5
***************
*** 40,43 ****
--- 40,48 ----
  	connect (spinbox, SIGNAL (valueChanged (int)), this, SLOT (valueChanged (int)));
  	vbox->addWidget (spinbox);
+ 	size = element.attribute ("size", "small");
+ 	if (size=="small"){
+ 	spinbox->setMaximumWidth(100);
+ 	spinbox->setMinimumWidth(100);
+ 	}
  }
  
***************
*** 47,50 ****
--- 52,56 ----
  void RKPluginSpinBox::setEnabled(bool checked){
    spinbox->setEnabled(checked);
+   label->setEnabled(checked);
    }
  
***************
*** 57,66 ****
  }
  
! void RKPluginSpinBox::active(){
  bool isOk = spinbox->isEnabled();
  spinbox->setEnabled(! isOk) ;
  }
  
! void RKPluginSpinBox::active(bool isOk){
  spinbox->setEnabled( isOk) ;
  }
--- 63,80 ----
  }
  
! void RKPluginSpinBox::slotActive(){
  bool isOk = spinbox->isEnabled();
  spinbox->setEnabled(! isOk) ;
+ label->setEnabled(! isOk);
  }
  
! void RKPluginSpinBox::slotActive(bool isOk){
  spinbox->setEnabled( isOk) ;
+ label->setEnabled(isOk);
  }
+ void RKPluginSpinBox::adjust(int longueur, int largeur){
+ qDebug("coucou, c'est moi");
+ spinbox->resize(longueur, largeur);
+ }
+ 
+ 

Index: rkplugin.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkplugin.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** rkplugin.cpp	14 Mar 2005 17:10:37 -0000	1.13
--- rkplugin.cpp	26 Mar 2005 10:32:17 -0000	1.14
***************
*** 54,57 ****
--- 54,60 ----
  #include "rkpluginspinbox.h"
  #include "rkformula.h"
+ #include "rknote.h"
+ #include "rkinput.h"
+ #include "rkpluginbrowser.h"
  
  #include "../rkglobals.h"
***************
*** 296,300 ****
                  };
                 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") ;
                 };
--- 299,303 ----
                  };
                 qDebug ("Connecting %s to %s",slave.key().latin1(),master.key().latin1()) ;
!                connect( (RKCheckBox *) master.data(), SIGNAL(clicked()) ,(RKCheckBox *)   slave.data(), SLOT(slotActive()));
                 qDebug ("You are very right to choose me OK") ;
                 };
***************
*** 310,314 ****
  //              qDebug ("Yes it is") ;
                if (! temp->isOk(it.data()) ) slave.data()->setEnabled(false );
!               connect(  sol , SIGNAL(toggled(bool)) ,  slave.data(), SLOT(active(bool)));
                };
              }
--- 313,317 ----
  //              qDebug ("Yes it is") ;
                if (! temp->isOk(it.data()) ) slave.data()->setEnabled(false );
!               connect(  sol , SIGNAL(toggled(bool)) ,  slave.data(), SLOT(slotActive(bool)));
                };
              }
***************
*** 328,332 ****
  	wizard_stack = new QWidgetStack (main_widget);
  	main_grid->addMultiCellWidget (wizard_stack, 0, 0, 0, 3);
! 	
  	QDomNodeList pages = wizard_element.childNodes ();
  	for (unsigned int p=0; p < pages.count (); ++p) {
--- 331,335 ----
  	wizard_stack = new QWidgetStack (main_widget);
  	main_grid->addMultiCellWidget (wizard_stack, 0, 0, 0, 3);
! 
  	QDomNodeList pages = wizard_element.childNodes ();
  	for (unsigned int p=0; p < pages.count (); ++p) {
***************
*** 362,366 ****
  	line = new QFrame (main_widget);
  	line->setFrameShape (QFrame::HLine);
! 	line->setFrameShadow (QFrame::Plain);	
  	main_grid->addMultiCellWidget (line, 1, 1, 0, 3);
  
--- 365,369 ----
  	line = new QFrame (main_widget);
  	line->setFrameShape (QFrame::HLine);
! 	line->setFrameShadow (QFrame::Plain);
  	main_grid->addMultiCellWidget (line, 1, 1, 0, 3);
  
***************
*** 379,387 ****
  	connect (cancelButton, SIGNAL (clicked ()), this, SLOT (cancel ()));
  	connect (helpButton, SIGNAL (clicked ()), this, SLOT (help ()));
! 	
  	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;
--- 382,390 ----
  	connect (cancelButton, SIGNAL (clicked ()), this, SLOT (cancel ()));
  	connect (helpButton, SIGNAL (clicked ()), this, SLOT (help ()));
! 
  	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;
***************
*** 400,404 ****
                  slave.data()->setEnabled(false );
                  };
!                connect( (RKCheckBox *) master.data(), SIGNAL(clicked()) ,  slave.data(), SLOT(active()));
                 qDebug ("You are very right to choose me OK") ;
                 };
--- 403,407 ----
                  slave.data()->setEnabled(false );
                  };
!                connect( (RKCheckBox *) master.data(), SIGNAL(clicked()) ,  slave.data(), SLOT(slotActive()));
                 qDebug ("You are very right to choose me OK") ;
                 };
***************
*** 414,418 ****
  //              qDebug ("Yes it is") ;
                if (! temp->isOk(it.data()) ) slave.data()->setEnabled(false );
!               connect(  sol , SIGNAL(toggled(bool)) ,  slave.data(), SLOT(active(bool)));
                };
              }
--- 417,421 ----
  //              qDebug ("Yes it is") ;
                if (! temp->isOk(it.data()) ) slave.data()->setEnabled(false );
!               connect(  sol , SIGNAL(toggled(bool)) ,  slave.data(), SLOT(slotActive(bool)));
                };
              }
***************
*** 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") {
--- 464,468 ----
  		} 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") {
***************
*** 467,470 ****
--- 470,479 ----
  		} else if (e.tagName () == "formula") {
  			widget = new RKFormula (e, pwidget, this);
+ 		} else if (e.tagName () == "note") {
+ 			widget = new RKNote (e, pwidget, this);
+ 		} else if (e.tagName () == "browser") {
+ 			widget = new RKPluginBrowser (e, pwidget, this);
+ 		} else if (e.tagName () == "input") {
+ 			widget = new RKInput (e, pwidget, this);
  		} else {
  			widget = new RKText (e, pwidget, this);
***************
*** 585,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);
  }
  
--- 594,601 ----
  
  void RKPlugin::registerWidget (RKPluginWidget *widget, const QString &id , const QString &dep, int page) {
+ 	qDebug("inserting widget %s",id.latin1());
  	widgets.insert (id, widget);
  	page_map.insert (widget, page);
! 	dependant.insert (id,dep);
  }
  
***************
*** 655,658 ****
--- 665,669 ----
  QString RKPlugin::getVar (const QString &id) {
  	QString ident = id.section (".", 0, 0);
+ 	qDebug("searching fo %s",ident.latin1());
  	RKPluginWidget *widget;
  	if (widgets.contains (ident)) {

Index: rkradio.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkradio.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkradio.h	14 Mar 2005 17:10:37 -0000	1.3
--- rkradio.h	26 Mar 2005 10:32:17 -0000	1.4
***************
*** 25,28 ****
--- 25,29 ----
  class QButtonGroup;
  class QRadioButton;
+ class QLabel ;
  
  #define RADIO_WIDGET 666 // comme la radio pirate de caen
***************
*** 42,49 ****
    QRadioButton * findLabel(QString);
    bool isOk (QString) ;
! public slots:
  	void buttonClicked (int id);
!   void active();
!   void active(bool);
    
  private:
--- 43,50 ----
    QRadioButton * findLabel(QString);
    bool isOk (QString) ;
!   public slots:
  	void buttonClicked (int id);
!   void slotActive();
!   void slotActive(bool);
    
  private:
***************
*** 52,55 ****
--- 53,57 ----
  	OptionsMap options;
    QString depend;
+   QLabel * label ;
  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.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkformula.h	14 Mar 2005 17:10:37 -0000	1.4
--- rkformula.h	26 Mar 2005 10:32:17 -0000	1.5
***************
*** 39,44 ****
  public:
      RKFormula(const QDomElement &element, QWidget *parent, RKPlugin *plugin);
- 
      ~RKFormula();
  public slots:
  	void typeChange (int id);
--- 39,45 ----
  public:
      RKFormula(const QDomElement &element, QWidget *parent, RKPlugin *plugin);
      ~RKFormula();
+   void  setEnabled(bool);
+ 
  public slots:
  	void typeChange (int id);
***************
*** 46,51 ****
  	void removeButtonClicked ();
  	void factorsChanged ();
  private:
! 	QString model_string;
  	QString table_string;
  	bool multitable;
--- 47,55 ----
  	void removeButtonClicked ();
  	void factorsChanged ();
+   void slotActive();
+   void slotActive(bool);
+ 
  private:
!  QString model_string;
  	QString table_string;
  	bool multitable;
***************
*** 61,65 ****
  	QListView *model_view;
  	QListView *predictors_view;
!    QString depend ; 
  	QPushButton *add_button;
  	QPushButton *remove_button;
--- 65,69 ----
  	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.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkvarslot.h	14 Mar 2005 17:10:37 -0000	1.4
--- rkvarslot.h	26 Mar 2005 10:32:17 -0000	1.5
***************
*** 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;
--- 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 slotActive();
!   void slotActive(bool);
  private:
  	QLineEdit *line_edit;

Index: rkcheckbox.h
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkcheckbox.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** rkcheckbox.h	17 Mar 2005 07:37:41 -0000	1.4
--- rkcheckbox.h	26 Mar 2005 10:32:17 -0000	1.5
***************
*** 22,26 ****
  #include <qstring.h>
  
! #define CHECKBOX_WIDGET 1
  
  
--- 22,26 ----
  #include <qstring.h>
  
! #define CHECKBOX_WIDGET 51 // comme le pastis
  
  
***************
*** 40,48 ****
  	int type() {return CHECKBOX_WIDGET ; };
  //  bool isOk ;
!   void setEnabled(bool);
  public slots:
  	void changedState (int);
!   void active();
!   void active(bool);
  
    
--- 40,48 ----
  	int type() {return CHECKBOX_WIDGET ; };
  //  bool isOk ;
! 	void setEnabled(bool);
  public slots:
  	void changedState (int);
! 	void slotActive();
! 	void slotActive(bool);
  
    
***************
*** 51,55 ****
  	QString value_if_checked;
  	QString value_if_unchecked;
!   QString depend;
  protected:
  /** Returns the value of the currently selected option. */
--- 51,55 ----
  	QString value_if_checked;
  	QString value_if_unchecked;
! 	QString depend;
  protected:
  /** Returns the value of the currently selected option. */
***************
*** 57,61 ****
  
  signals: // Signals
!   void clicked();
  };
  
--- 57,61 ----
  
  signals: // Signals
! 	void clicked();
  };
  

Index: rkcheckbox.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/plugin/rkcheckbox.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** rkcheckbox.cpp	14 Mar 2005 17:10:36 -0000	1.3
--- rkcheckbox.cpp	26 Mar 2005 10:32:17 -0000	1.4
***************
*** 66,75 ****
  }
  
! void RKCheckBox::active(bool isOk){
  checkbox->setEnabled(isOk) ;
  }
  
!   
! void RKCheckBox::active(){
  bool isOk = checkbox->isEnabled();
  checkbox->setEnabled(! isOk) ;
--- 66,75 ----
  }
  
! void RKCheckBox::slotActive(bool isOk){
  checkbox->setEnabled(isOk) ;
  }
  
! 
! void RKCheckBox::slotActive(){
  bool isOk = checkbox->isEnabled();
  checkbox->setEnabled(! isOk) ;





More information about the rkward-tracker mailing list