custom buttons
[colorflood] / colorflood / src / colorbutton.hpp
1 /*
2   Copyright 2010 Serge Ziryukin <ftrvxmtrx@gmail.com>
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; version 2 of the License.
7
8   This program is distributed in the hope that it will be useful,
9   but WITHOUT ANY WARRANTY; without even the implied warranty of
10   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   GNU General Public License for more details.
12 */
13
14 #ifndef _COLORBUTTON_HPP
15 #define _COLORBUTTON_HPP
16
17 #include <QPushButton>
18
19 class ColorButton : public QPushButton
20 {
21     Q_OBJECT;
22
23 public:
24     ColorButton (QWidget *parent, int brush);
25
26 private:
27     const int brush;
28
29 protected:
30     void paintEvent (QPaintEvent *event);
31 };
32
33 #endif // !_COLORBUTTON_HPP