summaryrefslogtreecommitdiffstats
path: root/kkbswitch/kbconfig.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kkbswitch/kbconfig.cpp')
-rw-r--r--kkbswitch/kbconfig.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/kkbswitch/kbconfig.cpp b/kkbswitch/kbconfig.cpp
index 41bb6f1..02594af 100644
--- a/kkbswitch/kbconfig.cpp
+++ b/kkbswitch/kbconfig.cpp
@@ -16,17 +16,17 @@
***************************************************************************/
#include <config.h>
-#include <kdeversion.h>
-#include <klocale.h>
-#include <kglobal.h>
-#if KDE_VERSION_MAJOR >= 3
+#include <tdeversion.h>
+#include <tdelocale.h>
+#include <tdeglobal.h>
+#if TDE_VERSION_MAJOR >= 3
#include <kstandarddirs.h>
- #include <kapplication.h>
+ #include <tdeapplication.h>
#else
#include <kstddirs.h>
#include <kapp.h>
#endif
-#include <kglobalsettings.h>
+#include <tdeglobalsettings.h>
#include <kdebug.h>
#include <kglobalaccel.h>
@@ -58,7 +58,7 @@ KBConfig::KBConfig()
m_group_scope = SCOPE_GLOBAL;
m_autostart = true;
m_icon_style = ICON_CODE_AND_FLAG;
- //m_keys = new KGlobalAccel(NULL);
+ //m_keys = new TDEGlobalAccel(NULL);
m_keys = NULL;
}
@@ -67,8 +67,8 @@ KBConfig::~KBConfig()
delete m_keys;
}
-/** load the KBSwitch configration from the application KConfig object */
-void KBConfig::load(KConfig *config){
+/** load the KBSwitch configration from the application TDEConfig object */
+void KBConfig::load(TDEConfig *config){
config->setGroup(OPTIONS_SECTION);
m_toggle_mode = config->readBoolEntry(TOGGLE_MODE_ENTRY);
m_default_groupno = config->readNumEntry(DEFAULT_GROUP_ENTRY);
@@ -100,7 +100,7 @@ void KBConfig::load(KConfig *config){
}
if (m_keys) delete m_keys;
- m_keys = new KGlobalAccel(NULL);
+ m_keys = new TDEGlobalAccel(NULL);
for (int i = 0; i < groupCount(); i++) {
m_keys->insert(TQString::fromLatin1("SetGroup %1").arg(i),
i18n("Activate %1 keyboard layout").arg(m_groups[i]->getName()),
@@ -111,7 +111,7 @@ void KBConfig::load(KConfig *config){
checkKeysEnabled();
}
-void KBConfig::save(KConfig *config)
+void KBConfig::save(TDEConfig *config)
{
config->setGroup(OPTIONS_SECTION);
config->writeEntry(TOGGLE_MODE_ENTRY, m_toggle_mode);
@@ -130,9 +130,9 @@ void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
TQString path, countryCode, langCode;
TQStringList layouts;
- KGlobal::dirs()->addResourceDir("appdata", ".");
- KConfig map("group_names", true, true, "appdata");
- KConfig *config = kapp->config();
+ TDEGlobal::dirs()->addResourceDir("appdata", ".");
+ TDEConfig map("group_names", true, true, "appdata");
+ TDEConfig *config = kapp->config();
config->setGroup(ICONS_SECTION);
getXkbLayouts(layouts);
@@ -163,8 +163,8 @@ void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
/** No descriptions */
/*void KBConfig::guessGroupPixmaps(){
- KGlobal::dirs()->addResourceDir("appdata", ".");
- KConfig map("group_names", true, true, "appdata");
+ TDEGlobal::dirs()->addResourceDir("appdata", ".");
+ TDEConfig map("group_names", true, true, "appdata");
TQString path, countryCode, langCode;
TQPixmap pix;
@@ -188,7 +188,7 @@ void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
}*/
bool KBConfig::getGroupImage(TQImage &img, TQString &path, const TQString &code,
- int group, KConfig *config)
+ int group, TDEConfig *config)
{
bool ret = true;
bool need_to_scale = false;
@@ -217,7 +217,7 @@ bool KBConfig::getGroupImage(TQImage &img, TQString &path, const TQString &code,
}
void KBConfig::drawFlagPixmap(TQPixmap &pix, TQString &path, const TQString &code,
- int group, KConfig *config)
+ int group, TDEConfig *config)
{
TQImage img;
if (getGroupImage(img, path, code, group, config))
@@ -232,9 +232,9 @@ void KBConfig::drawCodePixmap(TQPixmap &pix, const TQString &code)
TQFont font("helvetica", 9, TQFont::Bold);
font.setPixelSize(10);
painter.setFont(font);
- painter.setPen(KGlobalSettings::highlightedTextColor());
+ painter.setPen(TDEGlobalSettings::highlightedTextColor());
- pix.fill(KGlobalSettings::highlightColor());
+ pix.fill(TDEGlobalSettings::highlightColor());
painter.drawText(1, 0, pix.width(), pix.height(),
TQt::AlignHCenter | TQt::AlignVCenter, code.upper());
@@ -243,13 +243,13 @@ void KBConfig::drawCodePixmap(TQPixmap &pix, const TQString &code)
}
void KBConfig::drawCodeAndFlagPixmap(TQPixmap &pix, TQString &path,
- const TQString &countryCode, const TQString &langCode, int group, KConfig *config)
+ const TQString &countryCode, const TQString &langCode, int group, TDEConfig *config)
{
TQImage img;
if (!getGroupImage(img, path, countryCode, group, config)) return; // could not find flag
if (img.depth() <= 8) img = img.convertDepth(32);
- // the following code is taken from kdebase/kxkb/pixmap.cpp
+ // the following code is taken from tdebase/kxkb/pixmap.cpp
for (int y = 0; y < img.height(); y++)
for(int x = 0; x < img.width(); x++) {
TQRgb rgb = img.pixel(x, y);
@@ -297,7 +297,7 @@ void KBConfig::checkKeysEnabled()
}*/
/** No descriptions */
-/*void KBConfig::loadConfiguredPixmaps(KConfig *config){
+/*void KBConfig::loadConfiguredPixmaps(TDEConfig *config){
TQString path;
TQPixmap pix;
config->setGroup(ICONS_SECTION);