20 #ifndef _PERSPECTIVE_H 21 #define _PERSPECTIVE_H 23 #include <tulip/PluginContext.h> 24 #include <tulip/Plugin.h> 27 #include <QVariantMap> 38 static const std::string PERSPECTIVE_CATEGORY =
"Perspective";
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);
113 bool checkSocketConnected();
116 enum ProgressOption {
117 NoProgressOption = 0x0,
122 Q_DECLARE_FLAGS(ProgressOptions,ProgressOption)
124 virtual std::
string category()
const {
125 return PERSPECTIVE_CATEGORY;
128 return ":/tulip/gui/icons/32/plugin_controller.png";
150 return dynamic_cast<T*
>(instance());
172 virtual PluginProgress *progress(ProgressOptions options = ProgressOptions(IsPreviewable | IsStoppable | IsCancellable));
177 QMainWindow* mainWindow()
const;
184 bool isReservedPropertyName(QString name);
189 void registerReservedProperty(QString);
195 virtual void redrawPanels(
bool center=
false)=0;
201 virtual void centerPanelsForGraph(
tlp::Graph*);
216 void showPluginsCenter();
222 void showFullScreen(
bool f);
227 void showProjectsPage();
232 void showAboutPage();
238 void showTrayMessage(
const QString& s);
245 void showErrorMessage(
const QString& title,
const QString& s);
251 virtual void openProjectFile(
const QString& path);
257 void createPerspective(
const QString& name);
259 Q_DECLARE_OPERATORS_FOR_FLAGS(Perspective::ProgressOptions)
263 #endif //_PERSPECTIVE_H QVariantMap _parameters
Contains extra parameters that have not been parsed by the overleying system. Those are considered to...
QMainWindow * _mainWindow
The main window on which the perspective should build the GUI.
std::string icon() const
The icon (preferably a thumbnail) of the plugin.
The TulipProject object handles the content of a Tulip project.
TulipProject * _project
The project associated to this perspective. This project can be empty or contain data depending on ho...
virtual bool terminated()
Called when the user wants to close the application.
Contains runtime parameters for a plugin.
static T * typedInstance()
A context data structure for tlp::Perspective instances.
Top-level interface for plug-ins.
PluginProcess subclasses are meant to notify about the progress state of some process (typically a pl...
A Perspective is a Tulip plugin that completely re-defines the user interface.