Salome HOME
It removes commented not used code.
authornds <nds@opencascade.com>
Tue, 15 Dec 2015 06:36:42 +0000 (09:36 +0300)
committernds <nds@opencascade.com>
Tue, 15 Dec 2015 06:36:42 +0000 (09:36 +0300)
15 files changed:
src/ModuleBase/ModuleBase_DoubleSpinBox.cpp
src/ModuleBase/ModuleBase_DoubleSpinBox.h
src/ModuleBase/ModuleBase_IErrorMgr.h
src/ModuleBase/ModuleBase_IntSpinBox.cpp
src/ModuleBase/ModuleBase_IntSpinBox.h
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetExprEditor.cpp
src/ModuleBase/ModuleBase_WidgetExprEditor.h
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/PartSet/PartSet_WidgetPoint2d.cpp
src/PartSet/PartSet_WidgetPoint2dDistance.cpp
src/XGUI/XGUI_ErrorMgr.h
src/XGUI/XGUI_OperationMgr.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

index 0f5ebcfc174799a944039109b358b12adfebc4db..851a74834d659b00d26f77acbe345396c217c0d6 100644 (file)
@@ -59,7 +59,6 @@ const double PSEUDO_ZERO = 1.e-20;
 ModuleBase_DoubleSpinBox::ModuleBase_DoubleSpinBox(QWidget* theParent, int thePrecision)
     : QDoubleSpinBox(theParent),
       myCleared(false),
