summaryrefslogtreecommitdiffstats
path: root/kwin-styles/glow/config/glowconfigdialog.h
blob: 2190b3ce87db932a11b9a185cae44c75ac82b57e (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
/***************************************************************************
                          glowconfigdialog.h  -  description
                             -------------------
    begin                : Thu Sep 12 2001
    copyright            : (C) 2001 by Henning Burchardt
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef GLOW_CONFIG_DIALOG_H
#define GLOW_CONFIG_DIALOG_H

#include <qvaluevector.h>
#include <qobject.h>

class QListView;
class QPushButton;
class QSignalMapper;
class QCheckBox;
class QComboBox;
class KConfig;
class KColorButton;

class GlowConfigDialog : public QObject
{
	Q_OBJECT

public:
	GlowConfigDialog( KConfig* conf, QWidget* parent );
	~GlowConfigDialog();

signals:
	void changed();

public slots:
	void load( KConfig* conf );
	void save( KConfig* conf );
	void defaults();

protected slots:
	void slotTitleButtonClicked(int);
	void slotColorButtonChanged(const QColor&);
	void slotTitlebarGradientTypeChanged(int);
	void slotResizeHandleCheckBoxChanged();
	void slotThemeListViewSelectionChanged ();

private slots:
	void slotLoadThemeList ();
	
private:
	enum ButtonType{stickyButton, helpButton, iconifyButton,
		maximizeButton, closeButton };

	KConfig *_glowConfig;

	bool _showResizeHandle;
	KPixmapEffect::GradientType _titlebarGradientType;
	QString _theme_name;

	QWidget *_main_group_box;
	QGroupBox *_button_glow_color_group_box;
	QGroupBox *_theme_group_box;

	QListView * _theme_list_view;

	QCheckBox *_showResizeHandleCheckBox;
	QComboBox *_titlebarGradientTypeComboBox;

	QPushButton *_stickyButton;
	QPushButton *_helpButton;
	QPushButton *_iconifyButton;
	QPushButton *_maximizeButton;
	QPushButton *_closeButton;
	QSignalMapper *_titleButtonMapper;

	QColor* _buttonConfigMap;
	QValueVector<QPushButton*> _titleButtonList;
	
	KColorButton *_colorButton;
};

#endif