21 #ifndef WORKSPACEPANEL_H
22 #define WORKSPACEPANEL_H
24 #include <QtCore/QAbstractItemModel>
25 #include <QtGui/QFrame>
26 #include <tulip/tulipconf.h>
27 #include <tulip/DataSet.h>
28 #include <tulip/SimplePluginProgress.h>
30 class QDragEnterEvent;
31 class QGraphicsObject;
32 class QPropertyAnimation;
33 class QGraphicsProxyWidget;
34 class QGraphicsRectItem;
44 class GraphHierarchiesModel;
46 class TLP_QT_SCOPE WorkspacePanel :
public QFrame,
public tlp::SimplePluginProgress {
48 Q_PROPERTY(
bool progressMode READ isProgressMode WRITE toggleProgressMode)
50 Ui::WorkspacePanel* _ui;
53 QMap<QAction*, QWidget*> _actionTriggers;
54 QGraphicsRectItem* _overlayRect;
56 QGraphicsProxyWidget* _viewConfigurationWidgets;
57 bool _viewConfigurationExpanded;
58 QGraphicsProxyWidget* _currentInteractorConfigurationItem;
59 QGraphicsObject* _progressItem;
61 QPointF configurationTabPosition(
bool expanded)
const;
62 void setConfigurationTabExpanded(
bool expanded,
bool animate=
true);
65 explicit WorkspacePanel(
tlp::View* view, QWidget* parent=NULL);
66 virtual ~WorkspacePanel();
68 bool eventFilter(QObject *, QEvent *);
71 QString viewName()
const;
72 bool isProgressMode()
const;
75 void toggleProgressMode(
bool p);
78 void setGraphsModel(tlp::GraphHierarchiesModel*);
80 void setOverlayMode(
bool);
84 void swapWithPanels(WorkspacePanel* panel);
87 void hideConfigurationTab();
88 void interactorActionTriggered();
90 void graphComboIndexChanged();
91 void setCurrentInteractorConfigurationVisible(
bool);
94 void scrollInteractorsRight();
95 void scrollInteractorsLeft();
96 void resetInteractorsScrollButtonsVisibility();
99 void progress_handler(
int step,
int max_step);
100 void refreshInteractorsToolbar();
102 void resizeEvent(QResizeEvent *);
104 void dragEnterEvent(QDragEnterEvent *);
105 void dropEvent(QDropEvent *);
106 void dragLeaveEvent(QDragLeaveEvent *);
108 bool handleDragEnterEvent(QEvent* e,
const QMimeData* mimedata);
109 bool handleDropEvent(
const QMimeData* mimedata);
115 #endif // WORKSPACEPANEL_H