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;
38 /**--------------------------------------------------------------------------------------------------
39 \brief A toolbox is a widget that displays a column of tabs one above the other, with the current
40 item displayed below the current tab. Every tab has an index position within the column of tabs.
41 **/
43 {
44 Q_OBJECT
45 public:
46 explicit QCustomToolBox(QWidget* parent = nullptr);
47 virtual ~QCustomToolBox();
48 void setMenuMode(bool menu_mode);
49
50 uint04 addWidget(QWidget* child) override;
51 int addItem(QWidget* widget);
52 int addItem(QWidget* widget, const QString&);
53 int addItem(QWidget* widget, const TranslatedString&);
54 int addItem(QWidget* widget, const QIcon& icon, const QString& label);
55
56 int insertItem(int index, QWidget* widget);
57 int insertItem(int index, QWidget* widget, const QString&);
58 int insertItem(int index, QWidget* widget, const TranslatedString&);
59 int insertItem(int index, QWidget* widget, const QIcon& icon, const QString& label);
60
61 SectionContent* content(int index) const;
62 QWidget* removeItem(int index);
63 void removeItem(QWidget* widget);
64
65 bool isItemEnabled(int index) const;
66 void setItemEnabled(int index, bool);
67
68 QString itemText(int index) const;
69 void setItemText(int index, const QString&);
70
71 QIcon tabIcon(int index) const;
72 void setTabIcon(int index, const QIcon& icon);
73 //void setTabPosition(QTabWidget::TabPosition position, bool horizontal = false);
74 void setTabToolTip(int index, const QString& tip);
75 QString tabToolTip(int index) const;
76
77 void setTabWhatsThis(int index, const QString& text);
78 QString tabWhatsThis(int index) const;
79
80 int currentIndex() const;
81 QWidget* currentWidget() const;
82 QWidget* widget(int index) const;
83 QWidget* tabArea() const;
84 int indexOf(QWidget* widget) const;
85 int count() const;
87 void setCurrentWidget(QWidget* widget);
88 void setupAsBoxWidget(bool is_box_widget);
89 void setTabVisible(bool tab_visible);
90 void setTabLock(bool lock_tab);
91 void setTabBarAutoHide(bool enabled);
92
93 void clear();
94 protected:
96 QPointer<SectionWidget> m_main_section;
98 signals:
99 void currentTabChangedSignal(int index);
100 public Q_SLOTS:
101 void setCurrentIndexSlot(int index);
102 void setCurrentWidgetSlot(QWidget* widget);
103 };
104}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:59
The root class that manages a series of SectionContent that can share the same space or lay out in va...
Definition ContainerWidget.h:66
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
A toolbox is a widget that displays a column of tabs one above the other, with the current item displ...
Definition QCustomToolBox.h:43
void setupAsBoxWidget(bool is_box_widget)
QWidget * currentWidget() const
int addItem(QWidget *widget, const QString &)
QPointer< SectionWidget > m_main_section
Definition QCustomToolBox.h:96
void setTabLock(bool lock_tab)
int insertItem(int index, QWidget *widget, const TranslatedString &)
void setCurrentWidgetSlot(QWidget *widget)
QWidget * widget(int index) const
int addItem(QWidget *widget, const TranslatedString &)
QString tabToolTip(int index) const
int insertItem(int index, QWidget *widget, const QIcon &icon, const QString &label)
int currentIndex() const
void setItemText(int index, const QString &)
bool isItemEnabled(int index) const
int addItem(QWidget *widget)
int addItem(QWidget *widget, const QIcon &icon, const QString &label)
int insertItem(int index, QWidget *widget, const QString &)
void setCurrentIndex(uint04 index)
void currentTabChangedSignal(int index)
Dictionary< QWidget *, QCustomDockWidget * > m_managed_section_content
Definition QCustomToolBox.h:95
void setTabBarAutoHide(bool enabled)
void setMenuMode(bool menu_mode)
void setTabToolTip(int index, const QString &tip)
void setCurrentWidget(QWidget *widget)
QCustomToolBox(QWidget *parent=nullptr)
QString tabWhatsThis(int index) const
QIcon tabIcon(int index) const
void setItemEnabled(int index, bool)
void setTabWhatsThis(int index, const QString &text)
QString itemText(int index) const
int insertItem(int index, QWidget *widget)
QWidget * removeItem(int index)
void setTabVisible(bool tab_visible)
SectionContent * content(int index) const
uint04 addWidget(QWidget *child) override
int indexOf(QWidget *widget) const
void setCurrentIndexSlot(int index)
void removeItem(QWidget *widget)
QWidget * tabArea() const
RibbonArea m_main_ribbon_area
Definition QCustomToolBox.h:97
void setTabIcon(int index, const QIcon &icon)
The core container for objects using the NDEVR API Widget Docking system. Contains information used t...
Definition SectionContent.h:51
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
Definition ACIColor.h:37
RibbonArea
Requests a ribbon or tab area to be in a certain location and orientation relative to another widget.
Definition RibbonArea.h:71
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96