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
Selection validators improvements
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_ObjectsBrowser.h
diff --git
a/src/XGUI/XGUI_ObjectsBrowser.h
b/src/XGUI/XGUI_ObjectsBrowser.h
index 18c03d2ccb7d3cd241c57738b876d84655d55f52..a1e5c5ef1dd4b5bfbc04684db0424fb5cb07cbef 100644
(file)
--- a/
src/XGUI/XGUI_ObjectsBrowser.h
+++ b/
src/XGUI/XGUI_ObjectsBrowser.h
@@
-3,13
+3,13
@@
#define XGUI_ObjectsBrowser_H
#include "XGUI.h"
#define XGUI_ObjectsBrowser_H
#include "XGUI.h"
-#include
"XGUI_Constants.h"
+#include
<ModuleBase_Definitions.h>
#include <QWidget>
#include <QTreeView>
class XGUI_DocumentDataModel;
#include <QWidget>
#include <QTreeView>
class XGUI_DocumentDataModel;
-class QL
abel
;
+class QL
ineEdit
;
class XGUI_DataTree: public QTreeView
class XGUI_DataTree: public QTreeView
@@
-32,6
+32,9
@@
signals:
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
//! Emited on context menu request
void contextMenuRequested(QContextMenuEvent* theEvent);
+protected slots:
+ virtual void commitData(QWidget* theEditor);
+
protected:
virtual void mouseDoubleClickEvent(QMouseEvent* theEvent);
virtual void contextMenuEvent(QContextMenuEvent* theEvent);
protected:
virtual void mouseDoubleClickEvent(QMouseEvent* theEvent);
virtual void contextMenuEvent(QContextMenuEvent* theEvent);
@@
-61,7
+64,9
@@
public:
XGUI_DocumentDataModel* dataModel() const { return myDocModel; }
//! Returns list of currently selected features
XGUI_DocumentDataModel* dataModel() const { return myDocModel; }
//! Returns list of currently selected features
- QFeatureList selectedFeatures() const { return myTreeView->selectedFeatures(); }
+ QFeatureList selectedFeatures() const { return myFeaturesList; }
+
+ void setFeaturesSelected(const QFeatureList& theFeatures);
//! Returns currently selected indexes
QModelIndexList selectedIndexes() const { return myTreeView->selectionModel()->selectedIndexes(); }
//! Returns currently selected indexes
QModelIndexList selectedIndexes() const { return myTreeView->selectionModel()->selectedIndexes(); }
@@
-70,7
+75,9
@@
public:
XGUI_DataTree* treeView() const { return myTreeView; }
//! Activates currently selected part. Signal activePartChanged will not be sent
XGUI_DataTree* treeView() const { return myTreeView; }
//! Activates currently selected part. Signal activePartChanged will not be sent
- void activateCurrentPart(bool toActivate);
+ void activatePart(const FeaturePtr& thePart);
+
+ void rebuildDataTree();
signals:
//! Emited when selection is changed
signals:
//! Emited when selection is changed
@@
-87,13
+94,24
@@
protected:
private slots:
void onActivePartChanged(FeaturePtr thePart);
private slots:
void onActivePartChanged(FeaturePtr thePart);
+ void onContextMenuRequested(QContextMenuEvent* theEvent);
+ void onLabelContextMenuRequested(const QPoint& thePnt);
+
+ //! Called on Edit command request
+ void onEditItem();
+
+ void onSelectionChanged();
private:
private:
+ void closeDocNameEditing(bool toSave);
+
//! Internal model
XGUI_DocumentDataModel* myDocModel;
//! Internal model
XGUI_DocumentDataModel* myDocModel;
- QL
abel
* myActiveDocLbl;
+ QL
ineEdit
* myActiveDocLbl;
XGUI_DataTree* myTreeView;
XGUI_DataTree* myTreeView;
+
+ QFeatureList myFeaturesList;
};
#endif
\ No newline at end of file
};
#endif
\ No newline at end of file