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>
34 #include <QStringList>
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);
148 virtual bool processDelete();
161 virtual void appendFirstSelectionInHistory();
165 void appendSelectionInHistory();
168 void clearSelectedHistory();
185 void setCurrentShapeType(
const QString& theShapeType);
193 void updateSelectionList();
197 std::string validatorType(
const QString& theType)
const;
200 void clearSelection();
205 void getSelectedAttributeIndices(std::set<int>& theIndices);
211 void convertIndicesToViewerSelection(std::set<int> theAttributeIds,
212 QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues)
const;
217 virtual bool removeUnusedAttributeObjects(
218 QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
223 std::map<ObjectPtr, std::set<GeomShapePtr> > convertSelection
224 (QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues);
232 static bool findInSelection(
const ObjectPtr& theObject,
233 GeomShapePtr theShape,
234 const std::map<ObjectPtr, std::set<GeomShapePtr> >& theGeomSelection,
260 std::string myDefMode;
262 QVBoxLayout* myMainLayout;
263 QCheckBox* myGeomCheck;
265 QPushButton* myShowOnlyBtn;
267 QObjectPtrList myVisibleObjects;
268 QStringList myAllowedObjects;
269 QStringList myTmpAllowed;
270 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