HP Views Designer Assistant  1.0.0
TFG - Alberto Gutierrez Perez - Universidad de Valladolid
information.h
1 #ifndef INFORMATION_H
2 #define INFORMATION_H
3 #include <Model/interfaz.h>
4 #include <Model/card.h>
5 #include <QVector>
6 
10 class Information : public Interfaz
11 {
12 public:
16  Information();
17 
22  QVector<Card*> *getCards() ;
23 
28  void setCards(QVector<Card*> *value);
29 
33  void createCards();
34 
41  void addProperty(int card, QString property, QString value);
42 
50  void addProperty(int card, int propertyIndex, QString property, QString value);
51 
57  void removeProperty(int card, int indexProperty);
58 
64  int hasMaximumOfProoperties(int card);
65 
71  int getNumberOfProperties(int card);
72 
78  QString getCardTitle(int card);
79 
85  void setCardTitle(int card, QString title);
86 
92  QString getCardImage(int card);
93 
99  void setCardImage(int card, QString path);
100 
107  QStringList takeProperty(int card, int indexProperty);
108 
115  QStringList getProperty(int card, int indexProperty);
116 
121  int getCardCols() ;
122 
127  void setCardCols(int value);
128 
133  int getCardRows() ;
134 
139  void setCardRows(int value);
140 
145  void addEmptyLeftProperties(int card);
146 
150  void resizeNumberOfCards();
151 
156 
157 private:
158 
162  int cardCols;
163 
167  int cardRows;
168 
172  QVector<Card*> *cards;
173 };
174 
175 #endif // INFORMATION_H
QVector< Card * > * getCards()
getCards Returns list of the information screen cards.
Definition: information.cpp:9
int getCardRows()
getCardRows Returns the maximum number of rows in the cards.
Definition: information.cpp:93
void setCardImage(int card, QString path)
setCardImage Raplaces the image path of the specified card.
Definition: information.cpp:68
int hasMaximumOfProoperties(int card)
hasMaximumOfProoperties Returns if the card admits more properties.
Definition: information.cpp:43
void addProperty(int card, QString property, QString value)
addProperty Adds new property to the specified card.
Definition: information.cpp:28
void removeProperty(int card, int indexProperty)
removeProperty Removes the specified property at the specified card.
Definition: information.cpp:38
QStringList getProperty(int card, int indexProperty)
getProperty Returns the specified property at the card.
Definition: information.cpp:78
int cardRows
cardRows Maximum rows card number.
Definition: information.h:167
void resizeNumberOfCards()
resizeNumberOfCards Appends or removes cards in order not to exceed the maximum number of cards...
Definition: information.cpp:112
Information()
Information constructor.
Definition: information.cpp:4
void resizeNumberOfProperties()
resizeNumberOfProperties Appends of removes properties in order not to exceed the maximum number of p...
Definition: information.cpp:128
int cardCols
cardCols Maximum columns card number.
Definition: information.h:162
The Information class. Represents Information screens.
Definition: information.h:10
void setCards(QVector< Card *> *value)
setCards Repalces information screen cards.
Definition: information.cpp:14
void createCards()
createCards Creates a list of empty cards. The size of the list is determined by the numberOfElements...
Definition: information.cpp:19
QStringList takeProperty(int card, int indexProperty)
takeProperty Returns and remove the speficied property at the card.
Definition: information.cpp:73
QString getCardImage(int card)
getCardImage Returns the image path of the specified card.
Definition: information.cpp:58
QVector< Card * > * cards
cards List of cards in the interface.
Definition: information.h:172
The Interfaz class. Represents generic screen.
Definition: interfaz.h:10
void setCardRows(int value)
setCardRows Replaces the number of rows in the cards.
Definition: information.cpp:98
int getNumberOfProperties(int card)
getNumberOfProperties Returns the number of properties in the specified card.
Definition: information.cpp:48
void setCardTitle(int card, QString title)
setCardTitle Replaces the title of the specified card.
Definition: information.cpp:53
void setCardCols(int value)
setCardCols Raplaces the number of columns in the cards.
Definition: information.cpp:88
int getCardCols()
getCardCols Returns the maximum number of columns in the cards.
Definition: information.cpp:83
QString getCardTitle(int card)
getCardTitle Returns the title of the specified card.
Definition: information.cpp:63
void addEmptyLeftProperties(int card)
addEmptyLeftProperties Adds empty properties until the maximum number of properties in the card is re...
Definition: information.cpp:103