ff7tk  0.02
Toolkit for making FF7 Tools
DoubleCheckBox Class Reference

one text two checkable boxes More...

#include <DoubleCheckBox.h>

Inheritance diagram for DoubleCheckBox:

Signals

void box1_toggled (bool checked)
 Signal: box1 has had its state changed. More...
 
void box2_toggled (bool checked)
 Signal: box2 has had its state changed. More...
 

Public Member Functions

 DoubleCheckBox (qreal Scale=1, QWidget *parent=0)
 create a new empty Double Checkbox More...
 
 DoubleCheckBox (const QString &text, qreal Scale=1, QWidget *parent=0)
 create a new empty Double Checkbox More...
 
void setText (QString text)
 set the text displayed More...
 
void setChecked (int box, bool checked)
 set if a box is checked More...
 
bool checked (int box)
 check if a box has been checked . More...
 
void setBoxToolTip (int box, QString text)
 Set the tooltip for a checkbox. More...
 
void setToolTip (QString text)
 Set the tooltip for the widget. More...
 

Private Slots

void cb_one_toggled (bool checked)
 
void cb_two_toggled (bool checked)
 

Private Member Functions

void init_display ()
 
void init_connections ()
 

Private Attributes

QCheckBox * cb_one
 
QCheckBox * cb_two
 
QLabel * label
 
qreal scale
 

Detailed Description

one text two checkable boxes

Definition at line 30 of file DoubleCheckBox.h.

Constructor & Destructor Documentation

DoubleCheckBox::DoubleCheckBox ( qreal  Scale = 1,
QWidget *  parent = 0 
)
explicit

create a new empty Double Checkbox

Parameters
parentparent of this widget

Definition at line 18 of file DoubleCheckBox.cpp.

References init_connections(), init_display(), and scale.

DoubleCheckBox::DoubleCheckBox ( const QString &  text,
qreal  Scale = 1,
QWidget *  parent = 0 
)
explicit

create a new empty Double Checkbox

Parameters
textText for this checkbox
parentparent of this widget

Definition at line 25 of file DoubleCheckBox.cpp.

References init_connections(), init_display(), scale, and setText().

Member Function Documentation

void DoubleCheckBox::box1_toggled ( bool  checked)
signal

Signal: box1 has had its state changed.

Parameters
checkedchecked state

Referenced by cb_one_toggled().

void DoubleCheckBox::box2_toggled ( bool  checked)
signal

Signal: box2 has had its state changed.

Parameters
checkedchecked state

Referenced by cb_two_toggled().

void DoubleCheckBox::cb_one_toggled ( bool  checked)
privateslot

Definition at line 75 of file DoubleCheckBox.cpp.

References box1_toggled().

Referenced by init_connections().

void DoubleCheckBox::cb_two_toggled ( bool  checked)
privateslot

Definition at line 76 of file DoubleCheckBox.cpp.

References box2_toggled().

Referenced by init_connections().

bool DoubleCheckBox::checked ( int  box)

check if a box has been checked .

Parameters
boxcheckbox (1-2) 1 is closest to text
Returns
checkbox checked ?

Definition at line 66 of file DoubleCheckBox.cpp.

References cb_one, and cb_two.

void DoubleCheckBox::init_connections ( void  )
private

Definition at line 51 of file DoubleCheckBox.cpp.

References cb_one, cb_one_toggled(), cb_two, and cb_two_toggled().

Referenced by DoubleCheckBox().

void DoubleCheckBox::init_display ( void  )
private

Definition at line 33 of file DoubleCheckBox.cpp.

References cb_one, cb_two, label, and scale.

Referenced by DoubleCheckBox().

void DoubleCheckBox::setBoxToolTip ( int  box,
QString  text 
)

Set the tooltip for a checkbox.

Parameters
boxcheckbox (1-2) 1 is closest to text
texttooltip text

Definition at line 78 of file DoubleCheckBox.cpp.

References cb_one, and cb_two.

Referenced by MenuListWidget::init_display(), and PhsListWidget::init_display().

void DoubleCheckBox::setChecked ( int  box,
bool  checked 
)

set if a box is checked

Parameters
boxcheckbox (1-2) 1 is closest to text
checkedis this box checked?

Definition at line 57 of file DoubleCheckBox.cpp.

References cb_one, and cb_two.

Referenced by MenuListWidget::setChecked(), and PhsListWidget::setChecked().

void DoubleCheckBox::setText ( QString  text)

set the text displayed

Parameters
textText for this checkbox

Definition at line 56 of file DoubleCheckBox.cpp.

References label.

Referenced by DoubleCheckBox().

void DoubleCheckBox::setToolTip ( QString  text)

Set the tooltip for the widget.

Parameters
texttooltip text

Definition at line 87 of file DoubleCheckBox.cpp.

References label.

Member Data Documentation

QCheckBox* DoubleCheckBox::cb_one
private

Definition at line 88 of file DoubleCheckBox.h.

Referenced by checked(), init_connections(), init_display(), setBoxToolTip(), and setChecked().

QCheckBox* DoubleCheckBox::cb_two
private

Definition at line 89 of file DoubleCheckBox.h.

Referenced by checked(), init_connections(), init_display(), setBoxToolTip(), and setChecked().

QLabel* DoubleCheckBox::label
private

Definition at line 90 of file DoubleCheckBox.h.

Referenced by init_display(), setText(), and setToolTip().

qreal DoubleCheckBox::scale
private

Definition at line 91 of file DoubleCheckBox.h.

Referenced by DoubleCheckBox(), and init_display().


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