67 Q_PROPERTY(
bool toolbarVisible READ getToolbarVisible WRITE setToolbarVisible DESIGNABLE
true USER
true)
68 Q_PROPERTY(
bool contextMenuEnabled READ getContextMenuEnabled WRITE setContextMenuEnabled DESIGNABLE
true)
69 Q_PROPERTY(
bool renderLegend READ getLegendRender WRITE setLegendRender DESIGNABLE
true)
71 Q_CLASSINFO(
"prop://toolbarVisible",
"Toggles the visibility of the toolbar of the plot.")
72 Q_CLASSINFO(
"prop://contextMenuEnabled",
"Defines whether the context menu of the plot should be enabled or not.")
73 Q_CLASSINFO(
"prop://renderLegend",
"If this property is true, the legend are included in pixelmaps renderings.")
75 Q_CLASSINFO(
"slot://getPlotID",
"Return window ID of this plot {int}.")
76 Q_CLASSINFO(
"slot://refreshPlot",
"Triggers an update of the current plot window.")
90 UnitLabelSquareBrackets
96 Q_ENUM(UnitLabelStyle)
99 ToolBarItem() : toolbar(NULL), visible(1), section(0), key(
"") {}
103 Qt::ToolBarArea area;
109 QDockWidget *toolbox;
110 Qt::DockWidgetArea area;
114 AbstractFigure(
const QString &itomSettingsFile, WindowMode windowMode = ModeStandaloneInUi, QWidget *parent = 0);
117 virtual bool event(QEvent *e);
118 void setApiFunctionGraphBasePtr(
void **apiFunctionGraphBasePtr);
119 void setApiFunctionBasePtr(
void **apiFunctionBasePtr);
120 void ** getApiFunctionGraphBasePtr(
void) {
return m_apiFunctionsGraphBasePtr; }
121 void ** getApiFunctionBasePtr(
void) {
return m_apiFunctionsBasePtr; }
126 virtual void setToolbarVisible(
bool visible);
127 virtual bool getToolbarVisible()
const;
128 virtual void setContextMenuEnabled(
bool show) = 0;
129 virtual bool getContextMenuEnabled()
const = 0;
131 QDockWidget *getPropertyDockWidget()
const;
133 virtual bool getLegendRender()
const {
return false;}
134 virtual void setLegendRender(
const bool val) {
return;}
136 QList<QMenu*> getMenus()
const;
137 QList<AbstractFigure::ToolBarItem> getToolbars()
const;
138 QList<AbstractFigure::ToolboxItem> getToolboxes()
const;
139 void setWindowTitleExtension(
const QString& title);
143 virtual RetVal init() {
return retOk; }
148 void addToolBar(QToolBar *toolbar,
const QString &key, Qt::ToolBarArea area = Qt::TopToolBarArea,
int section = 1);
149 void addToolBarBreak(
const QString &key, Qt::ToolBarArea area = Qt::TopToolBarArea);
151 void addToolbox(QDockWidget *toolbox,
const QString &key, Qt::DockWidgetArea area = Qt::RightDockWidgetArea);
152 bool removeToolbox(
const QString &key);
154 void showToolBar(
const QString &key);
155 void hideToolBar(
const QString &key);
157 void addMenu(QMenu *menu);
159 void updatePropertyDock();
160 void setPropertyObservedObject(QObject* obj);
164 RetVal registerShortcutActions();
166 WindowMode getWindowMode()
const;
168 QString getItomSettingsFile()
const;
170 void **m_apiFunctionsGraphBasePtr;
171 void **m_apiFunctionsBasePtr;
174 QScopedPointer<AbstractFigurePrivate> d_ptr;
179 void mnuShowProperties(
bool checked);
181 void toolBoxDestroyed(QObject *
object);
182 void toolBarDestroyed(QObject *
object);
184 void actionChanged();
188 void refreshPlot() { update(); }