28 #ifndef ABSTRACTFIGURE_H 29 #define ABSTRACTFIGURE_H 31 #include "plotCommon.h" 32 #include "AbstractNode.h" 34 #include "../common/apiFunctionsGraphInc.h" 35 #include "../common/apiFunctionsInc.h" 37 #include <qmainwindow.h> 41 #include <qdockwidget.h> 43 class QPropertyEditorWidget;
45 #if !defined(Q_MOC_RUN) || defined(ITOMCOMMONPLOT_MOC) //only moc this file in itomCommonQtLib but not in other libraries or executables linking against this itomCommonQtLib 48 #define DESIGNER_PLUGIN_ITOM_API \ 50 void importItomApi(void** apiPtr) \ 51 {ito::ITOM_API_FUNCS = apiPtr;} \ 52 void importItomApiGraph(void** apiPtr) \ 53 { ito::ITOM_API_FUNCS_GRAPH = apiPtr;} \ 60 class AbstractFigurePrivate;
66 #if QT_VERSION < 0x050500 69 Q_ENUMS(UnitLabelStyle)
72 Q_PROPERTY(
bool toolbarVisible READ getToolbarVisible WRITE setToolbarVisible DESIGNABLE
true USER
true)
73 Q_PROPERTY(
bool contextMenuEnabled READ getContextMenuEnabled WRITE setContextMenuEnabled DESIGNABLE
true)
74 Q_PROPERTY(
bool renderLegend READ getLegendRender WRITE setLegendRender DESIGNABLE
true)
76 Q_CLASSINFO(
"prop://toolbarVisible",
"Toggles the visibility of the toolbar of the plot.")
77 Q_CLASSINFO(
"prop://contextMenuEnabled",
"Defines whether the context menu of the plot should be enabled or not.")
78 Q_CLASSINFO(
"prop://renderLegend",
"If this property is true, the legend are included in pixelmaps renderings.")
80 Q_CLASSINFO(
"slot://getPlotID",
"Return window ID of this plot {int}.")
81 Q_CLASSINFO(
"slot://refreshPlot",
"Triggers an update of the current plot window.")
102 tUninitilizedExtern = 0x10,
103 tVisibleOnInit = 0x20
110 UnitLabelSquareBrackets
113 #if QT_VERSION >= 0x050500 117 Q_ENUM(UnitLabelStyle)
120 int getCompilerFeatures(
void)
const 122 int retval = tOpenCV;
123 #if defined USEPCL || ITOM_POINTCLOUDLIBRARY 124 retval |= tPointCloudLib;
130 ToolBarItem() : toolbar(NULL), visible(1), section(0), key(
"") {}
134 Qt::ToolBarArea area;
140 QDockWidget *toolbox;
141 Qt::DockWidgetArea area;
145 AbstractFigure(
const QString &itomSettingsFile, WindowMode windowMode = ModeStandaloneInUi, QWidget *parent = 0);
148 virtual bool event(QEvent *e);
149 void setApiFunctionGraphBasePtr(
void **apiFunctionGraphBasePtr);
150 void setApiFunctionBasePtr(
void **apiFunctionBasePtr);
151 void ** getApiFunctionGraphBasePtr(
void) {
return m_apiFunctionsGraphBasePtr; }
152 void ** getApiFunctionBasePtr(
void) {
return m_apiFunctionsBasePtr; }
154 virtual RetVal addChannel(
AbstractNode *child,
ito::Param* parentParam,
ito::Param* childParam, Channel::ChanDirection direction,
bool deleteOnParentDisconnect,
bool deleteOnChildDisconnect);
156 virtual RetVal removeChannelFromList(
unsigned int uniqueID);
159 virtual RetVal update(
void) = 0;
162 virtual void setToolbarVisible(
bool visible);
163 virtual bool getToolbarVisible()
const;
164 virtual void setContextMenuEnabled(
bool show) = 0;
165 virtual bool getContextMenuEnabled()
const = 0;
167 QDockWidget *getPropertyDockWidget()
const;
169 virtual bool getLegendRender()
const {
return false;}
170 virtual void setLegendRender(
const bool val) {
return;}
172 QList<QMenu*> getMenus()
const;
173 QList<AbstractFigure::ToolBarItem> getToolbars()
const;
174 QList<AbstractFigure::ToolboxItem> getToolboxes()
const;
180 virtual void importItomApi(
void** apiPtr) = 0;
181 virtual void importItomApiGraph(
void** apiPtr) = 0;
183 void addToolBar(QToolBar *toolbar,
const QString &key, Qt::ToolBarArea area = Qt::TopToolBarArea,
int section = 1);
184 void addToolBarBreak(
const QString &key, Qt::ToolBarArea area = Qt::TopToolBarArea);
186 void addToolbox(QDockWidget *toolbox,
const QString &key, Qt::DockWidgetArea area = Qt::RightDockWidgetArea);
187 bool removeToolbox(
const QString &key);
189 void showToolBar(
const QString &key);
190 void hideToolBar(
const QString &key);
192 void addMenu(QMenu *menu);
194 void updatePropertyDock();
195 void setPropertyObservedObject(QObject* obj);
199 RetVal registerShortcutActions();
201 WindowMode m_windowMode;
202 QString m_itomSettingsFile;
203 QWidget *m_mainParent;
205 void **m_apiFunctionsGraphBasePtr;
206 void **m_apiFunctionsBasePtr;
208 ito::uint8 m_lineCutType;
209 ito::uint8 m_zSliceType;
210 ito::uint8 m_zoomCutType;
217 void mnuShowProperties(
bool checked);
219 void toolBoxDestroyed(QObject *
object);
220 void toolBarDestroyed(QObject *
object);
222 void actionChanged();
226 void refreshPlot() { update(); }
231 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) 233 #endif // ABSTRACTFIGURE_H
Class for managing status values (like errors or warning)
Definition: retVal.h:54
class for parameter handling e.g. to pass paramters to plugins
Definition: param.h:251
Definition: typeDefs.h:58
Definition: apiFunctionsGraph.cpp:39
Definition: AbstractNode.h:203
Definition: AbstractNode.h:62