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;
57 WorkspacePanel *_focusedPanel;
58 bool _focusedPanelHighlighting;
60 QMap<QWidget *, QVector<PlaceHolderWidget *>> _modeToSlots;
61 QMap<QWidget *, QWidget *> _modeSwitches;
62 GraphHierarchiesModel *_model;
64 QString panelTitle(WorkspacePanel *)
const;
66 bool _autoCenterViews;
69 explicit Workspace(QWidget *parent =
nullptr);
70 ~Workspace()
override;
73 QList<tlp::View *> panels()
const;
75 bool isBottomFrameVisible()
const;
79 void switchToStartupMode();
80 void switchToSingleMode();
81 void setSingleModeSwitch(QWidget *);
82 void switchToSplitMode();
83 void setSplitModeSwitch(QWidget *);
84 void switchToSplitHorizontalMode();
85 void setSplitHorizontalModeSwitch(QWidget *);
86 void switchToSplit3Mode();
87 void setSplit3ModeSwitch(QWidget *);
88 void switchToSplit32Mode();
89 void setSplit32ModeSwitch(QWidget *);
90 void switchToSplit33Mode();
91 void setSplit33ModeSwitch(QWidget *);
92 void switchToGridMode();
93 void setGridModeSwitch(QWidget *);
94 void switchToSixMode();
95 void setSixModeSwitch(QWidget *);
99 void setExposeModeSwitch(QPushButton *);
101 void showExposeMode();
102 void hideExposeMode();
105 void setModel(tlp::GraphHierarchiesModel *);
106 tlp::GraphHierarchiesModel *graphModel()
const;
111 void setBottomFrameVisible(
bool);
112 void setPageCountLabel(QLabel *l);
114 void redrawPanels(
bool center =
false);
116 void setAutoCenterPanelsOnDraw(
bool);
118 void setFocusedPanelHighlighting(
bool);
124 void focusedPanelSynchronized();
125 void addPanelRequest(
tlp::Graph *g =
nullptr);
126 void importGraphRequest();
129 void viewNeedsDraw();
130 void switchWorkspaceMode(QWidget *page);
131 void panelDestroyed(QObject *);
132 void updatePageCountLabel();
133 void updateAvailableModes();
135 void uncheckExposeButton();
136 QWidget *suitableMode(QWidget *oldMode);
137 WorkspacePanel *panelForScene(QObject *obj);
138 void swapPanelsRequested(WorkspacePanel *panel);
139 void updateStartupMode();
140 void changeFocusedPanelSynchronization(
bool);
143 void dragEnterEvent(QDragEnterEvent *event)
override;
144 void dropEvent(QDropEvent *event)
override;
146 bool handleDragEnterEvent(QEvent *e,
const QMimeData *mimedata);
147 bool handleDropEvent(
const QMimeData *mimedata);
149 bool eventFilter(QObject *, QEvent *)
override;
151 QWidget *currentModeWidget()
const;
152 QVector<PlaceHolderWidget *> currentModeSlots()
const;
153 unsigned int currentSlotsCount()
const;
155 void setFocusedPanel(WorkspacePanel *panel);
159 #endif // WORKSPACE_H
The TulipProject object handles the content of a Tulip project.
PluginProcess subclasses are meant to notify about the progress state of some process (typically a pl...
View plugins provide a way to dynamically add to a Tulip plateform various ways to visualize a graph...