summaryrefslogtreecommitdiffstats
path: root/kxkb/kxkbconfig.h
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2021-05-01 15:14:43 +0300
committerMavridis Philippe <[email protected]>2021-05-16 16:02:45 +0300
commit63b5e825b82b0f6936a97865d1907c5998f302af (patch)
tree6396d5da047f12b3575700d041f8dc8ccf06e173 /kxkb/kxkbconfig.h
parent3419424baa9c910ba9b9ef7dbc7017451867fcdc (diff)
downloadtdebase-63b5e825b82b0f6936a97865d1907c5998f302af.tar.gz
tdebase-63b5e825b82b0f6936a97865d1907c5998f302af.zip
Added customization options for Kxkb
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'kxkb/kxkbconfig.h')
-rw-r--r--kxkb/kxkbconfig.h46
1 files changed, 28 insertions, 18 deletions
diff --git a/kxkb/kxkbconfig.h b/kxkb/kxkbconfig.h
index 82fe610c9..0f8c981ea 100644
--- a/kxkb/kxkbconfig.h
+++ b/kxkb/kxkbconfig.h
@@ -1,7 +1,7 @@
//
// C++ Interface: kxkbconfig
//
-// Description:
+// Description:
//
//
// Author: Andriy Rysin <[email protected]>, (C) 2006
@@ -14,13 +14,15 @@
#include <tqstring.h>
#include <tqstringlist.h>
+#include <tqcolor.h>
+#include <tqfont.h>
#include <tqptrqueue.h>
#include <tqmap.h>
/* Utility classes for per-window/per-application layout implementation
*/
-enum SwitchingPolicy {
+enum SwitchingPolicy {
SWITCH_POLICY_GLOBAL = 0,
SWITCH_POLICY_WIN_CLASS = 1,
SWITCH_POLICY_WINDOW = 2,
@@ -29,12 +31,12 @@ enum SwitchingPolicy {
-inline TQString createPair(TQString key, TQString value)
+inline TQString createPair(TQString key, TQString value)
{
if( value.isEmpty() )
return key;
return TQString("%1(%2)").arg(key, value);
-}
+}
struct LayoutUnit {
TQString layout;
@@ -42,41 +44,41 @@ struct LayoutUnit {
TQString includeGroup;
TQString displayName;
int defaultGroup;
-
+
LayoutUnit() {}
-
+
LayoutUnit(TQString layout_, TQString variant_):
layout(layout_),
variant(variant_)
{}
-
+
LayoutUnit(TQString pair) {
setFromPair( pair );
}
-
+
void setFromPair(const TQString& pair) {
layout = parseLayout(pair);
variant = parseVariant(pair);
}
-
+
TQString toPair() const {
return createPair(layout, variant);
}
-
+
bool operator<(const LayoutUnit& lu) const {
return layout<lu.layout ||
(layout==lu.layout && variant<lu.variant);
}
-
+
bool operator!=(const LayoutUnit& lu) const {
return layout!=lu.layout || variant!=lu.variant;
}
-
+
bool operator==(const LayoutUnit& lu) const {
// kdDebug() << layout << "==" << lu.layout << "&&" << variant << "==" << lu.variant << endl;
return layout==lu.layout && variant==lu.variant;
}
-
+
//private:
static const TQString parseLayout(const TQString &layvar);
static const TQString parseVariant(const TQString &layvar);
@@ -90,31 +92,39 @@ class KxkbConfig
{
public:
enum { LOAD_INIT_OPTIONS, LOAD_ACTIVE_OPTIONS, LOAD_ALL };
-
+
bool m_useKxkb;
bool m_showSingle;
bool m_showFlag;
+ bool m_showLabel;
bool m_enableXkbOptions;
bool m_resetOldOptions;
SwitchingPolicy m_switchingPolicy;
bool m_stickySwitching;
int m_stickySwitchingDepth;
-
+
+ bool m_useThemeColors;
+ TQColor m_colorBackground;
+ TQColor m_colorLabel;
+ TQFont m_labelFont;
+ bool m_labelShadow;
+ TQColor m_colorShadow;
+
TQString m_model;
TQString m_options;
TQValueList<LayoutUnit> m_layouts;
LayoutUnit getDefaultLayout();
-
+
bool load(int loadMode);
void save();
void setDefaults();
-
+
TQStringList getLayoutStringList(/*bool compact*/);
static TQString getDefaultDisplayName(const TQString& code_);
static TQString getDefaultDisplayName(const LayoutUnit& layoutUnit, bool single=false);
-private:
+private:
static const TQMap<TQString, TQString> parseIncludesMap(const TQStringList& pairList);
};