OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ToolBar.h
Go to the documentation of this file.
1#pragma once
2
3// uiCore header
5#include <akCore/aNotifier.h>
6
7// Qt header
8#include <qstring.h>
9#include <qicon.h>
10
11// open twin header
12#include "OTCore/Flags.h"
13#include "OTGui/GuiTypes.h"
14#include <qvectornd.h>
15
16class AppBase;
17class LockManager;
18
19namespace tt { class Page; }
20
21class ToolBar : public ak::aNotifier {
22public:
23
24 ToolBar(AppBase * _owner);
25
26 virtual void notify(
27 ak::UID _sender,
28 ak::eventType _event,
29 int _info1,
30 int _info2
31 ) override;
32
33 tt::Page* getStartPage(void);
34
35 // ###################################################################################
36
37 ak::UID addPage(ak::UID _creator, const QString & _pageName);
38
39 ak::UID addGroup(ak::UID _creator, ak::UID _page, const QString & _groupName);
40
41 ak::UID addSubGroup(ak::UID _creator, ak::UID _group, const QString & _subGroupName);
42
43 ak::UID addToolButton(ak::UID _creator, ak::UID _container, const QIcon & _icon, const QString & _title);
44
45 ak::UID addToolButton(ak::UID _creator, ak::UID _container, const QString & _iconName, const QString & _iconPath, const QString & _title);
46
47 ak::UID addToolButton(ak::UID _creator, ak::UID _container, const QString & _iconName, const QString & _iconPath, const QString & _title, ak::aNotifier * _notifier);
48
49 ak::UID addCheckBox(ak::UID _creator, ak::UID _container, const QString & _text, bool _initialState);
50
51 ak::UID addNiceLineEdit(ak::UID _creator, ak::UID _container, const QString & _title, const QString & _initialState);
52
54
55private:
56
57 struct structView {
58 ak::UID page;
59 ak::UID gUserInterface;
60 ak::UID gUserInterface_aSettings;
61 };
62
63 struct structFile {
64 ak::UID page;
65 ak::UID gDefault;
66 ak::UID gDefault_aExit;
67 ak::UID gDefault_aSettings;
68 ak::UID gDefault_aImport;
69 ak::UID gDefault_aGroup;
70 ak::UID gDefault_aExportLog;
71 };
72
73 AppBase * m_owner;
74
75 structFile m_file;
76 structView m_view;
77
78 ToolBar() = delete;
79 ToolBar(ToolBar&) = delete;
80 ToolBar& operator = (ToolBar&) = delete;
81};
The API manager is used to manage the global objects required for this API to work.
Definition AppBase.h:21
Definition ControlsManager.h:67
Definition ToolBar.h:21
ak::UID addNiceLineEdit(ak::UID _creator, ak::UID _container, const QString &_title, const QString &_initialState)
Definition ToolBar.cpp:179
ak::UID addCheckBox(ak::UID _creator, ak::UID _container, const QString &_text, bool _initialState)
Definition ToolBar.cpp:173
tt::Page * getStartPage(void)
Definition ToolBar.cpp:136
ak::UID addPage(ak::UID _creator, const QString &_pageName)
Definition ToolBar.cpp:142
ak::UID addSubGroup(ak::UID _creator, ak::UID _group, const QString &_subGroupName)
Definition ToolBar.cpp:150
ak::UID addToolButton(ak::UID _creator, ak::UID _container, const QIcon &_icon, const QString &_title)
Definition ToolBar.cpp:154
void addDefaultControlsToLockManager(LockManager *_lockManger, ot::LockTypeFlags &_flags)
Definition ToolBar.cpp:185
ak::UID addGroup(ak::UID _creator, ak::UID _page, const QString &_groupName)
Definition ToolBar.cpp:146
virtual void notify(ak::UID _sender, ak::eventType _event, int _info1, int _info2) override
Will notify this receiver that a message was received by a sender.
Definition ToolBar.cpp:112
This abstract class is used to provide the receiver functionallity used in the messaging class.
Definition aNotifier.h:22
unsigned long long UID
The UID datatype used for objects.
Definition globalDataTypes.h:65
eventType
Describes the type of an event.
Definition akCore.h:86
Definition TabToolBar.h:18