Add Traditional Chinese desktop entry
[lxde/compton-conf.git] / maindialog.h
CommitLineData
012d3267
HJYP
1/*
2 * <one line to give the library's name and an idea of what it does.>
3 * Copyright (C) 2013 <copyright holder> <email>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library 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 GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 */
20
21#ifndef MAINDIALOG_H
22#define MAINDIALOG_H
23
24#include <QDialog>
25#include <libconfig.h>
26
27namespace Ui
28{
29 class MainDialog;
30}
31
b6646b0a
HJYP
32class QAbstractButton;
33
012d3267
HJYP
34class MainDialog : public QDialog
35{
36 Q_OBJECT
37public:
c3b7cf80 38 MainDialog(QString userConfigFile = QString());
012d3267
HJYP
39 ~MainDialog();
40
c3b7cf80
HJYP
41 virtual void done(int res);
42
43private:
44 void saveConfig();
b6646b0a 45 void updateShadowColorButton();
c3b7cf80 46
b6646b0a
HJYP
47 void configSetInt(const char* key, int val);
48 void configSetFloat(const char* key, double val);
49 void configSetBool(const char* key, bool val);
96ff239b 50 void configSetString(const char* key, const char* val);
51
012d3267
HJYP
52private Q_SLOTS:
53 void onButtonToggled(bool checked);
54 void onSpinValueChanged(double d);
55 void onSpinValueChanged(int i);
b6646b0a
HJYP
56 void onDialogButtonClicked(QAbstractButton* button);
57 void onColorButtonClicked();
aaecf43e 58 void onAboutButtonClicked();
96ff239b 59 void onRadioGroupToggled(bool checked);
012d3267
HJYP
60
61private:
c3b7cf80
HJYP
62 Ui::MainDialog* ui;
63 config_t config_;
64 QString userConfigFile_;
b6646b0a 65 QColor shadowColor_;
012d3267
HJYP
66};
67
68#endif // MAINDIALOG_H