OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
OToolkitAPI.h
Go to the documentation of this file.
1
4// ###########################################################################################################################################################################################################################################################################################################################
5
6#pragma once
7
8// Toolkit API header
10#include "OToolkitAPI/Tool.h"
12
13// std header
14#include <memory>
15
16#define OTOOLKIT_LOG(___sender, ___message) otoolkit::api::getGlobalInterface()->log(___sender, otoolkit::APIInterface::Information, ___message);
17#define OTOOLKIT_LOGW(___sender, ___message) otoolkit::api::getGlobalInterface()->log(___sender, otoolkit::APIInterface::Warning, ___message);
18#define OTOOLKIT_LOGE(___sender, ___message) otoolkit::api::getGlobalInterface()->log(___sender, otoolkit::APIInterface::Error, ___message);
19
20class QSettings;
21
22namespace otoolkit {
23
24 typedef std::shared_ptr<QSettings> SettingsRef;
25
27 {
28 public:
34
35 virtual void log(const QString& _sender, InterfaceLogType _type, const QString& _message) = 0;
36
37 virtual bool addTool(Tool* _tool) = 0;
38
39 virtual void updateStatusString(const QString& _statusText) = 0;
40
41 virtual void updateStatusStringAsError(const QString& _statusText) = 0;
42
44
46
48
49 virtual const QWidget* rootWidget(void) const = 0;
50
51 protected:
53 virtual ~APIInterface();
54 };
55
61
62
63}
64
Definition OToolkitAPI.h:27
virtual void updateStatusStringAsError(const QString &_statusText)=0
virtual void removeToolActivityNotifier(otoolkit::ToolActivityNotifier *_notifier)=0
virtual void registerToolActivityNotifier(otoolkit::ToolActivityNotifier *_notifier)=0
virtual SettingsRef createSettingsInstance(void)=0
virtual void log(const QString &_sender, InterfaceLogType _type, const QString &_message)=0
virtual const QWidget * rootWidget(void) const =0
virtual bool addTool(Tool *_tool)=0
virtual void updateStatusString(const QString &_statusText)=0
InterfaceLogType
Definition OToolkitAPI.h:29
@ Information
Definition OToolkitAPI.h:30
@ Warning
Definition OToolkitAPI.h:31
Definition ToolActivityNotifier.h:12
Definition Tool.h:27
OTOOLKITAPI_EXPORTONLY bool initialize(APIInterface *_interface)
Definition OToolkitAPI.cpp:53
OTOOLKITAPI_EXPORTONLY otoolkit::APIInterface * getGlobalInterface(void)
Definition OToolkitAPI.cpp:94
Definition ToolManager.h:30
std::shared_ptr< QSettings > SettingsRef
Definition OToolkitAPI.h:24
#define OTOOLKITAPI_EXPORT
Definition otoolkitapi_global.h:16
#define OTOOLKITAPI_EXPORTONLY
Definition otoolkitapi_global.h:17