PCManFM-Qt
colorbutton.h
1 /*
2 
3  Copyright (C) 2013 Hong Jen Yee (PCMan) <pcman.tw@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; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program 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 along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef FM_COLORBUTTON_H
22 #define FM_COLORBUTTON_H
23 
24 #include "libfmqtglobals.h"
25 #include <QPushButton>
26 #include <QColor>
27 
28 namespace Fm {
29 
30 class LIBFM_QT_API ColorButton : public QPushButton {
31 Q_OBJECT
32 
33 public:
34  explicit ColorButton(QWidget* parent = 0);
35  virtual ~ColorButton();
36 
37  void setColor(const QColor&);
38 
39  QColor color() const {
40  return color_;
41  }
42 
43 Q_SIGNALS:
44  void changed();
45 
46 private Q_SLOTS:
47  void onClicked();
48 
49 private:
50  QColor color_;
51 };
52 
53 }
54 
55 #endif // FM_COLORBUTTON_H
Definition: appchoosercombobox.cpp:26
Definition: colorbutton.h:30