summaryrefslogtreecommitdiffstats
path: root/chalk/ui/kis_color_cup.h
blob: ad18a4494e7af55860dbecd67095dc3d0852e237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/* This file is part of the KDE project
 *
 * Copyright (c) 2005 Boudewijn Rempt <boud@valdyas.org>
 *
 *  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; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  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.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
#ifndef KIS_COLOR_CUP_H
#define KIS_COLOR_CUP_H

#include <tqpushbutton.h>
#include <tqcolor.h>
#include <tqframe.h>

#include <koffice_export.h>

class TQSize;
class TQPainter;
class TQWidget;
class KHSSelector;
class KValueSelector;

class KisColorPopup : public TQFrame {

    TQ_OBJECT
  

public:

    KisColorPopup(TQColor color, TQWidget * w, const char * name);
    virtual ~KisColorPopup() {};

signals:

    void changed(const TQColor &);

private:

    KHSSelector * m_khsSelector;
    KValueSelector * m_valueSelector;

    TQColor m_color;
};

class KRITAUI_EXPORT KisColorCup : public TQPushButton {

    TQ_OBJECT
  

public:

    KisColorCup(TQWidget * parent, const char * name = 0);
    
    virtual ~KisColorCup() {};
    
    TQColor color() { return m_color; };
    
signals:

    void changed(const TQColor &);

public:

    TQSize sizeHint() const;

public slots:

    void setColor(const TQColor & c);


private slots:
    
    void slotClicked();

protected:

    virtual void drawButtonLabel( TQPainter *p );

private:

    KisColorPopup * m_popup;
    TQColor m_color;
};

#endif