Salome HOME
Merge branch 'Dev_GroupsRevision'
authorvsv <vsv@opencascade.com>
Mon, 25 Dec 2017 14:42:02 +0000 (17:42 +0300)
committervsv <vsv@opencascade.com>
Mon, 25 Dec 2017 14:42:02 +0000 (17:42 +0300)
# Conflicts:
# src/ModuleBase/CMakeLists.txt
# src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
# src/ModuleBase/ModuleBase_WidgetMultiSelector.h
# src/XGUI/XGUI_pictures.qrc

12 files changed:
1  2 
src/GeomAPI/GeomAPI_Shape.cpp
src/GeomAPI/GeomAPI_Shape.h
src/ModuleBase/CMakeLists.txt
src/ModuleBase/ModuleBase_ModelWidget.h
src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
src/ModuleBase/ModuleBase_WidgetMultiSelector.h
src/XGUI/XGUI_ActionsMgr.h
src/XGUI/XGUI_PropertyPanel.cpp
src/XGUI/XGUI_PropertyPanel.h
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h
src/XGUI/XGUI_pictures.qrc

Simple merge
Simple merge
index a9ad6af4db94df5696357cd77897506d818fc9e5,a849fa00f9409e444d6683f3df9fa21a46a274f9..3e8fc7d4bce53a2b352f7f47d45bad5943ca46d8
@@@ -97,8 -94,8 +97,10 @@@ SET(PROJECT_HEADER
    ModuleBase_IconFactory.h
    ModuleBase_Dialog.h
    ModuleBase_ModelDialogWidget.h
 +  ModuleBase_ActionParameter.h
 +  ModuleBase_ActionIntParameter.h
+   ModuleBase_ChoiceCtrl.h
+   ModuleBase_WidgetNameEdit.h
  )
  
  SET(PROJECT_MOC_HEADERS
index 407a59339fe4b113e0c82ffd3e327636adbca5b2,e59721ff6a18463d13a9fe7b528017b1a77f22d0..48df5b61bb2a5110692ae7320075bb9bae2fcb3a
  //
  
  #include <ModuleBase_WidgetMultiSelector.h>
 -#include <ModuleBase_WidgetShapeSelector.h>
 +
 +#include <ModuleBase_ActionIntParameter.h>
 +#include <ModuleBase_Definitions.h>
 +#include <ModuleBase_Events.h>
 +#include <ModuleBase_IconFactory.h>
 +#include <ModuleBase_IModule.h>
  #include <ModuleBase_ISelection.h>
 -#include <ModuleBase_IWorkshop.h>
 +#include <ModuleBase_ISelectionActivate.h>
+ #include <ModuleBase_IPropertyPanel.h>
  #include <ModuleBase_IViewer.h>
 +#include <ModuleBase_IWorkshop.h>
 +#include <ModuleBase_ListView.h>
  #include <ModuleBase_Tools.h>
 -#include <ModuleBase_Definitions.h>
 -#include <ModuleBase_IModule.h>
  #include <ModuleBase_ViewerPrs.h>
 -#include <ModuleBase_IconFactory.h>
 -#include <ModuleBase_Events.h>
 +#include <ModuleBase_WidgetShapeSelector.h>
+ #include <ModuleBase_ChoiceCtrl.h>
  
  #include <ModelAPI_Data.h>
  #include <ModelAPI_Object.h>
@@@ -133,8 -192,22 +151,8 @@@ ModuleBase_WidgetMultiSelector::ModuleB
    //aMainLay->addWidget(new QLabel(this)); //FIXME(sbh)???
    //aMainLay->setRowMinimumHeight(3, 20);
    //this->setLayout(aMainLay);
-   connect(myTypeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onSelectionTypeChanged()));
+   connect(myTypeCtrl, SIGNAL(valueChanged(int)), this, SLOT(onSelectionTypeChanged()));
  
 -  myCopyAction = ModuleBase_Tools::createAction(QIcon(":pictures/copy.png"), tr("Copy"),
 -                          myWorkshop->desktop(), this, SLOT(onCopyItem()));
 -  myCopyAction->setShortcut(QKeySequence::Copy);
 -  myCopyAction->setEnabled(false);
 -  myListControl->addAction(myCopyAction);
 -
 -  myDeleteAction = ModuleBase_Tools::createAction(QIcon(":pictures/delete.png"), tr("Delete"),
 -                          myWorkshop->desktop(), this, SLOT(onDeleteItem()));
 -  myDeleteAction->setEnabled(false);
 -  myListControl->addAction(myDeleteAction);
 -
 -  myListControl->setContextMenuPolicy(Qt::ActionsContextMenu);
 -  connect(myListControl, SIGNAL(itemSelectionChanged()), SLOT(onListSelection()));
 -
    myIsNeutralPointClear = theData->getBooleanAttribute("clear_in_neutral_point", true);
  }
  
@@@ -427,8 -499,7 +445,7 @@@ bool ModuleBase_WidgetMultiSelector::pr
  QList<QWidget*> ModuleBase_WidgetMultiSelector::getControls() const
  {
    QList<QWidget*> result;
-   //result << myTypeCombo;
 -  result << myListControl;
 +  result << myListView->getControl();
    return result;
  }
  
