API Documentation
|
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 InterfaceOrientationController & | Default () |
static bool | isScreenHorizontal () |
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.
|
static |
bool isHorizontalMode | ( | ) |
|
static |
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 | ) |