-      //myIsModified(false),
       myIsEmitKeyPressEvent(false)
 {
   // VSR 01/07/2010: Disable thousands separator for spin box
@@ -78,8 +77,6 @@ ModuleBase_DoubleSpinBox::ModuleBase_DoubleSpinBox(QWidget* theParent, int thePr
 
   connect(lineEdit(), SIGNAL(textChanged( const QString& )), this,
           SLOT(onTextChanged( const QString& )));
-
-  //connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&)));
 }
 
 /*!
@@ -353,24 +350,8 @@ QValidator::State ModuleBase_DoubleSpinBox::validate(QString& str, int& pos) con
 void ModuleBase_DoubleSpinBox::onTextChanged(const QString& )
 {
   myCleared = false;
-  //myIsModified = true;
 }
 
-/*void ModuleBase_DoubleSpinBox::onValueChanged(const QString& theValue)
-{
-  myIsModified = true;
-}
-
-bool ModuleBase_DoubleSpinBox::isModified() const
-{
-  return myIsModified;
-}
-
-void ModuleBase_DoubleSpinBox::clearModified()
-{
-  myIsModified = false;
-}*/
-
 bool ModuleBase_DoubleSpinBox::enableKeyPressEvent(const bool& theEnable)
 {
   bool aPreviousValue = myIsEmitKeyPressEvent;
index d0b20e6ac785cb062d7664b417c86ce53be67595..ec18e3500d8306cc7ab04221f5770bb1fd3f9c1e 100644 (file)
@@ -49,12 +49,6 @@ Q_OBJECT
   /// Validate current value
   virtual QValidator::State validate(QString&, int&) const;
 
-  /// Returns true if the current value is modified by has not been applyed yet
-  //virtual bool isModified() const;
-
-  /// Clears modified state
-  //void clearModified();
-
   /// Change enable/disable internal state to emit key press event
   /// \param theEnable if true, the signal is emitted
   /// \return the previous value
@@ -69,8 +63,6 @@ signals:
  protected slots:
    /// Called on text changed
   virtual void onTextChanged(const QString&);
-  /// Called on value changed
-  //void onValueChanged(const QString& theValue);
 
  protected:
    /// Removes extra trailing zero symbols
@@ -90,8 +82,6 @@ signals:
 
   /// Precision value
   int myPrecision;
-  /// Boolean value whether the spin box content is modified
-  //bool myIsModified;
 };
 
 #endif
index 701a49f80ee58ce649bb3d534aca4e0420c362c2..9f595fdbbf7bb5e5fa97c9467694d7d1cd882f1c 100644 (file)
@@ -34,10 +34,6 @@ public:
   /// \return Currently installed property panel
   ModuleBase_IPropertyPanel* propertyPanel() const { return myPropertyPanel; }
 
-public slots:
-  /// SLOT, that is called after the operation is validated and feature validation errors have changed.
-  //virtual void onValidationStateChanged() = 0;
-
 protected slots:
   /// Process values changed event for processing feature attribute validation errors.
   virtual void onWidgetChanged() = 0;
index 197bfc22e52ebbf6f73c9d3a35a1c3b7e1de72bb..b35755ea9a593a06f94a7469a80d2ec8a6c809e4 100755 (executable)
@@ -8,27 +8,10 @@
 #include <QKeyEvent>
 
 ModuleBase_IntSpinBox::ModuleBase_IntSpinBox(QWidget* theParent)
-: QSpinBox(theParent)//,
-  //myIsModified(false)
+: QSpinBox(theParent)
 {
-  //connect(this, SIGNAL(valueChanged(const QString&)), this, SLOT(onValueChanged(const QString&)));
 }
 
-/*void ModuleBase_IntSpinBox::onValueChanged(const QString& theValue)
-{
-  myIsModified = true;
-}
-
-bool ModuleBase_IntSpinBox::isModified() const
-{
-  return myIsModified;
-}
-
-void ModuleBase_IntSpinBox::clearModified()
-{
-  myIsModified = false;
-}*/
-
 void ModuleBase_IntSpinBox::keyPressEvent(QKeyEvent *theEvent)
 {
   switch (theEvent->key()) {
index 565e437144a724c8cffba088298b555a9cdaaf75..551e5f0b8234bdee8213ff524d8ec4642d2990d1 100755 (executable)
@@ -26,23 +26,9 @@ public:
   explicit ModuleBase_IntSpinBox(QWidget* theParent = 0);
   virtual ~ModuleBase_IntSpinBox() {};
 
-  /// Returns true if the current value is modified by has not been applyed yet
-  //virtual bool isModified() const;
-
-  /// Clears modified state
-  //void clearModified();
-
-protected slots:
-  /// Called on value changed
-  //void onValueChanged(const QString& theValue);
-
 protected:
   /// Called on key press event
   virtual void keyPressEvent(QKeyEvent* theEvent);
-
-private:
-  /// Boolean value whether the spin box content is modified
-  //bool myIsModified;
 };
 
 #endif
index 06cfe0c0496cde8457a649cc5548cca53905badd..bd42f784430dfbe6bad2cc3224e5588556de7eea 100644 (file)
@@ -159,10 +159,8 @@ QList<QWidget*> ModuleBase_WidgetDoubleValue::getControls() const
 bool ModuleBase_WidgetDoubleValue::processEnter()
 {
   bool isModified = getValueState() == ModifiedInPP;
-  //bool isModified = mySpinBox->isModified();
   if (isModified) {
     emit valuesChanged();
-    //mySpinBox->clearModified();
     mySpinBox->selectAll();
   }
   return isModified;
index 431a387f8d69c83bae09a9b73db7db1ad61b6e77..c0e683f89751ae8fd1da7e52c00b5059919ba923 100644 (file)
@@ -36,7 +36,7 @@
 #include <string>
 
 ExpressionEditor::ExpressionEditor(QWidget* theParent)
-: QPlainTextEdit(theParent), myCompletedAndSelected(false), myIsModified(false)
+: QPlainTextEdit(theParent), myCompletedAndSelected(false)
 {
   myCompleter = new QCompleter(this);
   myCompleter->setWidget(this);
@@ -114,8 +114,6 @@ void ExpressionEditor::performCompletion(const QString& theCompletionPrefix)
 
 void ExpressionEditor::keyPressEvent(QKeyEvent* theEvent)
 {
-  bool anIsModified = myIsModified;
-
   if (myCompletedAndSelected && handledCompletedAndSelected(theEvent))
     return;
   myCompletedAndSelected = false;
@@ -173,16 +171,6 @@ QString ExpressionEditor::placeHolderText() const
   return myPlaceHolderText;
 }
 
-bool ExpressionEditor::isModified() const
-{
-  return myIsModified;
-}
-
-void ExpressionEditor::clearModified()
-{
-  myIsModified = false;
-}
-
 void ExpressionEditor::paintEvent( QPaintEvent* theEvent )
 {
   QPlainTextEdit::paintEvent( theEvent );
@@ -214,7 +202,6 @@ void ExpressionEditor::paintEvent( QPaintEvent* theEvent )
 
 void ExpressionEditor::onTextChanged()
 {
-  myIsModified = true;
   emit valueModified();
 }
 
@@ -314,11 +301,9 @@ QList<QWidget*> ModuleBase_WidgetExprEditor::getControls() const
 
 bool ModuleBase_WidgetExprEditor::processEnter()
 {
-  //bool isModified = myEditor->isModified();
   bool isModified = getValueState() == ModifiedInPP;
   if (isModified) {
     emit valuesChanged();
-    //myEditor->clearModified();
     myEditor->selectAll();
   }
   return isModified;
index e05a1ecf4c9451e54a868055ef081c6464662a64..b7af4cfb557921d7da86b7bf1c673ee957f1fe77 100644 (file)
@@ -45,12 +45,6 @@ class ExpressionEditor: public QPlainTextEdit
   /// Returns placeholder list
   QString placeHolderText() const;
 
-  /// Returns true if the current value is modified by has not been applyed yet
-  bool isModified() const;
-
-  /// Clears modified state
-  void clearModified();
-
  public slots:
   /// Insert additional string for completion
   /// \param theCompletion a string to insert
@@ -92,9 +86,6 @@ private:
   QCompleter* myCompleter;
   bool myCompletedAndSelected;
   QString myPlaceHolderText;
-
-  /// Boolean value whether the spin box content is modified
-  bool myIsModified;
 };
 
 /**
index 4cae38f12f8341ae6946221d00cc96c94c92d5a8..308aef0ff7f2dc46f576e137a4c473ddc28f0098 100644 (file)
@@ -143,10 +143,8 @@ QList<QWidget*> ModuleBase_WidgetIntValue::getControls() const
 bool ModuleBase_WidgetIntValue::processEnter()
 {
   bool isModified = getValueState() == ModifiedInPP;
-  //bool isModified = mySpinBox->isModified();
   if (isModified) {
     emit valuesChanged();
-    //mySpinBox->clearModified();
     mySpinBox->selectAll();
   }
   return isModified;
index cd2de7748ade60db1913cc78a28f4686b8588d0a..ccc53c217e1eefce0e9b284d59277496c0690a80 100644 (file)
@@ -515,14 +515,10 @@ void PartSet_WidgetPoint2D::initializeValueByActivate()
 
 bool PartSet_WidgetPoint2D::processEnter()
 {
-  //bool isModified = myXSpin->isModified() || myYSpin->isModified();
   bool isModified = getValueState() == ModifiedInPP;
   if (isModified) {
-    bool isXModified = myXSpin->hasFocus();//myXSpin->isModified();
+    bool isXModified = myXSpin->hasFocus();
     emit valuesChanged();
-    //onValuesChanged();
-    //myXSpin->clearModified();
-    //myYSpin->clearModified();
     if (isXModified)
       myXSpin->selectAll();
     else
index 829380cef043548846458c274782a0df8eecb46f..71d002025927133a3f6ba51a4569b51d237c0420 100644 (file)
@@ -120,11 +120,9 @@ void PartSet_WidgetPoint2dDistance::onMouseMove(ModuleBase_IViewWindow* theWnd,
 
 bool PartSet_WidgetPoint2dDistance::processEnter()
 {
-  //bool isModified = mySpinBox->isModified();
   bool isModified = getValueState() == ModifiedInPP;
   if (isModified) {
     emit valuesChanged();
-    //mySpinBox->clearModified();
     mySpinBox->selectAll();
   }
   return isModified;
index 7295a52a4fd0f4b4e9561112feb5d84e3ae8ee37..7970f6ec00e3a05589afd73fdd7bad3914915a65 100644 (file)
@@ -44,10 +44,6 @@ public:
   /// \param theFeature a feature
   void updateAcceptAllAction(const FeaturePtr& theFeature);
 
-public slots:
-  /// Reimplemented from ModuleBase_ErrorMgr::onValidationStateChanged().
-  //virtual void onValidationStateChanged();
-
 protected slots:
   /// Reimplemented from ModuleBase_ErrorMgr::onWidgetChanged().
   virtual void onWidgetChanged();
index 9015698d582966f93ae001765259990786f6314e..5271d1836bc395f25ddfbf314ccb4864c6742c9c 100644 (file)
@@ -221,7 +221,6 @@ void XGUI_OperationMgr::setApplyEnabled(const bool theEnabled)
   if (aFOperation) {
     workshop()->errorMgr()->updateActions(aFOperation->feature());
   }
-  //emit validationStateChanged(theEnabled);
 }
 
 void XGUI_OperationMgr::updateApplyOfOperations(ModuleBase_Operation* theOperation)
@@ -553,20 +552,6 @@ bool XGUI_OperationMgr::onKeyReleased(QKeyEvent* theEvent)
     case Qt::Key_Return:
     case Qt::Key_Enter: {
       isAccepted = onProcessEnter();
-      /*ModuleBase_Operation* aOperation = currentOperation();
-      ModuleBase_IPropertyPanel* aPanel = aOperation->propertyPanel();
-      ModuleBase_ModelWidget* aActiveWgt = aPanel->activeWidget();
-      if (!aActiveWgt || !aActiveWgt->processEnter()) {
-        if (!myWorkshop->module()->processEnter(aActiveWgt ? aActiveWgt->attributeID() : "")) {
-          ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>(currentOperation());
-          if (!aFOperation || myWorkshop->module()->getFeatureError(aFOperation->feature()).isEmpty()) {
-            emit keyEnterReleased();
-            commitOperation();
-          }
-          else
-            isAccepted = false;
-        }
-      }*/
     }
     break;
     case Qt::Key_N:
index 145ddd36709e752b93dcbafcde9fe65f9cea503d..5f7303a78a29de2cf1a78ba4bdb4661282c790ca 100755 (executable)
@@ -163,8 +163,6 @@ XGUI_Workshop::XGUI_Workshop(XGUI_SalomeConnector* theConnector)
           SLOT(onOperationCommitted(ModuleBase_Operation*)));
   connect(myOperationMgr, SIGNAL(operationAborted(ModuleBase_Operation*)), 
           SLOT(onOperationAborted(ModuleBase_Operation*)));
-  //connect(myOperationMgr, SIGNAL(validationStateChanged(bool)), 
-  //        myErrorMgr, SLOT(onValidationStateChanged()));
 
 #ifndef HAVE_SALOME
   connect(myMainWindow, SIGNAL(exitKeySequence()), SLOT(onExit()));
@@ -396,21 +394,6 @@ void XGUI_Workshop::onAcceptActionClicked()
   }
 }
 
-//******************************************************
-/*void XGUI_Workshop::onValidationStateChanged(bool theEnabled)
-{
-  XGUI_OperationMgr* anOperationMgr = operationMgr();
-  if (anOperationMgr) {
-    ModuleBase_OperationFeature* aFOperation = dynamic_cast<ModuleBase_OperationFeature*>
-                                                    (anOperationMgr->currentOperation());
-    if (aFOperation) {
-      QAction* anAction = myActionsMgr->operationStateAction(XGUI_ActionsMgr::Accept);
-      myErrorMgr->updateActionState(anAction, aFOperation->feature(), theEnabled);
-    }
-  }
-}*/
-
-
 //******************************************************
 void XGUI_Workshop::deactivateActiveObject(const ObjectPtr& theObject, const bool theUpdateViewer)
 {
@@ -1062,8 +1045,6 @@ void XGUI_Workshop::createDockWidgets()
 
   connect(myPropertyPanel, SIGNAL(enterClicked()),
           myOperationMgr,  SLOT(onProcessEnter()));
-  //connect(myOperationMgr,  SIGNAL(validationStateChanged(bool)),
-  //        this, SLOT(onValidationStateChanged(bool)));
 }
 
 //******************************************************
index 1d1fa3fee64bc14fcc6fd586c3a385d904fe9b65..c032b932411363d9a8d69dfaede0effb664ddddb 100755 (executable)
@@ -399,15 +399,6 @@ private:
   /// the operation can be committed and do it if it returns true.
   void onAcceptActionClicked();
 
-  /// Listens the corresponded signal from operation manager and send it with the Ok
-  /// action to operation manager.
-  /// \param theEnabled an enabled state for the action
-  //void onValidationStateChanged(bool theEnabled);
-
-  //connect(myOperationMgr,  SIGNAL(validationStateChanged(bool)),
-  //        aOkAct,          SLOT(setEnabled(bool)));
-
-
  private:
    /// Init menu
   void initMenu();