QTfrontend/ui/widget/MinesTimeSpinBox.h
changeset 11815 68bc5ebce319
child 12824 c75781937859
equal deleted inserted replaced
11814:8eccc307ca1e 11815:68bc5ebce319
       
     1 /*
       
     2  * Hedgewars, a free turn based strategy game
       
     3  * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com>
       
     4  *
       
     5  * This program is free software; you can redistribute it and/or modify
       
     6  * it under the terms of the GNU General Public License as published by
       
     7  * the Free Software Foundation; version 2 of the License
       
     8  *
       
     9  * This program is distributed in the hope that it will be useful,
       
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12  * GNU General Public License for more details.
       
    13  *
       
    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
       
    16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    17  */
       
    18 
       
    19 /**
       
    20  * @file
       
    21  * @brief MinesTimeSpinBox class definition
       
    22  */
       
    23 
       
    24 #ifndef HEDGEWARS_MINESTIMESPINBOX_H
       
    25 #define HEDGEWARS_MINESTIMESPINBOX_H
       
    26 
       
    27 #include <QObject>
       
    28 #include <QSpinBox>
       
    29 
       
    30 /**
       
    31  * <code>SpinBox</code> that returns its value as localized mines time.
       
    32  * @since  0.9.23
       
    33  */
       
    34 class MinesTimeSpinBox : public QSpinBox
       
    35 {
       
    36         Q_OBJECT
       
    37 
       
    38     public:
       
    39         /**
       
    40          * @brief Class constructor.
       
    41          * @param parent parent widget.
       
    42          */
       
    43         MinesTimeSpinBox(QWidget * parent);
       
    44 
       
    45     protected:
       
    46         /**
       
    47          * Returns it's value localized.
       
    48          * @param value integer value to be representing as string.
       
    49          * @return string representation
       
    50          */
       
    51         QString textFromValue(int value) const;
       
    52 };
       
    53 
       
    54 
       
    55 #endif // HEDGEWARS_MINESTIMESPINBOX_H