Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial iteration for storage the back references and making concealment only on...
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_ObjectsBrowser.h
diff --git
a/src/XGUI/XGUI_ObjectsBrowser.h
b/src/XGUI/XGUI_ObjectsBrowser.h
index f9ae1fed396eebd1d8cd0c67675848eb252b04f1..ebcaffe08ef30deee9dfd8b56a8cf1e295f5d7a3 100644
(file)
--- a/
src/XGUI/XGUI_ObjectsBrowser.h
+++ b/
src/XGUI/XGUI_ObjectsBrowser.h
@@
-1,9
+1,11
@@
-
#ifndef XGUI_ObjectsBrowser_H
#define XGUI_ObjectsBrowser_H
#include "XGUI.h"
#ifndef XGUI_ObjectsBrowser_H
#define XGUI_ObjectsBrowser_H
#include "XGUI.h"
-#include "XGUI_Constants.h"
+#include <ModuleBase_Definitions.h>
+#include <ModelAPI_Object.h>
+#include <ModelAPI_ResultPart.h>
+#include <ModelAPI_Events.h>
#include <QWidget>
#include <QTreeView>
#include <QWidget>
#include <QTreeView>
@@
-11,87
+13,104
@@
class XGUI_DocumentDataModel;
class QLineEdit;
class XGUI_DocumentDataModel;
class QLineEdit;
-
-class XGUI_DataTree: public QTreeView
+class XGUI_DataTree : public QTreeView
{
{
-
Q_OBJECT
-public:
+Q_OBJECT
+
public:
XGUI_DataTree(QWidget* theParent);
virtual ~XGUI_DataTree();
XGUI_DataTree(QWidget* theParent);
virtual ~XGUI_DataTree();
- //! Returns list of currently selected features
- QFeatureList selectedFeatures() const { return mySelectedData; }
+ //! Returns list of currently selected objects
+ QList<ObjectPtr> selectedObjects() const
+ {
+ return mySelectedData;
+ }
XGUI_DocumentDataModel* dataModel() const;
signals:
//! Emited when selection is changed
void selectionChanged();
XGUI_DocumentDataModel* dataModel() const;
signals:
//! Emited when selection is changed
void selectionChanged();
- void activePartChanged(
FeaturePtr thePart);
-
+ void activePartChanged(
ObjectPtr thePart);
+
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
-protected slots:
+
protected slots:
virtual void commitData(QWidget* theEditor);
virtual void commitData(QWidget* theEditor);
-protected:
+
protected:
virtual void mouseDoubleClickEvent(QMouseEvent* theEvent);
virtual void contextMenuEvent(QContextMenuEvent* theEvent);
virtual void mouseDoubleClickEvent(QMouseEvent* theEvent);
virtual void contextMenuEvent(QContextMenuEvent* theEvent);
-private slots:
+
private slots:
//! Called when selection in Data Tree is changed
void onSelectionChanged(const QItemSelection& theSelected, const QItemSelection& theDeselected);
//! Called when selection in Data Tree is changed
void onSelectionChanged(const QItemSelection& theSelected, const QItemSelection& theDeselected);
-private:
+
private:
//! List of currently selected data
//! List of currently selected data
- Q
FeatureList
mySelectedData;
+ Q
List<ObjectPtr>
mySelectedData;
};
};
-
/**\class XGUI_ObjectsBrowser
* \ingroup GUI
* \brief Object browser window object. Represents data tree of current data structure
*/
/**\class XGUI_ObjectsBrowser
* \ingroup GUI
* \brief Object browser window object. Represents data tree of current data structure
*/
-
class XGUI_EXPORT XGUI_ObjectsBrowser : public QWidget
+class XGUI_EXPORT XGUI_ObjectsBrowser : public QWidget
{
{
-
Q_OBJECT
-public:
+Q_OBJECT
+
public:
XGUI_ObjectsBrowser(QWidget* theParent);
virtual ~XGUI_ObjectsBrowser();
//! Returns Model which provides access to data objects
XGUI_ObjectsBrowser(QWidget* theParent);
virtual ~XGUI_ObjectsBrowser();
//! Returns Model which provides access to data objects
- XGUI_DocumentDataModel* dataModel() const { return myDocModel; }
+ XGUI_DocumentDataModel* dataModel() const
+ {
+ return myDocModel;
+ }
- //! Returns list of currently selected features
- QFeatureList selectedFeatures() const { return myFeaturesList; }
+ //! Returns list of currently selected objects
+ QList<ObjectPtr> selectedObjects() const
+ {
+ return myObjectsList;
+ }
+
+ void setObjectsSelected(const QList<ObjectPtr>& theObjects);
//! Returns currently selected indexes
//! Returns currently selected indexes
- QModelIndexList selectedIndexes() const { return myTreeView->selectionModel()->selectedIndexes(); }
+ QModelIndexList selectedIndexes() const
+ {
+ return myTreeView->selectionModel()->selectedIndexes();
+ }
//! Returns TreeView widget
//! Returns TreeView widget
- XGUI_DataTree* treeView() const { return myTreeView; }
+ XGUI_DataTree* treeView() const
+ {
+ return myTreeView;
+ }
//! Activates currently selected part. Signal activePartChanged will not be sent
//! Activates currently selected part. Signal activePartChanged will not be sent
- void activatePart(const
Feature
Ptr& thePart);
+ void activatePart(const
ResultPart
Ptr& thePart);
void rebuildDataTree();
void rebuildDataTree();
+ void processEvent(const boost::shared_ptr<Events_Message>& theMessage);
+
signals:
//! Emited when selection is changed
void selectionChanged();
//! Emited when current active document is changed
signals:
//! Emited when selection is changed
void selectionChanged();
//! Emited when current active document is changed
- void activePartChanged(
FeaturePtr thePart);
-
+ void activePartChanged(
ObjectPtr thePart);
+
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
-protected:
+
protected:
virtual bool eventFilter(QObject* obj, QEvent* theEvent);
virtual bool eventFilter(QObject* obj, QEvent* theEvent);
-private slots:
- void onActivePartChanged(
Feature
Ptr thePart);
+
private slots:
+ void onActivePartChanged(
Object
Ptr thePart);
void onContextMenuRequested(QContextMenuEvent* theEvent);
void onLabelContextMenuRequested(const QPoint& thePnt);
void onContextMenuRequested(QContextMenuEvent* theEvent);
void onLabelContextMenuRequested(const QPoint& thePnt);
@@
-100,7
+119,7
@@
private slots:
void onSelectionChanged();
void onSelectionChanged();
-private:
+
private:
void closeDocNameEditing(bool toSave);
//! Internal model
void closeDocNameEditing(bool toSave);
//! Internal model
@@
-109,7
+128,7
@@
private:
QLineEdit* myActiveDocLbl;
XGUI_DataTree* myTreeView;
QLineEdit* myActiveDocLbl;
XGUI_DataTree* myTreeView;
- Q
FeatureList myFeature
sList;
+ Q
List<ObjectPtr> myObject
sList;
};
};
-#endif
\ No newline at end of file
+#endif