custom buttons
[colorflood] / colorflood / src / colorbutton.hpp
diff --git a/colorflood/src/colorbutton.hpp b/colorflood/src/colorbutton.hpp
new file mode 100644 (file)
index 0000000..4058fcc
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+  Copyright 2010 Serge Ziryukin <ftrvxmtrx@gmail.com>
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; version 2 of the License.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+*/
+
+#ifndef _COLORBUTTON_HPP
+#define _COLORBUTTON_HPP
+
+#include <QPushButton>
+
+class ColorButton : public QPushButton
+{
+    Q_OBJECT;
+
+public:
+    ColorButton (QWidget *parent, int brush);
+
+private:
+    const int brush;
+
+protected:
+    void paintEvent (QPaintEvent *event);
+};
+
+#endif // !_COLORBUTTON_HPP