ff7tk
0.02
Toolkit for making FF7 Tools
|
A Label to display a single chocobo's brief data. More...
#include <ChocoboLabel.h>
Public Slots | |
void | setSelected (bool selected) |
Change if the label looks selected. More... | |
void | setType (int type) |
Set the type of chocobo shown on the label. More... | |
void | setName (QString decodedName) |
Set string to be shown as chocobo's name. More... | |
void | setRank (int wins) |
Show the racing rank of the chocobo. More... | |
void | setSex (bool Male) |
Set the sex of the chocobo. More... | |
void | setSex (int sex) |
Set the sex of the chocobo. More... | |
void | setOccupied (bool occupied) |
Set if the stall is occupied. More... | |
void | setTitle (QString title) |
The occupied checkbox has been toggled. More... | |
void | setFontSize (int fontSize) |
Set the size of the labels font. More... | |
void | clearLabel (void) |
Clear the labels data. More... | |
void | setHoverColorStyle (QString backgroundColor) |
Set the style for when you hover. More... | |
bool | isOccupied (void) |
occupied state More... | |
Signals | |
void | clicked () |
Emit Signal: the widget has been clicked. More... | |
void | copy () |
Emit Signal: the copy button pressed. More... | |
void | paste () |
Emit Signal: the paste button pressed. More... | |
void | remove () |
Emit Signal: the remove button pressed. More... | |
void | occupiedToggled (bool occupied) |
the occupied checkbox has been toggled More... | |
Public Member Functions | |
ChocoboLabel (qreal Scale=1, QString titleText="", bool occupied=false, QWidget *parent=0) | |
Create a new Chocobo label. More... | |
void | setCheckBoxStyle (QString styleSheet) |
style the checkboxes of this widget easily. More... | |
Private Slots | |
void | chkOccupiedToggled (bool occupied) |
occupied clicked More... | |
void | copyPushed (void) |
copy has been pressed More... | |
void | pastePushed (void) |
paste has been pressed More... | |
void | removePushed (void) |
remove has been pressed More... | |
Private Member Functions | |
void | enable (bool enabled) |
enable/disable inner part of the form when needed More... | |
bool | event (QEvent *ev) |
Private Attributes | |
bool | isEnabled |
isEnabled hold if enabled More... | |
QPushButton * | btnCopy |
copy button More... | |
QPushButton * | btnPaste |
paste button More... | |
QPushButton * | btnRemove |
remove button More... | |
QCheckBox * | chkOccupied |
checkbox to show if occupied More... | |
QLabel * | lblType |
isEnabled hold if enabled More... | |
QLabel * | lblName |
label to show name More... | |
QLabel * | lblRank |
label to show rank More... | |
QLabel * | lblSex |
label to show sex More... | |
QFrame * | innerFrame |
inner frame of widget contains all the chocobo into More... | |
QFrame * | outerFrame |
outer frame of widget contains the label checkbox, copy,paste,remove buttons More... | |
QString | SelectedBkStyle |
style for background when selected More... | |
qreal | scale |
A Label to display a single chocobo's brief data.
Definition at line 29 of file ChocoboLabel.h.
|
explicit |
Create a new Chocobo label.
This Widget is designed to be part of a more complex chocobo manager (chocoboManager) it is useful on its own but will need to be
parent | Parent of this widget |
titleText | Name for the box something like "Stable 1 " |
occupied | Is there a chocobo here? else set a blank label |
Definition at line 24 of file ChocoboLabel.cpp.
References btnCopy, btnPaste, btnRemove, chkOccupied, chkOccupiedToggled(), clicked(), copyPushed(), enable(), innerFrame, lblName, lblRank, lblSex, lblType, outerFrame, pastePushed(), removePushed(), scale, and setFontSize().
|
privateslot |
occupied clicked
occupied | state of checkbox |
Definition at line 169 of file ChocoboLabel.cpp.
References enable(), and occupiedToggled().
Referenced by ChocoboLabel().
|
slot |
Clear the labels data.
Definition at line 186 of file ChocoboLabel.cpp.
References setName(), setRank(), setSex(), and setType().
Referenced by ChocoboManager::occupiedToggled(), removePushed(), ChocoboManager::setChocobo(), ChocoboManager::setData(), and ChocoboManager::setOccupied().
|
signal |
Emit Signal: the widget has been clicked.
Referenced by ChocoboLabel(), and event().
|
signal |
Emit Signal: the copy button pressed.
Referenced by copyPushed().
|
privateslot |
copy has been pressed
Definition at line 175 of file ChocoboLabel.cpp.
References copy().
Referenced by ChocoboLabel().
|
private |
enable/disable inner part of the form when needed
enabled | enable the lower frame? |
Definition at line 203 of file ChocoboLabel.cpp.
References innerFrame, isEnabled, and setSelected().
Referenced by chkOccupiedToggled(), ChocoboLabel(), and setOccupied().
|
private |
Definition at line 19 of file ChocoboLabel.cpp.
|
slot |
occupied state
Definition at line 223 of file ChocoboLabel.cpp.
References chkOccupied.
|
signal |
the occupied checkbox has been toggled
occupied | is this stable occupied? |
Referenced by chkOccupiedToggled().
|
signal |
Emit Signal: the paste button pressed.
Referenced by pastePushed().
|
privateslot |
paste has been pressed
Definition at line 177 of file ChocoboLabel.cpp.
References paste().
Referenced by ChocoboLabel().
|
signal |
Emit Signal: the remove button pressed.
|
privateslot |
remove has been pressed
Definition at line 179 of file ChocoboLabel.cpp.
References chkOccupied, and clearLabel().
Referenced by ChocoboLabel().
void ChocoboLabel::setCheckBoxStyle | ( | QString | styleSheet | ) |
style the checkboxes of this widget easily.
Definition at line 225 of file ChocoboLabel.cpp.
References chkOccupied.
|
slot |
Set the size of the labels font.
fontSize | pointSize of the font for this label |
Definition at line 194 of file ChocoboLabel.cpp.
References lblName, lblRank, lblSex, and lblType.
Referenced by ChocoboLabel().
|
slot |
Set the style for when you hover.
backgroundColor | A valid color for a style sheet either a predefined color or rgb(r,g,b) style string |
Definition at line 227 of file ChocoboLabel.cpp.
References SelectedBkStyle.
Referenced by ChocoboManager::setHoverStyle().
|
slot |
Set string to be shown as chocobo's name.
decodedName | String to be displayed as name. will not be decoded from ff7text format |
Definition at line 137 of file ChocoboLabel.cpp.
References lblName.
Referenced by clearLabel(), and ChocoboManager::labelUpdate().
|
slot |
Set if the stall is occupied.
occupied | is this stable occupied? |
Definition at line 161 of file ChocoboLabel.cpp.
References chkOccupied, and enable().
Referenced by ChocoboManager::labelUpdate(), ChocoboManager::paste(), ChocoboManager::sbOwnedChanged(), and ChocoboManager::setOccupied().
|
slot |
Show the racing rank of the chocobo.
wins | number of race wins chocobo has. |
Definition at line 152 of file ChocoboLabel.cpp.
References lblRank.
Referenced by clearLabel(), and ChocoboManager::labelUpdate().
|
slot |
Change if the label looks selected.
selected | is this label selected? |
Definition at line 210 of file ChocoboLabel.cpp.
References innerFrame, outerFrame, and SelectedBkStyle.
Referenced by ChocoboManager::clicked(), enable(), ChocoboManager::initDisplay(), ChocoboManager::occupiedToggled(), ChocoboManager::rmChocobo(), and ChocoboManager::setData().
|
slot |
Set the sex of the chocobo.
Male | is this chocobo a male? |
Definition at line 139 of file ChocoboLabel.cpp.
References lblSex.
Referenced by clearLabel(), and ChocoboManager::labelUpdate().
|
slot |
Set the sex of the chocobo.
sex | 0:male 1:female |
Definition at line 145 of file ChocoboLabel.cpp.
References lblSex.
|
slot |
The occupied checkbox has been toggled.
title | String that will be shown as labels title |
Definition at line 135 of file ChocoboLabel.cpp.
References chkOccupied.
|
slot |
Set the type of chocobo shown on the label.
type | the type of chocobo 0:yellow 1:green 2:blue 3:black 4:gold. |
Definition at line 122 of file ChocoboLabel.cpp.
References lblType.
Referenced by clearLabel(), and ChocoboManager::labelUpdate().
|
private |
|
private |
|
private |
|
private |
checkbox to show if occupied
Definition at line 74 of file ChocoboLabel.h.
Referenced by ChocoboLabel(), isOccupied(), removePushed(), setCheckBoxStyle(), setOccupied(), and setTitle().
|
private |
inner frame of widget contains all the chocobo into
Definition at line 79 of file ChocoboLabel.h.
Referenced by ChocoboLabel(), enable(), and setSelected().
|
private |
isEnabled hold if enabled
Definition at line 70 of file ChocoboLabel.h.
|
private |
label to show name
Definition at line 76 of file ChocoboLabel.h.
Referenced by ChocoboLabel(), setFontSize(), and setName().
|
private |
label to show rank
Definition at line 77 of file ChocoboLabel.h.
Referenced by ChocoboLabel(), setFontSize(), and setRank().
|
private |
label to show sex
Definition at line 78 of file ChocoboLabel.h.
Referenced by ChocoboLabel(), setFontSize(), and setSex().
|
private |
isEnabled hold if enabled
Definition at line 75 of file ChocoboLabel.h.
Referenced by ChocoboLabel(), setFontSize(), and setType().
|
private |
outer frame of widget contains the label checkbox, copy,paste,remove buttons
Definition at line 80 of file ChocoboLabel.h.
Referenced by ChocoboLabel(), and setSelected().
|
private |
Definition at line 82 of file ChocoboLabel.h.
Referenced by ChocoboLabel().
|
private |
style for background when selected
Definition at line 81 of file ChocoboLabel.h.
Referenced by setHoverColorStyle(), and setSelected().