Add .gitignore
[qcomicbook-oblomov] / src / pagenumberedit.h
1 /*
2  * This file is a part of QComicBook.
3  *
4  * Copyright (C) 2005-2006 Pawel Stolowski <yogin@linux.bydg.org>
5  *
6  * QComicBook is free software; you can redestribute it and/or modify it
7  * under terms of GNU General Public License by Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY. See GPL for more details.
11  */
12
13 #ifndef __PAGENUMBEREDIT_H
14 #define __PAGENUMBEREDIT_H
15
16 #include <qlineedit.h>
17
18 class QIntValidator;
19
20 namespace QComicBook
21 {
22         class PageNumberEdit: public QLineEdit
23         {
24                 Q_OBJECT
25
26                 private:
27                         QIntValidator *validator;
28
29                         protected slots:
30                                 void onReturn();
31                         void selectAll();
32
33                 signals:
34                         void pageSelected(int n);
35
36                 public:
37                         PageNumberEdit(QWidget *parent, int val=1, int max=99);
38                         virtual ~PageNumberEdit();
39                         void setMax(int n);
40                         int pageNumber() const;
41         };
42 }
43
44 #endif
45