1 /*
2  * This file is part of Licq, an instant messaging client for UNIX.
3  * Copyright (C) 2012 Licq developers <licq-dev@googlegroups.com>
4  *
5  * Licq 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; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * Licq is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with Licq; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19 
20 #ifndef LICQQTGUI_SPECIALSPINBOX_H
21 #define LICQQTGUI_SPECIALSPINBOX_H
22 
23 #include <QSpinBox>
24 
25 namespace LicqQtGui
26 {
27 
28 /**
29  * Convenience overload of QSpinBox to handle special value better
30  */
31 class SpecialSpinBox : public QSpinBox
32 {
33   Q_OBJECT
34 
35 public:
36   /**
37    * Constructor
38    *
39    * @param minimum Lower end of range (used for special value)
40    * @param maximum Upper end of range
41    * @param specialValueText Special text to show for minimum value
42    * @parent Widget parent
43    */
44   SpecialSpinBox(int minimum, int maximum, const QString& specialValueText, QWidget* parent = NULL);
45 
46 private slots:
47   /// Editing has finished
48   void finished();
49 };
50 
51 } // namespace LicqQtGui
52 
53 #endif
54