-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfigdialog.h
124 lines (96 loc) · 2.88 KB
/
configdialog.h
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/* This file is part of the KDE project
Copyright (C) 2000 by Carsten Pfeiffer <pfeiffer@kde.org>
Copyright (C) 2008 by Dmitry Suzdalev <dimsuz@gmail.com>
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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CONFIGDIALOG_H
#define CONFIGDIALOG_H
#include <KConfigDialog>
#include "urlgrabber.h"
#include "ui_generalconfig.h"
#include "ui_actionsconfig.h"
class KConfigSkeleton;
class KShortcutsEditor;
class Klipper;
class KEditListWidget;
class KActionCollection;
class EditActionDialog;
class GeneralWidget : public QWidget
{
Q_OBJECT
public:
GeneralWidget(QWidget* parent);
void updateWidgets();
private:
Ui::GeneralWidget m_ui;
};
class ActionsWidget : public QWidget
{
Q_OBJECT
public:
ActionsWidget(QWidget* parent);
void setActionList(const ActionList&);
void setExcludedWMClasses(const QStringList&);
ActionList actionList() const;
QStringList excludedWMClasses() const;
void resetModifiedState();
private Q_SLOTS:
void onSelectionChanged();
void onAddAction();
void onEditAction();
void onDeleteAction();
void onAdvanced();
private:
void updateActionItem( QTreeWidgetItem* item, ClipAction* action );
void updateActionListView();
Ui::ActionsWidget m_ui;
EditActionDialog* m_editActDlg;
/**
* List of actions this page works with
*/
ActionList m_actionList;
QStringList m_exclWMClasses;
};
// only for use inside ActionWidget
class AdvancedWidget : public QWidget
{
Q_OBJECT
public:
explicit AdvancedWidget( QWidget* parent = 0L );
~AdvancedWidget();
void setWMClasses( const QStringList& items );
QStringList wmClasses() const;
private:
KEditListWidget* editListBox;
};
class ConfigDialog : public KConfigDialog
{
Q_OBJECT
public:
ConfigDialog( QWidget* parent, KConfigSkeleton* config, const Klipper* klipper, KActionCollection* collection );
~ConfigDialog();
private:
// reimp
void updateWidgets();
// reimp
void updateSettings();
// reimp
void updateWidgetsDefault();
private:
GeneralWidget* m_generalPage;
ActionsWidget* m_actionsPage;
KShortcutsEditor* m_shortcutsWidget;
const Klipper* m_klipper;
};
#endif // CONFIGDIALOG_H