API Documentation
Loading...
Searching...
No Matches
InterfaceOrientationController.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/QTTools.h>
4#include <NDEVR/Button.h>
5#include <NDEVR/RibbonLayoutMode.h>
6#include <QBoxLayout>
7class QSplitter;
8namespace NDEVR
9{
10 class PointWidget;
11 class QCustomTabWidget;
12 class Button;
13 class InterfaceOrientationController;
14 class RibbonSubGroup;
15 struct OrienationOption : public QObject
16 {
17 OrienationOption(InterfaceOrientationController* parent, QLayout* l, bool inverted_stack);
18 OrienationOption(InterfaceOrientationController* parent, QWidget* w, bool inverted_stack);
20 QLayout* layout = nullptr;
21 QWidget* widget = nullptr;
24 bool inverted = false;
25 virtual void setHorizontal(bool horizontal);
27 };
29 {
30 public:
33 bool isHorizontalMode();
34 static bool isScreenHorizontal();
35 void setHorizontal(bool is_horizontal);
36 void run(QBoxLayout* l, QBoxLayout::Direction horz = QBoxLayout::LeftToRight, QBoxLayout::Direction vert = QBoxLayout::TopToBottom);
37 void run(QCustomTabWidget* w, bool inverted_stack = false);
38 void run(Button* w, Button::ButtonState horz = Button::ButtonState::e_push_button, Button::ButtonState vert = Button::ButtonState::e_large);
39 void run(QSplitter* splitter, bool inverted_splitter = false);
40 void run(PointWidget* widget, uint04 lines_horz = 2, uint04 lines_vert = 3);
41 void run(Ribbon* widget, RibbonLayoutMode horz_mode = RibbonLayoutMode::e_horizontal, RibbonLayoutMode vert_mode = RibbonLayoutMode::e_vertical);
42 void run(RibbonSubGroup* widget, RibbonLayoutMode horz_mode = RibbonLayoutMode::e_horizontal, RibbonLayoutMode vert_mode = RibbonLayoutMode::e_vertical);
43 void remove(QObject* widget);
44 static InterfaceOrientationController& Default();
45 protected:
46 void addOption(OrienationOption* inter);
47 public:
49 protected:
51 };
52}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:81
Definition Button.h:60
ButtonState
Definition Button.h:65
Definition Dictionary.h:48
Definition InterfaceOrientationController.h:29
bool m_is_horizontal
Definition InterfaceOrientationController.h:50
Dictionary< QObject *, OrienationOption * > m_orientation_options
Definition InterfaceOrientationController.h:48
Definition PointWidget.h:60
Definition QCustomTabWidget.h:40
Definition Ribbon.h:47
Definition RibbonSubGroup.h:43
Definition ACIColor.h:37
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
Definition BaseValues.hpp:272
Definition InterfaceOrientationController.h:16
~OrienationOption()
Definition InterfaceOrientationController.cpp:30
bool inverted
Definition InterfaceOrientationController.h:24
uint04 state_vert
Definition InterfaceOrientationController.h:23
OrienationOption(InterfaceOrientationController *parent, QLayout *l, bool inverted_stack)
Definition InterfaceOrientationController.cpp:16
InterfaceOrientationController * m_parent
Definition InterfaceOrientationController.h:26
QWidget * widget
Definition InterfaceOrientationController.h:21
virtual void setHorizontal(bool horizontal)
Definition InterfaceOrientationController.cpp:37
uint04 state_horz
Definition InterfaceOrientationController.h:22
QLayout * layout
Definition InterfaceOrientationController.h:20