OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
aTtbContainer.h
Go to the documentation of this file.
1/*
2 * File: aTtbContainer.h
3 * Package: akGui
4 *
5 * Created on: August 05, 2020
6 * Author: Alexander Kuester
7 * Copyright (c) 2022 Alexander Kuester
8 * This file is part of the uiCore component.
9 * This file is subject to the terms and conditions defined in
10 * file 'LICENSE', which is part of this source code package.
11 */
12
13#pragma once
14
15// C++ header
16#include <vector>
17
18// Qt header
19#include <qstring.h>
20
21// AK header
23#include <akCore/akCore.h>
24#include <akCore/aObject.h>
25
26#define TTB_CONT_DEL_PARENTCHECK assert(m_parentObject != nullptr); m_parentObject->removeChildObject(this);
27#define TTB_CONTAINER_DESTROYING TTB_CONT_DEL_PARENTCHECK
28
29namespace ak {
30
31 // Forward declaration
32 class aMessenger;
33 class aUidManager;
34
37 public:
38
43 aMessenger * _messenger,
44 objectType _type,
45 UID _UID = ak::invalidUID
46 );
47
49 virtual ~aTtbContainer();
50
52 int subContainerCount(void) const;
53
56 virtual void addChild(
57 aObject * _child
58 ) = 0;
59
63 const QString & _text = QString("")
64 ) = 0;
65
68 virtual void setEnabled(
69 bool _enabled
70 ) { m_isEnabled = _enabled; }
71
73 bool enabled(void) const { return m_isEnabled; }
74
78 aTtbContainer * getSubContainer(
79 const QString & _text
80 );
81
82 virtual void destroyAllSubContainer(void) = 0;
83
85 QString text(void) const { return m_text; }
86
87 protected:
89 std::vector<aTtbContainer *> m_subContainer;
90 QString m_text;
92
93 private:
94 // Block default constructor
95 aTtbContainer() = delete;
96
97 // Block copy constructor
98 aTtbContainer(const aTtbContainer & _other) = delete;
99
100 // Block assignment operator
101 aTtbContainer & operator = (const aTtbContainer & _other) = delete;
102 };
103} // namespace ak
#define UICORE_API_EXPORT
Definition globalDataTypes.h:20
Class used to forward messages to receivers This class is used to forward a message to receivers....
Definition aMessenger.h:34
This class is used to store the main information of any object used Information contained is the UID ...
Definition aObject.h:34
This class provides a interface that represents a tab toolbar container.
Definition aTtbContainer.h:36
virtual aTtbContainer * createSubContainer(const QString &_text=QString(""))=0
Will add a new sub container to this container.
QString text(void) const
Will return the text of this ttb container.
Definition aTtbContainer.h:85
bool m_isEnabled
Definition aTtbContainer.h:91
aMessenger * m_messenger
Definition aTtbContainer.h:88
virtual void addChild(aObject *_child)=0
Will add the provided child to this container.
bool enabled(void) const
Will return the enabled state of this container.
Definition aTtbContainer.h:73
virtual void destroyAllSubContainer(void)=0
std::vector< aTtbContainer * > m_subContainer
Definition aTtbContainer.h:89
virtual void setEnabled(bool _enabled)
Will set the enabled state of this container.
Definition aTtbContainer.h:68
QString m_text
Definition aTtbContainer.h:90
Definition uiAPI.h:45
const UID invalidUID
Represents the invalid UID for an object.
Definition globalDataTypes.h:71
unsigned long long UID
The UID datatype used for objects.
Definition globalDataTypes.h:65
objectType
Describes the type of an object.
Definition akCore.h:167