API Documentation
Loading...
Searching...
No Matches
InterfaceOrientationController Class Reference

This class is responsible for notifying and providing default layout logic when the orientation of the widget changes, such as for a screen rotaton. Espcially useful for phones that may change orientation. For example, QBoxLayouts will be set to vertical when the screen is vertical and horizontal when the screen is horizontal. Widgets can be added inverted, meaning the opposite of the default layout behavior will occur. Widget will be layed out as soon as run is called on it, and subsequently when the interface layout changes. Provided widget is destroyed on the main thread, there is no need to automatically remove it from the controller. More...

#include <InterfaceOrientationController.h>

Public Member Functions

 InterfaceOrientationController ()
 
bool isHorizontalMode ()
 
void remove (QObject *widget)
 
void run (Button *w, Button::ButtonState horz=Button::ButtonState::e_push_button, Button::ButtonState vert=Button::ButtonState::e_large)
 
void run (PointWidget *widget, uint04 lines_horz=2, uint04 lines_vert=3)
 
void run (QBoxLayout *l, QBoxLayout::Direction horz=QBoxLayout::LeftToRight, QBoxLayout::Direction vert=QBoxLayout::TopToBottom)
 
void run (QCustomTabWidget *w, bool inverted_stack=false)
 
void run (QSplitter *splitter, bool inverted_splitter=false)
 
void run (Ribbon *widget, RibbonLayoutMode horz_mode=RibbonLayoutMode::e_horizontal, RibbonLayoutMode vert_mode=RibbonLayoutMode::e_vertical)
 
void run (RibbonSubGroup *widget, RibbonLayoutMode horz_mode=RibbonLayoutMode::e_horizontal, RibbonLayoutMode vert_mode=RibbonLayoutMode::e_vertical)
 
void setHorizontal (bool is_horizontal)
 
 ~InterfaceOrientationController ()
 

Static Public Member Functions

static InterfaceOrientationControllerDefault ()
 
static bool isScreenHorizontal ()
 

Detailed Description

This class is responsible for notifying and providing default layout logic when the orientation of the widget changes, such as for a screen rotaton. Espcially useful for phones that may change orientation. For example, QBoxLayouts will be set to vertical when the screen is vertical and horizontal when the screen is horizontal. Widgets can be added inverted, meaning the opposite of the default layout behavior will occur. Widget will be layed out as soon as run is called on it, and subsequently when the interface layout changes. Provided widget is destroyed on the main thread, there is no need to automatically remove it from the controller.


Constructor & Destructor Documentation

◆ InterfaceOrientationController()

◆ ~InterfaceOrientationController()

Member Function Documentation

◆ Default()

static InterfaceOrientationController & Default ( )
static

◆ isHorizontalMode()

bool isHorizontalMode ( )

◆ isScreenHorizontal()

static bool isScreenHorizontal ( )
static

◆ remove()

void remove ( QObject * widget)

◆ run() [1/7]

◆ run() [2/7]

void run ( PointWidget * widget,
uint04 lines_horz = 2,
uint04 lines_vert = 3 )

◆ run() [3/7]

void run ( QBoxLayout * l,
QBoxLayout::Direction horz = QBoxLayout::LeftToRight,
QBoxLayout::Direction vert = QBoxLayout::TopToBottom )

◆ run() [4/7]

void run ( QCustomTabWidget * w,
bool inverted_stack = false )

◆ run() [5/7]

void run ( QSplitter * splitter,
bool inverted_splitter = false )

◆ run() [6/7]

◆ run() [7/7]

◆ setHorizontal()

void setHorizontal ( bool is_horizontal)

The documentation for this class was generated from the following file: