ff7tk  0.02
Toolkit for making FF7 Tools
Go to the documentation of this file.
1 /****************************************************************************/
2 // copyright 2013 -2016 Chris Rizzitello <sithlord48@gmail.com> //
3 // //
4 // This file is part of FF7tk //
5 // //
6 // FF7tk is free software: you can redistribute it and/or modify //
7 // it under the terms of the GNU General Public License as published by //
8 // the Free Software Foundation, either version 3 of the License, or //
9 // (at your option) any later version. //
10 // //
11 // FF7tk is distributed in the hope that it will be useful, //
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
14 // GNU General Public License for more details. //
15 /****************************************************************************/
19 #include "qglobal.h"
20 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
21  #include <QtWidgets>
22 #else
23  #include <QtGui>
24 #endif
29 class ChocoboLabel : public QWidget
30 {
32 public:
40  explicit ChocoboLabel(qreal Scale=1,QString titleText="",bool occupied=false,QWidget *parent = 0);
42  void setCheckBoxStyle(QString styleSheet);
43 signals:
44  void clicked();
45  void copy();
46  void paste();
47  void remove();
48  void occupiedToggled(bool occupied);
49 public slots:
50  void setSelected(bool selected);
51  void setType(int type);
52  void setName(QString decodedName);
53  void setRank(int wins);
54  void setSex(bool Male);
55  void setSex(int sex);
56  void setOccupied(bool occupied);
57  void setTitle(QString title);
58  void setFontSize(int fontSize);
59  void clearLabel(void);
60  void setHoverColorStyle(QString backgroundColor);
61  bool isOccupied(void);
62 private slots:
63  void chkOccupiedToggled(bool occupied);
64  void copyPushed(void);
65  void pastePushed(void);
66  void removePushed(void);
67 private:
68  void enable(bool enabled);
69  bool event(QEvent *ev);
70  bool isEnabled;
71  QPushButton *btnCopy;
72  QPushButton *btnPaste;
73  QPushButton *btnRemove;
74  QCheckBox *chkOccupied;
75  QLabel *lblType;
76  QLabel *lblName;
77  QLabel *lblRank;
78  QLabel *lblSex;
79  QFrame *innerFrame;
80  QFrame *outerFrame;
81  QString SelectedBkStyle;
82  qreal scale;
83 };
84 #endif // ChocoboLABEL_H
void copyPushed(void)
copy has been pressed
void setName(QString decodedName)
Set string to be shown as chocobo&#39;s name.
QLabel * lblType
isEnabled hold if enabled
Definition: ChocoboLabel.h:75
ChocoboLabel(qreal Scale=1, QString titleText="", bool occupied=false, QWidget *parent=0)
Create a new Chocobo label.
A Label to display a single chocobo&#39;s brief data.
Definition: ChocoboLabel.h:29
QFrame * outerFrame
outer frame of widget contains the label checkbox, copy,paste,remove buttons
Definition: ChocoboLabel.h:80
void pastePushed(void)
paste has been pressed
void setSelected(bool selected)
Change if the label looks selected.
QFrame * innerFrame
inner frame of widget contains all the chocobo into
Definition: ChocoboLabel.h:79
void enable(bool enabled)
enable/disable inner part of the form when needed
void setTitle(QString title)
The occupied checkbox has been toggled.
void setType(int type)
Set the type of chocobo shown on the label.
bool isOccupied(void)
occupied state
void setRank(int wins)
Show the racing rank of the chocobo.
QString SelectedBkStyle
style for background when selected
Definition: ChocoboLabel.h:81
void clicked()
Emit Signal: the widget has been clicked.
void paste()
Emit Signal: the paste button pressed.
QPushButton * btnRemove
remove button
Definition: ChocoboLabel.h:73
void copy()
Emit Signal: the copy button pressed.
void removePushed(void)
remove has been pressed
QLabel * lblRank
label to show rank
Definition: ChocoboLabel.h:77
void setOccupied(bool occupied)
Set if the stall is occupied.
bool event(QEvent *ev)
bool isEnabled
isEnabled hold if enabled
Definition: ChocoboLabel.h:70
void occupiedToggled(bool occupied)
the occupied checkbox has been toggled
QCheckBox * chkOccupied
checkbox to show if occupied
Definition: ChocoboLabel.h:74
QLabel * lblName
label to show name
Definition: ChocoboLabel.h:76
void setFontSize(int fontSize)
Set the size of the labels font.
void chkOccupiedToggled(bool occupied)
occupied clicked
void setCheckBoxStyle(QString styleSheet)
style the checkboxes of this widget easily.
QLabel * lblSex
label to show sex
Definition: ChocoboLabel.h:78
void setSex(bool Male)
Set the sex of the chocobo.
QPushButton * btnPaste
paste button
Definition: ChocoboLabel.h:72
void setHoverColorStyle(QString backgroundColor)
Set the style for when you hover.
QPushButton * btnCopy
copy button
Definition: ChocoboLabel.h:71
void clearLabel(void)
Clear the labels data.