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>
37 static const std::string PERSPECTIVE_CATEGORY = QObject::trUtf8(
"Perspective").toStdString();
48 QMainWindow *mainWindow;
51 QVariantMap parameters;
73 QSet<QString> _reservedProperties;
74 QTcpSocket* _agentSocket;
75 unsigned int _perspectiveId;
77 void sendAgentMessage(
const QString&);
78 void notifyProjectLocation(
const QString& path);
113 enum ProgressOption {
114 NoProgressOption = 0x0,
119 Q_DECLARE_FLAGS(ProgressOptions,ProgressOption)
121 virtual std::
string category()
const {
122 return PERSPECTIVE_CATEGORY;
125 return ":/tulip/gui/icons/32/plugin_controller.png";
147 return dynamic_cast<T*
>(instance());
169 virtual PluginProgress *progress(ProgressOptions options = ProgressOptions(IsPreviewable | IsStoppable | IsCancellable));
174 QMainWindow* mainWindow()
const;
181 bool isReservedPropertyName(QString name);
186 void registerReservedProperty(QString);
192 virtual void redrawPanels(
bool center=
false)=0;
198 virtual void centerPanelsForGraph(
tlp::Graph*);
213 void showPluginsCenter();
218 void showProjectsPage();
223 void showAboutPage();
229 void showTrayMessage(
const QString& s);
236 void showErrorMessage(
const QString& title,
const QString& s);
242 virtual void openProjectFile(
const QString& path);
248 void createPerspective(
const QString& name);
250 Q_DECLARE_OPERATORS_FOR_FLAGS(Perspective::ProgressOptions)
254 #endif //_PERSPECTIVE_H