The Menu class. Represents menu screens. More...
#include <menu.h>
Public Member Functions | |
Menu () | |
Menu constructor. | |
void | createIcons () |
createIcons Creates a list of empty icons. The size of the list is determined by the numberOfElements value of the Interfaz. | |
bool | isAutomaticPosition () |
isAutomaticPosition Returns if the icons in the menu have autmatic position. More... | |
void | setAutomaticPosition (bool value) |
setAutomaticPosition Specifies if the icons have automatic position. More... | |
bool | isTitleEnabled () |
isTitleEnabled Returns if the icons have title. More... | |
void | setHasTitle (bool value) |
setHasTitle Specifies if the icons have title. More... | |
void | setIconPath (int positionIcon, const QString path) |
setIconPath Specifies the image path of the speficied icon. More... | |
QString | getIconPath (int positionIcon) |
getIconPath Returns the image path of the specified icon. More... | |
void | setIconTitle (int positionIcon, QString title) |
setIconTitle Speficies the title of the speficied icon. More... | |
QString | getIconTitle (int positionIcon) |
getIconTitle Returns the title of the specified icon. More... | |
QVector< Icon * > * | getIcons () |
getIcons Returns icons list. More... | |
void | setIcons (QVector< Icon *> *value) |
setIcons Replaces the icons in the menu. More... | |
void | setIconTopMargin (int positionIcon, int topMargin) |
setIconTopMargin Replaces the top margin of the specified icon. More... | |
int | getIconTopMargin (int positionIcon) |
getIconTopMargin Returns the top margin of the specified icon. More... | |
void | setIconBottomMargin (int positionIcon, int bottomMargin) |
setIconBottomMargin Replaces the bottom margin of the specified icon. More... | |
int | getIconBottomMargin (int positionIcon) |
getIconBottomMargin Returns the bottom margin of the specified icon. More... | |
void | setIconLeftMargin (int positionIcon, int leftMargin) |
setIconLeftMargin Replaces the left margin of the specified icon. More... | |
int | getIconLeftMargin (int positionIcon) |
getIconLeftMargin Returns the left margin of the specified icon. More... | |
void | setIconRightMargin (int positionIcon, int rigthMargin) |
setIconRightMargin Replaces the right margin of the specified icon. More... | |
int | getIconRightMargin (int positionIcon) |
getIconRightMargin Returns the right margin of the specified icon. More... | |
void | resizeNumberOfIcons () |
resizeNumberOfIcons Appends or removes icons in order not to exceed the maximum number of icons. | |
bool | getCustomPositionModified () const |
getCustomPositionModified Returns if the icons position have had modified More... | |
![]() | |
Interfaz () | |
Interfaz constructor. | |
int | getHeight () |
getHeigth Returns the screen height. More... | |
void | setHeigth (int height) |
setHeigth Replaces the screen height. More... | |
int | getWidth () |
getWidth Returns the screen width. More... | |
void | setWidth (int width) |
setWidth Repalces the screen width. More... | |
int | getNumberOfElements () const |
getNumberOfElements Returns the screen number of elements. More... | |
void | setNumberOfElements (int value) |
setNumberOfElements Raplaces the screen number of elements. More... | |
int | getNumberOfRows () const |
getNumberOfRows Returns the screen number of rows. More... | |
void | setNumberOfRows (int value) |
setNumberOfRows Raplaces the screen number of rows. More... | |
int | getNumberOfCols () const |
getNumberOfCols Returns the screen number of columns. More... | |
void | setNumberOfCols (int value) |
setNumberOfCols Replaces the screen number of columns. More... | |
QString | getImageBackground () const |
getImageBackground Returns the screen background image path. More... | |
void | setImageBackground (QString value) |
setImageBackground Replaces the screen background image path. More... | |
QColor | getColorBackground () |
getColorBackground Returns the screen background color. More... | |
void | setColorBackground (const QColor &value) |
setColorBackground Repalces the screen background color. More... | |
bool | getHasIcons () const |
getHasIcons Returns if the interface has icons. More... | |
void | setHasIcons (bool value) |
setHasIcons Specifies if the interfaces has icons. More... | |
bool | getHasImageBackground () const |
getHasImageBackground Returns if the interface has an image background. More... | |
void | setHasImageBackground (bool value) |
setHasImageBackground Specifies if the interface has an image background. More... | |
Private Attributes | |
QVector< Icon * > * | icons |
icons Menu icons. | |
bool | automaticPosition |
automaticPosition Wheter the icons have automatic position. | |
bool | customPositionModified |
customPositionModified Whether the icons position have had modified. | |
bool | hasTitle |
hasTitle Wheter the icons have title. | |
Additional Inherited Members | |
![]() | |
int | numberOfElements |
numberOfElements Screen number of elements. | |
The Menu class. Represents menu screens.
bool Menu::getCustomPositionModified | ( | ) | const |
getCustomPositionModified Returns if the icons position have had modified
True
if the position have been modified, false
otherwise. int Menu::getIconBottomMargin | ( | int | positionIcon | ) |
getIconBottomMargin Returns the bottom margin of the specified icon.
positionIcon | Index of icon. |
int Menu::getIconLeftMargin | ( | int | positionIcon | ) |
getIconLeftMargin Returns the left margin of the specified icon.
positionIcon | Index of icon. |
QString Menu::getIconPath | ( | int | positionIcon | ) |
getIconPath Returns the image path of the specified icon.
positionIcon | Index of the icon. |
int Menu::getIconRightMargin | ( | int | positionIcon | ) |
getIconRightMargin Returns the right margin of the specified icon.
positionIcon | Index of icon. |
QVector< Icon * > * Menu::getIcons | ( | ) |
getIcons Returns icons list.
QString Menu::getIconTitle | ( | int | positionIcon | ) |
getIconTitle Returns the title of the specified icon.
positionIcon | Index of the icon. |
int Menu::getIconTopMargin | ( | int | positionIcon | ) |
getIconTopMargin Returns the top margin of the specified icon.
positionIcon | Index of the icon. |
bool Menu::isAutomaticPosition | ( | ) |
isAutomaticPosition Returns if the icons in the menu have autmatic position.
True
if the icons have automatic position, false
otherwise. bool Menu::isTitleEnabled | ( | ) |
isTitleEnabled Returns if the icons have title.
True
if the icons have title, false
otherwise. void Menu::setAutomaticPosition | ( | bool | value | ) |
setAutomaticPosition Specifies if the icons have automatic position.
value | Wheter the icons have aumatic positon. |
void Menu::setHasTitle | ( | bool | value | ) |
setHasTitle Specifies if the icons have title.
value | Wheter the icons have title. |
void Menu::setIconBottomMargin | ( | int | positionIcon, |
int | bottomMargin | ||
) |
setIconBottomMargin Replaces the bottom margin of the specified icon.
positionIcon | Index of icon. |
bottomMargin | Bottom margin. |
void Menu::setIconLeftMargin | ( | int | positionIcon, |
int | leftMargin | ||
) |
setIconLeftMargin Replaces the left margin of the specified icon.
positionIcon | Index of icon. |
leftMargin | Left margin. |
void Menu::setIconPath | ( | int | positionIcon, |
const QString | path | ||
) |
setIconPath Specifies the image path of the speficied icon.
positionIcon | Index of the icon. |
path | Image path. |
void Menu::setIconRightMargin | ( | int | positionIcon, |
int | rigthMargin | ||
) |
setIconRightMargin Replaces the right margin of the specified icon.
positionIcon | Index of icon. |
rigthMargin | Right margin. |
void Menu::setIcons | ( | QVector< Icon *> * | value | ) |
setIcons Replaces the icons in the menu.
value | List of the menu icons. |
void Menu::setIconTitle | ( | int | positionIcon, |
QString | title | ||
) |
setIconTitle Speficies the title of the speficied icon.
positionIcon | Index of the icon. |
title | Title. |
void Menu::setIconTopMargin | ( | int | positionIcon, |
int | topMargin | ||
) |
setIconTopMargin Replaces the top margin of the specified icon.
positionIcon | Index of the icon. |
topMargin | Top margin. |