API Documentation
Loading...
Searching...
No Matches
RibbonGroup.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: NDEVR
28File: RibbonGroup
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/RibbonLayoutMode.h>
35#include <NDEVR/Buffer.h>
36#include <NDEVR/String.h>
37#include <NDEVR/Dictionary.h>
38#include <QWidget>
39#include <QBoxLayout>
40class QFrame;
41namespace NDEVR
42{
43 class QCustomLabel;
44 class RibbonSubGroup;
45 class TranslatedString;
46 class NDEVR_WIDGETS_API RibbonGroup : public QWidget
47 {
48 Q_OBJECT
49 public:
50 RibbonGroup(QWidget* parent = nullptr);
51 RibbonSubGroup* addSubGroup(const TranslatedString& sub_group_name);
52 void addSubGroup(QWidget* sub_group);
53 RibbonSubGroup& operator[](const TranslatedString& location);
54 QSize minimumSizeHint() const override;
55 bool hasSubGroup(const TranslatedString& sub_group) const;
56 int currentPrimaryDimension() const;
57 int currentSecondaryDimension() const;
58 int marginThickness() const;
59 bool event(QEvent* ev) override;
60 int largeButtonWidth() const;
61 int mediumButtonWidth() const;
62 uint04 maxNumOfColumns() const;
63 void setupSeperator(QFrame* seperator) const;
64 Vector<2, int> minSize() const;
65 void setNumberOfRows(uint04 number_of_rows);
66 void ribbonResizeEvent(int primary, int secondary);
67 void resizeEvent(QResizeEvent* resize_event) override;
68 void updateLayout(QSize size);
69 void setVertical(bool is_vertical);
70 void resetButtonStates();
71 void adjustButtonsToFit(int primary, int secondary);
72 void setFixedNumOfRows(uint01 fixed_num_of_rows);
73 public slots:
74 void layoutSubGroups();
75 public:
84 QBoxLayout* m_layout;
85 };
86
87}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition Dictionary.h:48
Definition RibbonGroup.h:47
Buffer< QFrame * > m_seperators
Definition RibbonGroup.h:77
bool m_is_vertical
Definition RibbonGroup.h:81
int m_last_width
Definition RibbonGroup.h:82
Dictionary< String, RibbonSubGroup * > m_sub_group_lookup
Definition RibbonGroup.h:78
Buffer< QWidget * > m_sub_groups
Definition RibbonGroup.h:76
RibbonLayoutMode m_layout_mode
Definition RibbonGroup.h:80
uint01 m_fixed_num_of_rows
Definition RibbonGroup.h:83
uint04 m_row_num
Definition RibbonGroup.h:79
QBoxLayout * m_layout
Definition RibbonGroup.h:84
Definition RibbonSubGroup.h:43
Definition TranslatedString.h:9
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
Definition ACIColor.h:37
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
RibbonLayoutMode
Definition RibbonLayoutMode.hpp:36
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120