root/trunk/qt4-gui/src/widgets/colorbutton.h

Revision 6081, 1.4 kB (checked in by flynd, 9 months ago)

Changed widget/colorbutton to use KColorButton when building for kde.

Line 
1/*
2 * This file is part of Licq, an instant messaging client for UNIX.
3 * Copyright (C) 2006 Licq developers
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 COLORBUTTON_H
21#define COLORBUTTON_H
22
23#include "config.h"
24
25#ifdef USE_KDE
26#include <KDE/KColorButton>
27#define COLORBUTTON_BASE KColorButton
28#else
29#include <QPushButton>
30#define COLORBUTTON_BASE QPushButton
31#endif
32
33namespace LicqQtGui
34{
35class ColorButton : public COLORBUTTON_BASE
36{
37  Q_OBJECT
38
39public:
40  ColorButton(QWidget* parent = NULL);
41  QString colorName() const;
42#ifndef USE_KDE
43  QColor color() const;
44
45public slots:
46  void selectColor();
47  void setColor(const QColor& color);
48
49signals:
50   void changed(const QColor& color);
51#endif
52};
53
54} // namespace LicqQtGui
55
56#endif
Note: See TracBrowser for help on using the browser.