20 #ifndef _PERSPECTIVE_H
21 #define _PERSPECTIVE_H
23 #include <tulip/PluginLister.h>
24 #include <tulip/TulipProject.h>
25 #include <tulip/PluginContext.h>
26 #include <tulip/Plugin.h>
27 #include <QtCore/QObject>
28 #include <QtCore/QVariant>
29 #include <QtCore/QSet>
38 static const std::string PERSPECTIVE_CATEGORY = QObject::trUtf8(
"Perspective").toStdString();
49 QMainWindow *mainWindow;
52 QVariantMap parameters;
74 QSet<QString> _reservedProperties;
75 QTcpSocket* _agentSocket;
76 unsigned int _perspectiveId;
78 void sendAgentMessage(
const QString&);
79 void notifyProjectLocation(
const QString& path);
114 enum ProgressOption {
115 NoProgressOption = 0x0,
120 Q_DECLARE_FLAGS(ProgressOptions,ProgressOption)
122 virtual std::
string category()
const {
123 return PERSPECTIVE_CATEGORY;
126 return ":/tulip/gui/icons/32/plugin_controller.png";
148 return dynamic_cast<T*
>(instance());
170 virtual PluginProgress *progress(ProgressOptions options = ProgressOptions(IsPreviewable | IsStoppable | IsCancellable));
175 QMainWindow* mainWindow()
const;
182 bool isReservedPropertyName(QString name);
187 void registerReservedProperty(QString);
193 virtual void redrawPanels(
bool center=
false)=0;
199 virtual void centerPanelsForGraph(
tlp::Graph*);
214 void showPluginsCenter();
219 void showProjectsPage();
224 void showAboutPage();
230 void showTrayMessage(
const QString& s);
237 void showErrorMessage(
const QString& title,
const QString& s);
243 virtual void openProjectFile(
const QString& path);
249 void createPerspective(
const QString& name);
251 Q_DECLARE_OPERATORS_FOR_FLAGS(Perspective::ProgressOptions)
255 #endif //_PERSPECTIVE_H