HP Views Designer Assistant  1.0.0
TFG - Alberto Gutierrez Perez - Universidad de Valladolid
menu.h
1 #ifndef MENU_H
2 #define MENU_H
3 
4 #include <Model/interfaz.h>
5 #include <QColor>
6 #include <QVector>
7 
11 class Menu : public Interfaz
12 {
13 public:
14 
18  Menu();
19 
23  void createIcons();
24 
29  bool isAutomaticPosition() ;
30 
35  void setAutomaticPosition(bool value);
36 
41  bool isTitleEnabled() ;
42 
47  void setHasTitle(bool value);
48 
54  void setIconPath(int positionIcon, const QString path) ;
55 
61  QString getIconPath(int positionIcon);
62 
68  void setIconTitle(int positionIcon, QString title);
69 
75  QString getIconTitle(int positionIcon);
76 
81  QVector<Icon*> *getIcons() ;
82 
87  void setIcons(QVector<Icon*> *value);
88 
94  void setIconTopMargin(int positionIcon, int topMargin);
95 
101  int getIconTopMargin(int positionIcon);
102 
108  void setIconBottomMargin(int positionIcon, int bottomMargin);
109 
115  int getIconBottomMargin(int positionIcon);
116 
122  void setIconLeftMargin(int positionIcon, int leftMargin);
123 
129  int getIconLeftMargin(int positionIcon);
130 
136  void setIconRightMargin(int positionIcon, int rigthMargin);
137 
143  int getIconRightMargin(int positionIcon);
144 
148  void resizeNumberOfIcons();
149 
154  bool getCustomPositionModified() const;
155 
156 private:
157 
161  QVector<Icon*> *icons;
162 
167 
172 
176  bool hasTitle;
177 
178 };
179 
180 #endif // MENU_H
void setIconPath(int positionIcon, const QString path)
setIconPath Specifies the image path of the speficied icon.
Definition: menu.cpp:49
bool hasTitle
hasTitle Wheter the icons have title.
Definition: menu.h:176
Menu()
Menu constructor.
Definition: menu.cpp:3
The Menu class. Represents menu screens.
Definition: menu.h:11
QString getIconPath(int positionIcon)
getIconPath Returns the image path of the specified icon.
Definition: menu.cpp:54
QString getIconTitle(int positionIcon)
getIconTitle Returns the title of the specified icon.
Definition: menu.cpp:64
void setIcons(QVector< Icon *> *value)
setIcons Replaces the icons in the menu.
Definition: menu.cpp:44
void setIconTopMargin(int positionIcon, int topMargin)
setIconTopMargin Replaces the top margin of the specified icon.
Definition: menu.cpp:69
int getIconBottomMargin(int positionIcon)
getIconBottomMargin Returns the bottom margin of the specified icon.
Definition: menu.cpp:86
void resizeNumberOfIcons()
resizeNumberOfIcons Appends or removes icons in order not to exceed the maximum number of icons...
Definition: menu.cpp:113
bool automaticPosition
automaticPosition Wheter the icons have automatic position.
Definition: menu.h:166
QVector< Icon * > * icons
icons Menu icons.
Definition: menu.h:161
void createIcons()
createIcons Creates a list of empty icons. The size of the list is determined by the numberOfElements...
Definition: menu.cpp:9
void setHasTitle(bool value)
setHasTitle Specifies if the icons have title.
Definition: menu.cpp:33
int getIconTopMargin(int positionIcon)
getIconTopMargin Returns the top margin of the specified icon.
Definition: menu.cpp:75
bool isAutomaticPosition()
isAutomaticPosition Returns if the icons in the menu have autmatic position.
Definition: menu.cpp:18
The Interfaz class. Represents generic screen.
Definition: interfaz.h:10
void setAutomaticPosition(bool value)
setAutomaticPosition Specifies if the icons have automatic position.
Definition: menu.cpp:23
bool getCustomPositionModified() const
getCustomPositionModified Returns if the icons position have had modified
Definition: menu.cpp:129
bool customPositionModified
customPositionModified Whether the icons position have had modified.
Definition: menu.h:171
void setIconBottomMargin(int positionIcon, int bottomMargin)
setIconBottomMargin Replaces the bottom margin of the specified icon.
Definition: menu.cpp:80
bool isTitleEnabled()
isTitleEnabled Returns if the icons have title.
Definition: menu.cpp:28
void setIconLeftMargin(int positionIcon, int leftMargin)
setIconLeftMargin Replaces the left margin of the specified icon.
Definition: menu.cpp:91
QVector< Icon * > * getIcons()
getIcons Returns icons list.
Definition: menu.cpp:39
int getIconLeftMargin(int positionIcon)
getIconLeftMargin Returns the left margin of the specified icon.
Definition: menu.cpp:97
void setIconTitle(int positionIcon, QString title)
setIconTitle Speficies the title of the speficied icon.
Definition: menu.cpp:59
int getIconRightMargin(int positionIcon)
getIconRightMargin Returns the right margin of the specified icon.
Definition: menu.cpp:108
void setIconRightMargin(int positionIcon, int rigthMargin)
setIconRightMargin Replaces the right margin of the specified icon.
Definition: menu.cpp:102