2
// A special widget which draws a sample of KDE widgets
3
// It is used to preview color schemes
5
// Copyright (c) Mark Donohoe 1998
8
#ifndef __WIDGETCANVAS_H__
9
#define __WIDGETCANVAS_H__
12
#include <kapplication.h>
14
#define MAX_HOTSPOTS 28
15
#define SCROLLBAR_SIZE 16
17
// These defines define the order of the colors in the combo box.
18
#define CSM_Standard_background 0
19
#define CSM_Standard_text 1
20
#define CSM_Select_background 2
21
#define CSM_Select_text 3
23
#define CSM_Followed_Link 5
24
#define CSM_Background 6
26
#define CSM_Button_background 8
27
#define CSM_Button_text 9
28
#define CSM_Active_title_bar 10
29
#define CSM_Active_title_text 11
30
#define CSM_Active_title_blend 12
31
#define CSM_Active_title_button 13
32
#define CSM_Inactive_title_bar 14
33
#define CSM_Inactive_title_text 15
34
#define CSM_Inactive_title_blend 16
35
#define CSM_Inactive_title_button 17
36
#define CSM_Active_frame 18
37
#define CSM_Active_handle 19
38
#define CSM_Inactive_frame 20
39
#define CSM_Inactive_handle 21
40
#define CSM_Alternate_background 22
52
HotSpot( const QRect &r, int num )
53
: rect(r), number(num) {}
59
class WidgetCanvas : public QWidget
64
WidgetCanvas( QWidget *parent=0 );
65
void drawSampleWidgets();
66
void resetTitlebarPixmaps(const QColor &active,
67
const QColor &inactive);
68
void addToolTip( int area, const QString & );
93
QColor alternateBackground;
99
void widgetSelected( int );
100
void colorDropped( int, const QColor&);
103
void redrawPopup(const QColorGroup &cg);
105
virtual void paintEvent( QPaintEvent * );
106
virtual void mousePressEvent( QMouseEvent * );
107
virtual void mouseMoveEvent( QMouseEvent * );
108
virtual void resizeEvent( QResizeEvent * );
109
virtual void showEvent( QShowEvent * );
110
virtual void dropEvent( QDropEvent *);
111
virtual void dragEnterEvent( QDragEnterEvent *);
112
void paletteChange( const QPalette & );
114
QMap<int,QString> tips;
115
HotSpot hotspots[MAX_HOTSPOTS];