2 * Copyright (c) 2004 Lubos Lunak <l.lunak@kde.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __RULESWIDGET_H__
21 #define __RULESWIDGET_H__
24 #include <kwindowsystem.h>
25 #include <kkeysequencewidget.h>
27 #include "ui_ruleswidgetbase.h"
28 #include "ui_editshortcut.h"
37 : public QWidget
, public Ui::RulesWidgetBase
41 RulesWidget( QWidget
* parent
= NULL
);
42 void setRules( Rules
* r
);
45 void prepareWindowSpecific( WId window
);
47 void changed( bool state
);
50 void wmclassMatchChanged();
51 void roleMatchChanged();
52 void titleMatchChanged();
53 void extraMatchChanged();
54 void machineMatchChanged();
55 void shortcutEditClicked();
58 void updateEnableposition();
59 void updateEnablesize();
60 void updateEnabledesktop();
61 void updateEnablemaximizehoriz();
62 void updateEnablemaximizevert();
63 void updateEnableminimize();
64 void updateEnableshade();
65 void updateEnablefullscreen();
66 void updateEnableplacement();
68 void updateEnableabove();
69 void updateEnablebelow();
70 void updateEnablenoborder();
71 void updateEnableskiptaskbar();
72 void updateEnableskippager();
73 void updateEnableacceptfocus();
74 void updateEnablecloseable();
75 void updateEnableopacityactive();
76 void updateEnableopacityinactive();
78 void updateEnablefsplevel();
79 void updateEnablemoveresizemode();
80 void updateEnabletype();
81 void updateEnableignoreposition();
82 void updateEnableminsize();
83 void updateEnablemaxsize();
84 void updateEnablestrictgeometry();
85 void updateEnableshortcut();
86 void updateEnabledisableglobalshortcuts();
88 void detected( bool );
90 int desktopToCombo( int d
) const;
91 int comboToDesktop( int val
) const;
92 void prefillUnusedValues( const KWindowInfo
& info
);
93 DetectDialog
* detect_dlg
;
102 explicit RulesDialog( QWidget
* parent
= NULL
, const char* name
= NULL
);
103 Rules
* edit( Rules
* r
, WId window
, bool show_hints
);
105 virtual void accept();
114 : public QWidget
, public Ui_EditShortcut
118 EditShortcut( QWidget
* parent
= NULL
);
121 void clearShortcut();
124 class EditShortcutDialog
129 EditShortcutDialog( QWidget
* parent
= NULL
, const char* name
= NULL
);
130 void setShortcut( const QString
& cut
);
131 QString
shortcut() const;
133 EditShortcut
* widget
;
136 // slightly duped from utils.cpp
142 ShortcutDialog( const QKeySequence
& cut
, QWidget
* parent
= NULL
);
143 virtual void accept();
144 QKeySequence
shortcut() const;
146 KKeySequenceWidget
* widget
;