20#ifndef MODULEBASE_WIDGETMULTISELECTOR_H_
21#define MODULEBASE_WIDGETMULTISELECTOR_H_
23#include <ModuleBase.h>
24#include <ModuleBase_WidgetSelector.h>
26#include <GeomAPI_Shape.h>
27#include <ModelAPI_Result.h>
29#include <NCollection_List.hxx>
30#include <TopoDS_Shape.hxx>
91 virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
92 const bool theToValidate);
96 virtual void getHighlighted(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
101 virtual bool canProcessAction(ModuleBase_ActionType theActionType,
bool& isActionEnabled);
104 virtual bool processAction(ModuleBase_ActionType theActionType,
105 const ActionParamPtr& theParam = ActionParamPtr());
114 virtual QList<ActionInfo>
actionsList(ModuleBase_ActionType theActionType)
const;
122 virtual void setReadOnly(
bool isReadOnly);
126 void onSelectionTypeChanged();
138 void onListSelection();
140 void onListActivated();
142 void onSameTopology(
bool theOn);
144 void onShowOnly(
bool);
147 void onRemoveFilters();
151 virtual bool processDelete();
164 virtual void appendFirstSelectionInHistory();
168 void appendSelectionInHistory();
171 void clearSelectedHistory();
188 void setCurrentShapeType(
const QString& theShapeType);
196 void updateSelectionList();
200 std::string validatorType(
const QString& theType)
const;
203 void clearSelection();
208 void getSelectedAttributeIndices(std::set<int>& theIndices);
214 void convertIndicesToViewerSelection(std::set<int> theAttributeIds,
215 QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues)
const;
220 virtual bool removeUnusedAttributeObjects(
221 QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
226 std::map<ObjectPtr, std::set<GeomShapePtr> > convertSelection
227 (QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
235 static bool findInSelection(
const ObjectPtr& theObject,
236 GeomShapePtr theShape,
237 const std::map<ObjectPtr, std::set<GeomShapePtr> >& theGeomSelection,
263 std::string myDefMode;
265 QVBoxLayout* myMainLayout;
266 QCheckBox* myGeomCheck;
268 QPushButton* myShowOnlyBtn;
269 QPushButton* myRemoveFiltersBtn;
271 QObjectPtrList myVisibleObjects;
272 QStringList myAllowedObjects;
273 QStringList myTmpAllowed;
274 std::string myUseFilters;
A Choice control.
Definition: ModuleBase_ChoiceCtrl.h:42
An object which lets to start a Filters operation as a sub-operation of the current one.
Definition: ModuleBase_WidgetSelectionFilter.h:54
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
An extension of QListWidget to provide Undo/Redo functionality.
Definition: ModuleBase_ListView.h:94