20 #ifndef _PERSPECTIVE_H 21 #define _PERSPECTIVE_H 23 #include <tulip/PluginContext.h> 24 #include <tulip/Plugin.h> 25 #include <tulip/TlpQtTools.h> 28 #include <QVariantMap> 40 static const std::string PERSPECTIVE_CATEGORY =
"Perspective";
51 QMainWindow *mainWindow;
54 QVariantMap parameters;
76 QSet<QString> _reservedProperties;
77 QTcpSocket* _agentSocket;
78 unsigned int _perspectiveId;
80 void sendAgentMessage(
const QString&);
81 void notifyProjectLocation(
const QString& path);
115 bool checkSocketConnected();
118 enum ProgressOption {
119 NoProgressOption = 0x0,
124 Q_DECLARE_FLAGS(ProgressOptions,ProgressOption)
126 virtual std::
string category()
const {
127 return PERSPECTIVE_CATEGORY;
130 return ":/tulip/gui/icons/32/plugin_controller.png";
152 return dynamic_cast<T*
>(instance());
174 virtual PluginProgress *progress(ProgressOptions options = ProgressOptions(IsPreviewable | IsStoppable | IsCancellable));
179 QMainWindow* mainWindow()
const;
186 bool isReservedPropertyName(QString name);
191 void registerReservedProperty(QString);
197 virtual void redrawPanels(
bool center=
false)=0;
203 virtual void centerPanelsForGraph(
tlp::Graph*);
206 emit resetWindowTitle();
214 static void showStatusMessage(
const QString&);
227 static void redirectStatusTipOfMenu(QMenu* menu);
239 void resetWindowTitle();
245 void showPluginsCenter();
251 void showFullScreen(
bool f);
256 void showProjectsPage();
261 void showAboutPage();
267 void showTrayMessage(
const QString& s);
274 void showErrorMessage(
const QString& title,
const QString& s);
280 virtual void openProjectFile(
const QString& path);
286 void createPerspective(
const QString& name);
292 void showStatusTipOf(QAction* action);
294 Q_DECLARE_OPERATORS_FOR_FLAGS(Perspective::ProgressOptions)
298 #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.
QString tlpStringToQString(const std::string &toConvert)
Convert a Tulip UTF-8 encoded std::string to a QString.
static void showStatusMessage(const std::string &msg)
a static function to ease the display of messages on mainWindow()->statusBar()