itom
Loading...
Searching...
No Matches
apiFunctionsGraph.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#ifndef APIFUNCTIONSGRAPH_H
24#define APIFUNCTIONSGRAPH_H
25
26#include "../../common/apiFunctionsGraphInc.h"
27
28#include "../../common/sharedStructures.h"
29#include "../../common/sharedStructuresGraphics.h"
30#include "../../common/itomPlotHandle.h"
31
32#include <qvariant.h>
33#include <qpointer.h>
34#include <qsharedpointer.h>
35
36namespace ito
37{
39 {
40 public:
43
44 static ito::RetVal mnumberOfColorBars(int &number);
45 static ito::RetVal mgetColorBarName(const QString &name, ito::ItomPalette &palette);
46 static ito::RetVal mgetColorBarIdx(const int number, ito::ItomPalette &palette);
47 //static ito::RetVal mgetFigure(ito::uint32 &UID, const QString plugin, QWidget **newFigure);
48 static ito::RetVal mgetPluginList(const ito::PluginInfo &requirements, QHash<QString, ito::PluginInfo> &pluginList, const QString preference);
49 static ito::RetVal mconnectLiveData(QObject *liveDataSource, QObject *liveDataView);
50 static ito::RetVal mstartLiveData(QObject* liveDataSource, QObject *liveDataView);
51 static ito::RetVal mstopLiveData(QObject* liveDataSource, QObject *liveDataView);
52 static ito::RetVal mdisconnectLiveData(QObject* liveDataSource, QObject *liveDataView);
53 static ito::RetVal mgetColorBarIdxFromName(const QString &name, ito::int32 & index);
54
55 static ito::RetVal mgetFigure(const QString &figCategoryName, const QString &figClassName, ito::uint32 &UID, QWidget **figure, QWidget *parent = NULL);
56 static QVariant mgetFigureSetting(const QObject *figureClass, const QString &key, const QVariant &defaultValue = QVariant(), ito::RetVal *retval = NULL);
57
58 static ito::RetVal mgetPluginWidget(char* algoWidgetFunc, QVector<ito::ParamBase> *paramsMand, QVector<ito::ParamBase> *paramsOpt, QPointer<QWidget> *widget);
59 static ito::RetVal mgetFigureUIDByHandle(QObject *figure, ito::uint32 &figureUID);
60 static ito::RetVal mgetPlotHandleByID(const ito::uint32 &figureUID, ito::ItomPlotHandle &plotHandle);
61
63 static ito::RetVal sendParamToPyWorkspaceThreadSafe(const QString &varname, const QSharedPointer<ito::ParamBase> &value);
65 static ito::RetVal sendParamsToPyWorkspaceThreadSafe(const QStringList &varnames, const QVector<QSharedPointer<ito::ParamBase> > &values);
66
67 static ito::RetVal mConnectToOutputAndErrorStream(const QObject *receiver, const char *method, ito::tStreamMessageType messageType);
68 static ito::RetVal mDisconnectFromOutputAndErrorStream(const QObject *receiver, const char *method, ito::tStreamMessageType messageType);
69
70 private:
71 };
72}
73
74#endif // APIFUNCTIONSGRAPH_H
class for a interval type containing the plot handle / unique id and name.
Definition itomPlotHandle.h:49
Definition sharedStructuresGraphics.h:88
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.h:39
static ito::RetVal sendParamToPyWorkspaceThreadSafe(const QString &varname, const QSharedPointer< ito::ParamBase > &value)
function called by apiSendParamToPyWorkspace
Definition apiFunctionsGraph.cpp:521
static ito::RetVal sendParamsToPyWorkspaceThreadSafe(const QStringList &varnames, const QVector< QSharedPointer< ito::ParamBase > > &values)
function called by apiSendParamsToPyWorkspace
Definition apiFunctionsGraph.cpp:527
static ito::RetVal mgetFigureUIDByHandle(QObject *figure, ito::uint32 &figureUID)
return the figure UID for the given figure
Definition apiFunctionsGraph.cpp:472
static ito::RetVal mgetFigure(const QString &figCategoryName, const QString &figClassName, ito::uint32 &UID, QWidget **figure, QWidget *parent=NULL)
tries to get an existing figure of a given UID (if UID > 0) or tries to open a new figure from the gi...
Definition apiFunctionsGraph.cpp:163
Definition apiFunctionsGraph.cpp:40
tStreamMessageType
Definition typeDefs.h:77
Definition sharedStructuresGraphics.h:114