API Documentation
Loading...
Searching...
No Matches
QCustomToolBox.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Widgets
28File: QCustomTabWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/ContainerWidget.h>
34namespace NDEVR
35{
36 class QCustomDockWidget;
37 class TranslatedString;
39 {
40 Q_OBJECT
41 public:
42 explicit QCustomToolBox(QWidget* parent = nullptr);
43 virtual ~QCustomToolBox();
44 void setMenuMode(bool menu_mode);
45
46 uint04 addWidget(QWidget* child) override;
47 int addItem(QWidget* widget);
48 int addItem(QWidget* widget, const QString&);
49 int addItem(QWidget* widget, const TranslatedString&);
50 int addItem(QWidget* widget, const QIcon& icon, const QString& label);
51
52 int insertItem(int index, QWidget* widget);
53 int insertItem(int index, QWidget* widget, const QString&);
54 int insertItem(int index, QWidget* widget, const TranslatedString&);
55 int insertItem(int index, QWidget* widget, const QIcon& icon, const QString& label);
56
57 SectionContent* content(int index) const;
58 QWidget* removeItem(int index);
59 void removeItem(QWidget* widget);
60
61 bool isItemEnabled(int index) const;
62 void setItemEnabled(int index, bool);
63
64 QString itemText(int index) const;
65 void setItemText(int index, const QString&);
66
67 QIcon tabIcon(int index) const;
68 void setTabIcon(int index, const QIcon& icon);
69 //void setTabPosition(QTabWidget::TabPosition position, bool horizontal = false);
70 void setTabToolTip(int index, const QString& tip);
71 QString tabToolTip(int index) const;
72
73 void setTabWhatsThis(int index, const QString& text);
74 QString tabWhatsThis(int index) const;
75
76 int currentIndex() const;
77 QWidget* currentWidget() const;
78 QWidget* widget(int index) const;
79 QWidget* tabArea() const;
80 int indexOf(QWidget* widget) const;
81 int count() const;
82 void setCurrentIndex(uint04 index);
83 void setCurrentWidget(QWidget* widget);
84 void setupAsBoxWidget(bool is_box_widget);
85 void setTabVisible(bool tab_visible);
86 void setTabLock(bool lock_tab);
87 void setTabBarAutoHide(bool enabled);
88
89 void clear();
90 protected:
92 QPointer<SectionWidget> m_main_section;
94 signals:
95 void currentTabChangedSignal(int index);
96 public Q_SLOTS:
97 void setCurrentIndexSlot(int index);
98 void setCurrentWidgetSlot(QWidget* widget);
99 };
100}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
Definition ContainerWidget.h:85
Definition Dictionary.h:48
Definition QCustomToolBox.h:39
QPointer< SectionWidget > m_main_section
Definition QCustomToolBox.h:92
void currentTabChangedSignal(int index)
Dictionary< QWidget *, QCustomDockWidget * > m_managed_section_content
Definition QCustomToolBox.h:91
RibbonArea m_main_ribbon_area
Definition QCustomToolBox.h:93
Definition SectionContent.h:47
Definition TranslatedString.h:9
Definition ACIColor.h:37
RibbonArea
Definition RibbonArea.h:68
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120