QTfrontend/ui/widget/FreqSpinBox.h
changeset 6205 7764cbe4ddd7
parent 6062 2827ded8a5ef
child 6212 a5d95f32e17f
equal deleted inserted replaced
6204:80cd75daf80f 6205:7764cbe4ddd7
    14  * You should have received a copy of the GNU General Public License
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program; if not, write to the Free Software
    15  * along with this program; if not, write to the Free Software
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    17  */
    17  */
    18 
    18 
    19 #ifndef FREQSPINBOX_H
    19 /**
    20 #define FREQSPINBOX_H
    20  * @file
       
    21  * @brief FreqSpinBox class definition
       
    22  */
    21 
    23 
       
    24 #ifndef HEDGEWARS_FREQSPINBOX_H
       
    25 #define HEDGEWARS_FREQSPINBOX_H
    22 
    26 
    23 #include <QObject>
    27 #include <QObject>
    24 #include <QSpinBox>
    28 #include <QSpinBox>
    25 
    29 
    26 /**
    30 /**
    27  * A SpinBox that returns it's value as localized turn frequency.
    31  * <code>SpinBox</code> that returns its value as localized turn frequency.
    28  * 'Never', 'Every Turn', 'Every 2 Turns', etc.
    32  * 'Never', 'Every Turn', 'Every 2 Turns', etc.
    29  * @author unc0rr
    33  * @author unc0rr
    30  * @since  0.9.12
    34  * @since  0.9.12
    31  */
    35  */
    32 class FreqSpinBox : public QSpinBox
    36 class FreqSpinBox : public QSpinBox
    33 {
    37 {
    34     Q_OBJECT
    38     Q_OBJECT
    35 
    39 
    36 public:
    40 public:
    37     FreqSpinBox(QWidget* parent) : QSpinBox(parent) {};
    41     /**
       
    42      * @brief Class constructor.
       
    43      * @param parent parent widget.
       
    44      */
       
    45     FreqSpinBox(QWidget * parent);
    38 
    46 
    39 protected:
    47 protected:
       
    48     /**
       
    49      * Returns it's value as localized frequency.
       
    50      * 'Never', 'Every Turn', 'Every 2 Turns', etc.
       
    51      * @param value integer value to be representing as string.
       
    52      * @return the turn frequence-like string representation.
       
    53      */
    40     QString textFromValue(int value) const;
    54     QString textFromValue(int value) const;
    41 };
    55 };
    42 
    56 
    43 
    57 
    44 #endif // FREQSPINBOX_H
    58 #endif // FREQSPINBOX_H