2 * Copyright (C) 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.
27 #include <QtGui/QWidget>
31 #include "kxkbconfig.h"
34 // LayoutMap is used for per-window or per-application switching policy
36 typedef QQueue
<int> LayoutQueue
;
37 typedef QMap
<WId
, LayoutQueue
> WinLayoutMap
;
38 typedef QMap
<QString
, LayoutQueue
> WinClassLayoutMap
;
41 LayoutMap(const KxkbConfig
& kxkbConfig
);
42 // void setConfig(const KxkbConfig& kxkbConfig);
44 void setCurrentLayout(int layout
);
46 int getCurrentLayout();
53 LayoutQueue m_globalLayouts
;
54 WinLayoutMap m_winLayouts
;
55 WinClassLayoutMap m_appLayouts
;
57 const KxkbConfig
& m_kxkbConfig
;
60 QString m_currentWinClass
; // only for SWITCH_POLICY_WIN_CLASS
62 void initLayoutQueue(LayoutQueue
& layoutQueue
);
63 LayoutQueue
& getCurrentLayoutQueue();
64 LayoutQueue
& getCurrentLayoutQueueInternal();