2 * Copyright (C) 2003-2006 Andriy Rysin (rysin@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.
19 #ifndef __KCM_LAYOUT_H__
20 #define __KCM_LAYOUT_H__
26 #include "kxkbconfig.h"
30 class KActionCollection
;
31 class Ui_LayoutConfigWidget
;
36 class XkbOptionsModel
;
38 class LayoutConfig
: public KCModule
43 LayoutConfig(QWidget
*parent
, const QVariantList
&args
);
44 virtual ~LayoutConfig();
52 QString
createOptionString();
57 void variantChanged();
58 void showFlagChanged(bool on
);
59 void xkbShortcutPressed();
60 void xkbShortcut3dPressed();
61 void clearXkbSequence();
62 void clearXkb3dSequence();
63 void updateShortcutsLabels();
64 void xkbOptionsChanged(const QModelIndex
& topLeft
, const QModelIndex
& bottomRight
);
66 void updateGroupsFromServer();
67 void displayNameChanged(const QString
& name
);
68 void layoutSelChanged();
70 void refreshRulesUI();
71 void updateLayoutCommand();
72 void updateOptionsCommand();
79 const QString DEFAULT_VARIANT_NAME
;
80 Ui_LayoutConfigWidget
* widget
;
83 KxkbConfig m_kxkbConfig
;
84 SrcLayoutModel
* m_srcModel
;
85 DstLayoutModel
* m_dstModel
;
86 XkbOptionsModel
* m_xkbOptModel
;
87 KActionCollection
* actionCollection
;
89 void makeOptionsTab();
90 void updateStickyLimit();
91 void updateAddButton();
92 void updateDisplayName();
93 void moveSelected(int shift
);
94 int getSelectedDstLayout();