ff7tk  0.02
Toolkit for making FF7 Tools
ChocoboLabel Class Reference

A Label to display a single chocobo's brief data. More...

#include <ChocoboLabel.h>

Inheritance diagram for ChocoboLabel:

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
 

Detailed Description

A Label to display a single chocobo's brief data.

Definition at line 29 of file ChocoboLabel.h.

Constructor & Destructor Documentation

ChocoboLabel::ChocoboLabel ( qreal  Scale = 1,
QString  titleText = "",
bool  occupied = false,
QWidget *  parent = 0 
)
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

Parameters
parentParent of this widget
titleTextName for the box something like "Stable 1 "
occupiedIs 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().

Member Function Documentation

void ChocoboLabel::chkOccupiedToggled ( bool  occupied)
privateslot

occupied clicked

Parameters
occupiedstate of checkbox

Definition at line 169 of file ChocoboLabel.cpp.

References enable(), and occupiedToggled().

Referenced by ChocoboLabel().

void ChocoboLabel::clearLabel ( void  )
slot
void ChocoboLabel::clicked ( )
signal

Emit Signal: the widget has been clicked.

Referenced by ChocoboLabel(), and event().

void ChocoboLabel::copy ( )
signal

Emit Signal: the copy button pressed.

Referenced by copyPushed().

void ChocoboLabel::copyPushed ( void  )
privateslot

copy has been pressed

Definition at line 175 of file ChocoboLabel.cpp.

References copy().

Referenced by ChocoboLabel().

void ChocoboLabel::enable ( bool  enabled)
private

enable/disable inner part of the form when needed

Parameters
enabledenable the lower frame?

Definition at line 203 of file ChocoboLabel.cpp.

References innerFrame, isEnabled, and setSelected().

Referenced by chkOccupiedToggled(), ChocoboLabel(), and setOccupied().

bool ChocoboLabel::event ( QEvent *  ev)
private

Definition at line 19 of file ChocoboLabel.cpp.

References clicked(), and isEnabled.

bool ChocoboLabel::isOccupied ( void  )
slot

occupied state

Returns
true if occupied

Definition at line 223 of file ChocoboLabel.cpp.

References chkOccupied.

void ChocoboLabel::occupiedToggled ( bool  occupied)
signal

the occupied checkbox has been toggled

Parameters
occupiedis this stable occupied?

Referenced by chkOccupiedToggled().

void ChocoboLabel::paste ( )
signal

Emit Signal: the paste button pressed.

Referenced by pastePushed().

void ChocoboLabel::pastePushed ( void  )
privateslot

paste has been pressed

Definition at line 177 of file ChocoboLabel.cpp.

References paste().

Referenced by ChocoboLabel().

void ChocoboLabel::remove ( )
signal

Emit Signal: the remove button pressed.

void ChocoboLabel::removePushed ( void  )
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.

void ChocoboLabel::setFontSize ( int  fontSize)
slot

Set the size of the labels font.

Parameters
fontSizepointSize of the font for this label

Definition at line 194 of file ChocoboLabel.cpp.

References lblName, lblRank, lblSex, and lblType.

Referenced by ChocoboLabel().

void ChocoboLabel::setHoverColorStyle ( QString  backgroundColor)
slot

Set the style for when you hover.

Parameters
backgroundColorA 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().

void ChocoboLabel::setName ( QString  decodedName)
slot

Set string to be shown as chocobo's name.

Parameters
decodedNameString 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().

void ChocoboLabel::setOccupied ( bool  occupied)
slot

Set if the stall is occupied.

Parameters
occupiedis 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().

void ChocoboLabel::setRank ( int  wins)
slot

Show the racing rank of the chocobo.

Parameters
winsnumber of race wins chocobo has.

Definition at line 152 of file ChocoboLabel.cpp.

References lblRank.

Referenced by clearLabel(), and ChocoboManager::labelUpdate().

void ChocoboLabel::setSelected ( bool  selected)
slot

Change if the label looks selected.

Parameters
selectedis 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().

void ChocoboLabel::setSex ( bool  Male)
slot

Set the sex of the chocobo.

Parameters
Maleis this chocobo a male?
See also
setSex(int)

Definition at line 139 of file ChocoboLabel.cpp.

References lblSex.

Referenced by clearLabel(), and ChocoboManager::labelUpdate().

void ChocoboLabel::setSex ( int  sex)
slot

Set the sex of the chocobo.

Parameters
sex0:male 1:female
See also
setSex(bool)

Definition at line 145 of file ChocoboLabel.cpp.

References lblSex.

void ChocoboLabel::setTitle ( QString  title)
slot

The occupied checkbox has been toggled.

Parameters
titleString that will be shown as labels title

Definition at line 135 of file ChocoboLabel.cpp.

References chkOccupied.

void ChocoboLabel::setType ( int  type)
slot

Set the type of chocobo shown on the label.

Parameters
typethe 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().

Member Data Documentation

QPushButton* ChocoboLabel::btnCopy
private

copy button

Definition at line 71 of file ChocoboLabel.h.

Referenced by ChocoboLabel().

QPushButton* ChocoboLabel::btnPaste
private

paste button

Definition at line 72 of file ChocoboLabel.h.

Referenced by ChocoboLabel().

QPushButton* ChocoboLabel::btnRemove
private

remove button

Definition at line 73 of file ChocoboLabel.h.

Referenced by ChocoboLabel().

QCheckBox* ChocoboLabel::chkOccupied
private

checkbox to show if occupied

Definition at line 74 of file ChocoboLabel.h.

Referenced by ChocoboLabel(), isOccupied(), removePushed(), setCheckBoxStyle(), setOccupied(), and setTitle().

QFrame* ChocoboLabel::innerFrame
private

inner frame of widget contains all the chocobo into

Definition at line 79 of file ChocoboLabel.h.

Referenced by ChocoboLabel(), enable(), and setSelected().

bool ChocoboLabel::isEnabled
private

isEnabled hold if enabled

Definition at line 70 of file ChocoboLabel.h.

Referenced by enable(), and event().

QLabel* ChocoboLabel::lblName
private

label to show name

Definition at line 76 of file ChocoboLabel.h.

Referenced by ChocoboLabel(), setFontSize(), and setName().

QLabel* ChocoboLabel::lblRank
private

label to show rank

Definition at line 77 of file ChocoboLabel.h.

Referenced by ChocoboLabel(), setFontSize(), and setRank().

QLabel* ChocoboLabel::lblSex
private

label to show sex

Definition at line 78 of file ChocoboLabel.h.

Referenced by ChocoboLabel(), setFontSize(), and setSex().

QLabel* ChocoboLabel::lblType
private

isEnabled hold if enabled

Definition at line 75 of file ChocoboLabel.h.

Referenced by ChocoboLabel(), setFontSize(), and setType().

QFrame* ChocoboLabel::outerFrame
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().

qreal ChocoboLabel::scale
private

Definition at line 82 of file ChocoboLabel.h.

Referenced by ChocoboLabel().

QString ChocoboLabel::SelectedBkStyle
private

style for background when selected

Definition at line 81 of file ChocoboLabel.h.

Referenced by setHoverColorStyle(), and setSelected().


The documentation for this class was generated from the following files: