]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp
Salome HOME
Update of GUI
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetMultiSelector.cpp
index 33fdafa0aeb9c2fb0a13a075cbf37dadaba72b2f..11c502778c71fce36d3cd975b53af32620064191 100644 (file)
@@ -63,6 +63,7 @@
 #include <QTimer>
 #include <QMainWindow>
 #include <QCheckBox>
+#include <QPushButton>
 
 #include <memory>
 #include <string>
@@ -157,11 +158,6 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen
       }
     }
   }
-  std::string aUseFilters = theData->getProperty("use_filters");
-  if (aUseFilters.length() > 0) {
-    myFiltersWgt = new ModuleBase_FilterStarter(aUseFilters.c_str(), this, theWorkshop);
-    aMainLay->addWidget(myFiltersWgt);
-  }
 
   QString aToolTip = QString::fromStdString(theData->widgetTooltip());
   QString anObjName = QString::fromStdString(attributeID());
@@ -173,6 +169,23 @@ ModuleBase_WidgetMultiSelector::ModuleBase_WidgetMultiSelector(QWidget* theParen
   aMainLay->addWidget(myListView->getControl());
   connect(myTypeCtrl, SIGNAL(valueChanged(int)), this, SLOT(onSelectionTypeChanged()));
 
+  std::string aUseFilters = theData->getProperty("use_filters");
+  if (aUseFilters.length() > 0) {
+    QWidget* aFltrWgt = new QWidget(this);
+    QHBoxLayout* aFltrLayout = new QHBoxLayout(aFltrWgt);
+
+    myFiltersWgt = new ModuleBase_FilterStarter(aUseFilters.c_str(), aFltrWgt, theWorkshop);
+    aFltrLayout->addWidget(myFiltersWgt);
+
+    aFltrLayout->addStretch();
+
+    QPushButton* aShowBtn = new QPushButton(tr("Show only"), aFltrWgt);
+    connect(aShowBtn, SIGNAL(clicked(bool)), SLOT(onShowOnly()));
+    aFltrLayout->addWidget(aShowBtn);
+
+    aMainLay->addWidget(aFltrWgt);
+  }
+
   bool aSameTop = theData->getBooleanAttribute("same_topology", false);
   if (aSameTop) {
     myGeomCheck = new QCheckBox(tr("Add elements that share the same topology"), this);
@@ -1075,3 +1088,8 @@ void ModuleBase_WidgetMultiSelector::onSameTopology(bool theOn)
     updateObject(myFeature);
   }
 }
+
+void ModuleBase_WidgetMultiSelector::onShowOnly()
+{
+
+}