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 switchToSplit33Mode();
88 void setSplit33ModeSwitch(QWidget*);
89 void switchToGridMode();
90 void setGridModeSwitch(QWidget*);
91 void switchToSixMode();
92 void setSixModeSwitch(QWidget*);
96 void setExposeModeSwitch(QPushButton *);
98 void showExposeMode();
99 void hideExposeMode();
102 void setModel(tlp::GraphHierarchiesModel*);
103 tlp::GraphHierarchiesModel* graphModel()
const;
108 void setBottomFrameVisible(
bool);
109 void setPageCountLabel(QLabel* l);
111 void redrawPanels(
bool center=
false);
113 void setAutoCenterPanelsOnDraw(
bool);
118 void importGraphRequest();
121 void viewNeedsDraw();
122 void switchWorkspaceMode(QWidget* page);
123 void panelDestroyed(QObject*);
124 void updatePageCountLabel();
125 void updateAvailableModes();
127 void uncheckExposeButton();
128 QWidget* suitableMode(QWidget* oldMode);
129 WorkspacePanel* panelForScene(QObject* obj);
130 void swapPanelsRequested(WorkspacePanel* panel);
131 void updateStartupMode();
135 virtual void dragEnterEvent(QDragEnterEvent* event);
136 virtual void dropEvent(QDropEvent* event);
138 bool handleDragEnterEvent(QEvent* e,
const QMimeData* mimedata);
139 bool handleDropEvent(
const QMimeData* mimedata);
141 bool eventFilter(QObject *, QEvent *);
143 QWidget* currentModeWidget()
const;
144 QVector<PlaceHolderWidget*> currentModeSlots()
const;
145 unsigned int currentSlotsCount()
const;
149 #endif // WORKSPACE_H