33#include <NDEVR/RibbonLayoutMode.h>
34#include <NDEVR/Button.h>
35#include <NDEVR/QCustomLabel.h>
90 void updateButtonSize(
uint04 button,
int secondary_size,
bool use_default);
91 bool event(QEvent* ev)
override;
93 void addToButtonSize(
Button* button);
95 void updateLayout(QSize size);
97 void resetButtonState();
99 bool requestLarger(
int secondary_size);
101 bool requestSmaller(
uint01 priority,
uint04 col_count,
int secondary_size);
105 void _ribbonResizeEvent(
int primary,
int secondary);
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
Displays translated text. No user interaction functionality is provided. The visual appearance of the...
Definition QCustomLabel.h:46
Represents the "Tab" of a widget. For example sections such as Home, View, Edit, Measurements would a...
Definition RibbonGroup.h:51
Represents a sub-section of "Tab" of a ribbon represting a grouping of buttons or widgets within a ta...
Definition RibbonSubGroup.h:47
RibbonSubGroup(QWidget *parent=nullptr)
int currentSecondary() const
QSize minimumSizeHint() const override
int marginThickness() const
void setSpacing(int spacing)
Vector< 2, int > m_full_size
Definition RibbonSubGroup.h:113
QSize sizeHint() const override
bool m_ignored_size
Definition RibbonSubGroup.h:122
void setIconSizeMultiplier(fltp04 size_multiplier)
QWidget * m_button_panel
Definition RibbonSubGroup.h:111
uint01 m_num_of_rows
Definition RibbonSubGroup.h:118
void requestLayoutUpdate()
void setTitle(const TranslatedString &title)
void setLayoutMode(RibbonLayoutMode layout_mode)
Definition RibbonSubGroup.h:73
void updateRibbonLayout()
void setIgnoredSize(bool ignored)
bool m_auto_fill_table
Definition RibbonSubGroup.h:124
TranslatedString m_title
Definition RibbonSubGroup.h:117
Vector< 2, int > minSize() const
bool m_is_vertical
Definition RibbonSubGroup.h:121
Vector< 2, int > calcSize() const
QGridLayout * m_layout
Definition RibbonSubGroup.h:108
int m_last_width
Definition RibbonSubGroup.h:110
int largeButtonWidth() const
virtual void setVisible(bool is_visible) override
Vector< 2, int > m_estimated_size
Definition RibbonSubGroup.h:115
Button * addButton(Button *button, uint04 index=Constant< uint04 >::Invalid, bool update_layout=false)
const Buffer< Button * > & buttons() const
Definition RibbonSubGroup.h:55
Vector< 2, int > m_large_button_size
Definition RibbonSubGroup.h:114
RibbonLayoutMode m_layout_mode
Definition RibbonSubGroup.h:112
uint01 m_fixed_num_of_rows
Definition RibbonSubGroup.h:119
Vector< 2, int > estimatedSize() const
Definition RibbonSubGroup.h:70
QCustomLabel * m_label
Definition RibbonSubGroup.h:109
virtual void sortButtons(const std::function< bool(Button *, Button *)> &sorter)
void setExpandingIcons(bool expanding)
void removeButton(Button *button)
RibbonSubGroup(const TranslatedString &title, QWidget *parent=nullptr)
uint04 numOfColumns() const
void setNumberOfRows(uint04 number_of_rows)
const TranslatedString & title() const
Definition RibbonSubGroup.h:80
void setVertical(bool is_vertical)
void resizeEvent(QResizeEvent *resize_event) override
void setFixedNumOfRows(uint01 fixed_num_of_rows)
int currentPrimary() const
Buffer< Button * > m_buttons
Definition RibbonSubGroup.h:107
int mediumButtonWidth() const
bool m_expanding_icons
Definition RibbonSubGroup.h:123
fltp04 m_icon_size_multiplier
Definition RibbonSubGroup.h:125
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
A fixed-size array with better performance compared to dynamic containers.
Definition Vector.hpp:60
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
RibbonLayoutMode
The orientations a ribbon can take on.
Definition RibbonLayoutMode.hpp:39
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233