28 #include <tulip/tulipconf.h>
30 class PlaceHolderWidget;
45 class GraphHierarchiesModel;
48 class TLP_QT_SCOPE Workspace:
public QWidget {
51 Q_PROPERTY(
bool bottomFrameVisible READ isBottomFrameVisible WRITE setBottomFrameVisible)
54 QList<WorkspacePanel*> _panels;
55 int _currentPanelIndex;
56 QWidget* _oldWorkspaceMode;
58 QMap<QWidget*,QVector<PlaceHolderWidget*> > _modeToSlots;
59 QMap<QWidget*,QWidget*> _modeSwitches;
60 GraphHierarchiesModel* _model;
62 QString panelTitle(WorkspacePanel*)
const;
64 QLabel* _pageCountLabel;
65 bool _autoCenterViews;
68 explicit Workspace(QWidget *parent = NULL);
72 QList<tlp::View*> panels()
const;
74 bool isBottomFrameVisible()
const;
78 void switchToStartupMode();
79 void switchToSingleMode();
80 void setSingleModeSwitch(QWidget*);
81 void switchToSplitMode();
82 void setSplitModeSwitch(QWidget*);
83 void switchToSplit3Mode();
84 void setSplit3ModeSwitch(QWidget*);
85 void switchToSplit32Mode();
86 void setSplit32ModeSwitch(QWidget*);
87 void switchToGridMode();
88 void setGridModeSwitch(QWidget*);
89 void switchToSixMode();
90 void setSixModeSwitch(QWidget*);
94 void setExposeModeSwitch(QPushButton *);
96 void showExposeMode();
97 void hideExposeMode();
100 void setModel(tlp::GraphHierarchiesModel*);
105 void setBottomFrameVisible(
bool);
106 void setPageCountLabel(QLabel* l);
108 void redrawPanels(
bool center=
false);
110 void setAutoCenterPanelsOnDraw(
bool);
115 void importGraphRequest();
118 void viewNeedsDraw();
119 void switchWorkspaceMode(QWidget* page);
120 void panelDestroyed(QObject*);
121 void updatePageCountLabel();
122 void updateAvailableModes();
124 void uncheckExposeButton();
125 QWidget* suitableMode(QWidget* oldMode);
126 WorkspacePanel* panelForScene(QObject* obj);
127 void swapPanelsRequested(WorkspacePanel* panel);
128 void updateStartupMode();
131 virtual void dragEnterEvent(QDragEnterEvent* event);
132 virtual void dropEvent(QDropEvent* event);
134 bool handleDragEnterEvent(QEvent* e,
const QMimeData* mimedata);
135 bool handleDropEvent(
const QMimeData* mimedata);
137 bool eventFilter(QObject *, QEvent *);
139 QWidget* currentModeWidget()
const;
140 QVector<PlaceHolderWidget*> currentModeSlots()
const;
141 unsigned int currentSlotsCount()
const;
145 #endif // WORKSPACE_H