20 #ifndef XGUI_ObjectsBrowser_H
21 #define XGUI_ObjectsBrowser_H
24 #include <ModuleBase_Definitions.h>
25 #include <ModelAPI_Object.h>
26 #include <ModelAPI_ResultPart.h>
27 #include <ModelAPI_Events.h>
28 #include <ModelAPI_Folder.h>
35 class ModuleBase_IDocumentDataModel;
63 #if (!defined HAVE_SALOME) && (defined WIN32)
64 virtual bool event(
QEvent* theEvent);
79 QString myPreSelectionStyle;
80 QString myNeutralStyle;
81 QString mySelectionStyle;
111 virtual void clear();
115 virtual void commitData(
QWidget* theEditor);
118 void onDoubleClick(
const QModelIndex&);
122 virtual void contextMenuEvent(QContextMenuEvent* theEvent);
125 virtual void resizeEvent(QResizeEvent* theEvent);
128 virtual void mouseReleaseEvent(QMouseEvent* theEvent);
131 virtual void mousePressEvent(QMouseEvent* theEvent);
137 void processHistoryChange(
const QModelIndex& theIndex);
142 void highlightDependencies(
const QModelIndex& theIndex);
146 void processEyeClick(
const QModelIndex& theIndex);
170 QObjectPtrList selectedObjects(QModelIndexList* theIndexes = 0)
const;
174 void setObjectsSelected(
const QObjectPtrList& theObjects);
178 void ensureVisible(
const ObjectPtr theObject);
183 if (myTreeView->selectionModel())
184 return myTreeView->selectionModel()->selectedIndexes();
186 return QModelIndexList();
199 void rebuildDataTree();
210 std::list<bool> getStateForDoc(DocumentPtr theDoc)
const;
215 void setStateForDoc(DocumentPtr theDoc,
const std::list<bool>& theStates);
220 void onSelectionChanged();
225 void updateAllIndexes(
int theColumn = 0,
const QModelIndex& theParent = QModelIndex());
227 QMap<ObjectPtr, bool> getFoldersState(DocumentPtr theDoc)
const;
229 void setFoldersState(
const QMap<ObjectPtr, bool>& theStates);
251 void resizeEvent(QResizeEvent* theEvent);
257 void onContextMenuRequested(QContextMenuEvent* theEvent);
261 void onLabelContextMenuRequested(
const QPoint& thePnt);
264 void onSelectionChanged(
const QItemSelection& theSelected,
const QItemSelection& theDeselected);
266 void onBeforeReset();
268 void onAfterModelReset();
271 QList<ModuleBase_ITreeNode*> expandedItems(
const QModelIndex& theParent = QModelIndex())
const;
281 QList<ModuleBase_ITreeNode*> myExpandedItems;
Class that reads data model definition XML for further processing in the XGUI_DataModel.
Definition: Config_DataModelReader.h:36
Definition: ModuleBase_ITreeNode.h:44
Implementation of root label in Object Browser.
Definition: XGUI_ObjectsBrowser.h:48
void unselect()
On unselect.
Definition: XGUI_ObjectsBrowser.cpp:402
bool eventFilter(QObject *theObj, QEvent *theEvent)
Filter event.
Definition: XGUI_ObjectsBrowser.cpp:380
QTreeView * treePalette() const
Returns tree view.
Definition: XGUI_ObjectsBrowser.h:61
virtual void mouseReleaseEvent(QMouseEvent *e)
On mouse release.
Definition: XGUI_ObjectsBrowser.cpp:390
XGUI_ActiveDocLbl(const QString &theText, QWidget *theParent)
Constructor.
Definition: XGUI_ObjectsBrowser.cpp:319
void setTreeView(QTreeView *theView)
Sets tree view.
Definition: XGUI_ObjectsBrowser.cpp:328
This is a data model for Object Browser (QTreeView).
Definition: XGUI_DataModel.h:46
Implementation of Data Tree object for Object Browser.
Definition: XGUI_ObjectsBrowser.h:93
void contextMenuRequested(QContextMenuEvent *theEvent)
Emitted on context menu request.
Object browser window object.
Definition: XGUI_ObjectsBrowser.h:154
void selectionChanged()
Emitted when selection is changed.
XGUI_DataModel * dataModel() const
Returns Model which provides access to data objects.
Definition: XGUI_ObjectsBrowser.h:163
QLabel * activeDocLabel() const
Returns active doc label object.
Definition: XGUI_ObjectsBrowser.h:196
void headerMouseDblClicked(const QModelIndex &)
Signal is emitted when user clicks with mouse in header label of object browser.
QModelIndexList selectedIndexes() const
Returns currently selected indexes.
Definition: XGUI_ObjectsBrowser.h:181
void sizeChanged()
An signal emitted on resize of the Object Browser.
XGUI_Workshop * workshop() const
Returns current workshop.
Definition: XGUI_ObjectsBrowser.h:218
void contextMenuRequested(QContextMenuEvent *theEvent)
Emitted on context menu request.
XGUI_DataTree * treeView() const
Returns TreeView widget.
Definition: XGUI_ObjectsBrowser.h:190
Class which defines a configuration of the application (Workshop) and launches it.
Definition: XGUI_Workshop.h:83