@@@ -598,17 -666,19 +619,18 @@@ void ModuleBase_WidgetMultiSelector::se
  {
    QString aShapeTypeName;
  
-   for (int idx = 0; idx < myTypeCombo->count(); ++idx) {
-     aShapeTypeName = myTypeCombo->itemText(idx);
+   int idx = 0;
+   foreach (QString aShapeTypeName, myShapeTypes) {
      int aRefType = ModuleBase_Tools::shapeType(aShapeTypeName);
-     if(aRefType == theShapeType && idx != myTypeCombo->currentIndex()) {
+     if(aRefType == theShapeType && idx != myTypeCtrl->value()) {
 -      bool aWasActivated = activateSelectionAndFilters(false);
 +      updateSelectionModesAndFilters(false);
-       bool isBlocked = myTypeCombo->blockSignals(true);
-       myTypeCombo->setCurrentIndex(idx);
-       myTypeCombo->blockSignals(isBlocked);
+       bool isBlocked = myTypeCtrl->blockSignals(true);
+       myTypeCtrl->setValue(idx);
+       myTypeCtrl->blockSignals(isBlocked);
 -      if (aWasActivated)
 -        activateSelectionAndFilters(true);
 +      updateSelectionModesAndFilters(true);
        break;
      }
+     idx++;
    }
  }
  
index f4a155981fc69e822da0d61539aa1b1a0d79eebf,c8dcdf66ffa3fa42e18e427209b2ca25b50c1201..be8bfee91b49e97f17b64547ae34905ea152ba91
  #include <QMap>
  
  class QWidget;
- class QComboBox;
 -class QListWidget;
//class QComboBox;
 +class ModuleBase_ListView;
  class ModuleBase_IWorkshop;
 -class QAction;
+ class ModuleBase_ChoiceCtrl;
  
 -
  /**
  * \ingroup GUI
  * Implementation of widget for shapes selection. This widget provides selection of several shapes.
@@@ -218,10 -216,26 +219,15 @@@ protected
                              ModuleBase_IWorkshop* theWorkshop);
  
  protected:
 -  /// List control
 -  QListWidget* myListControl;
 +  ModuleBase_ListView* myListView; ///< List control
-   QComboBox* myTypeCombo; ///< Combobox of types
-   bool myIsUseChoice; /// A flag to store use_choice parameter state
++
++  bool myIsUseChoice; ///< A flag to store use_choice parameter state
 -  QStringList myShapeTypes;
++  QStringList myShapeTypes; ///< List of Shape types defined in XML
+   /// Control for types
+   ModuleBase_ChoiceCtrl* myTypeCtrl;
  
 -  /// Provides correspondance between Result object and its shape
 -  typedef QPair<ResultPtr, GeomShapePtr> GeomSelection;
 -
 -  /// A copy action for pop-up menu in a list control
 -  QAction* myCopyAction;
 -
 -  /// A delete action for pop-up menu in a list control
 -  QAction* myDeleteAction;
 -
 -  /// A flag to store use_choice parameter state
 -  bool myIsUseChoice;
 -
    /// A flag to clear selection by click in empty place in the viewer
    bool myIsNeutralPointClear;
  
index 89693cbc131da4f0a70aa59dcbb81be053d4c5f4,deeb75433e7ba79ae07ebf18ba042c50ad01a141..3773ae9bac0b423261ac87ee44d34cca0b47fa55
@@@ -56,22 -61,23 +56,23 @@@ class XGUI_EXPORT XGUI_ActionsMgr : pub
    enum OperationStateActionId {
      Abort = 0,
      Accept = 1,
-     Help = 2,
-     AbortAll = 3,
-     AcceptAll = 4,
-     Preview = 5
+     AcceptPlus = 2,
+     Help = 3,
+     AbortAll = 4,
+     AcceptAll = 5,
+     Preview = 6
    };
  
 -  //! Add a command in the manager.
 -  //! Please note that nested commands in the Salome mode (No AppElements_Command, pure QActions)
 -  //! won't be extracted and should be added manually using the addNestedCommands method.
 +  /// Add a command in the manager.
 +  /// Please note that nested commands in the Salome mode (No AppElements_Command, pure QActions)
 +  /// won't be extracted and should be added manually using the addNestedCommands method.
    void addCommand(QAction* theCmd);
  
 -  //! Sets relation between the command (with given Id) and it's nested actions.
 +  /// Sets relation between the command (with given Id) and it's nested actions.
    void addNestedCommands(const QString& theId, const QStringList& theCommands);
  
 -  //! Returns list of nested commands by parent command Id
 -  //! \param theId a parent command Id
 +  /// Returns list of nested commands by parent command Id
 +  /// \param theId a parent command Id
    QStringList nestedCommands(const QString& theId) const;
  
    /// Returns True if the given Id is an Id of nested command
Simple merge
Simple merge
Simple merge
Simple merge
index 14e55f36780dc71be9dbd426a0f08b37e3ed7498,879fa44168e43ce829408a17217999722591e62c..913ca9b006711b083ec2e68edc21483ebeac384f
       <file>pictures/eyeopen.png</file>
  
       <file>pictures/transparency.png</file>
+      <file>pictures/solid32.png</file>
+      <file>pictures/face32.png</file>
+      <file>pictures/edge32.png</file>
+      <file>pictures/vertex32.png</file>
 +     <file>pictures/features_folder.png</file>
 +     <file>pictures/create_folder.png</file>
 +     <file>pictures/insert_folder_after.png</file>
 +     <file>pictures/insert_folder_before.png</file>
 +     <file>pictures/move_out_after.png</file>
 +     <file>pictures/move_out_before.png</file>
 +     <file>pictures/selection.png</file>
   </qresource>
   </RCC>