From 4f841fbbbc5d3399535ade061699cc76363c7a3f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 3 Feb 2013 22:59:55 -0600 Subject: Rename KStyle to TDEStyle to avoid conflicts with KDE4 --- kpersonalizer/kospage.cpp | 8 ++--- kpersonalizer/kpersonalizer.cpp | 2 +- kpersonalizer/kpersonalizer.h | 4 +-- kpersonalizer/kstylepage.cpp | 66 ++++++++++++++++++++--------------------- kpersonalizer/kstylepage.h | 6 ++-- kpersonalizer/kstylepagedlg.ui | 4 +-- 6 files changed, 45 insertions(+), 45 deletions(-) (limited to 'kpersonalizer') diff --git a/kpersonalizer/kospage.cpp b/kpersonalizer/kospage.cpp index 26964e0fa..ef004823b 100644 --- a/kpersonalizer/kospage.cpp +++ b/kpersonalizer/kospage.cpp @@ -109,19 +109,19 @@ void KOSPage::saveCheckState(bool currSettings){ // write the settings to the configfiles, depending on wich radiobutton is checked if(rb_kde->isChecked()){ writeKDE(); - emit selectedOS("KDE"); // send a signal to be caught by the KStylePage to set the according style by default depending on the OS selection + emit selectedOS("KDE"); // send a signal to be caught by the TDEStylePage to set the according style by default depending on the OS selection } else if(rb_unix->isChecked()){ writeUNIX(); - emit selectedOS("CDE"); // send a signal to be caught by the KStylePage to set the according style by default depending on the OS selection + emit selectedOS("CDE"); // send a signal to be caught by the TDEStylePage to set the according style by default depending on the OS selection } else if(rb_windows->isChecked()){ writeWindows(); - emit selectedOS("win"); // send a signal to be caught by the KStylePage to set the according style by default depending on the OS selection + emit selectedOS("win"); // send a signal to be caught by the TDEStylePage to set the according style by default depending on the OS selection } else if(rb_mac->isChecked()){ writeMacOS(); - emit selectedOS("mac"); // send a signal to be caught by the KStylePage to set the according style by default depending on the OS selection + emit selectedOS("mac"); // send a signal to be caught by the TDEStylePage to set the according style by default depending on the OS selection } ckaccess->setGroup("Keyboard"); diff --git a/kpersonalizer/kpersonalizer.cpp b/kpersonalizer/kpersonalizer.cpp index dfd7319e9..787ea77b9 100644 --- a/kpersonalizer/kpersonalizer.cpp +++ b/kpersonalizer/kpersonalizer.cpp @@ -75,7 +75,7 @@ KPersonalizer::KPersonalizer(TQWidget *parent, const char *name) addPage( eyecandy, i18n( "Step 3: Eyecandy-O-Meter" ) ); setHelpEnabled(TQWizard::page(2), false); - stylepage= new KStylePage(this); + stylepage= new TDEStylePage(this); addPage( stylepage, i18n( "Step 4: Everybody loves Themes" ) ); setHelpEnabled(TQWizard::page(3), false); diff --git a/kpersonalizer/kpersonalizer.h b/kpersonalizer/kpersonalizer.h index e4db63aad..20b1ffd9e 100644 --- a/kpersonalizer/kpersonalizer.h +++ b/kpersonalizer/kpersonalizer.h @@ -32,7 +32,7 @@ class TDELocale; class KCountryPage; class KOSPage; class KEyeCandyPage; -class KStylePage; +class TDEStylePage; class KRefinePage; /** KPersonalizer is the base class of the project */ @@ -77,7 +77,7 @@ private: KCountryPage* countrypage; KOSPage* ospage; KEyeCandyPage* eyecandy; - KStylePage* stylepage; + TDEStylePage* stylepage; KRefinePage* refinepage; TDELocale* locale; bool os_dirty, eye_dirty, style_dirty; diff --git a/kpersonalizer/kstylepage.cpp b/kpersonalizer/kstylepage.cpp index 57dd38510..b6cae1697 100644 --- a/kpersonalizer/kstylepage.cpp +++ b/kpersonalizer/kstylepage.cpp @@ -43,7 +43,7 @@ #include "stylepreview.h" #include "kstylepage.h" -KStylePage::KStylePage(TQWidget *parent, const char *name ) : KStylePageDlg(parent,name) { +TDEStylePage::TDEStylePage(TQWidget *parent, const char *name ) : TDEStylePageDlg(parent,name) { px_stylesSidebar->setPixmap(UserIcon("step4.png")); @@ -88,13 +88,13 @@ KStylePage::KStylePage(TQWidget *parent, const char *name ) : KStylePageDlg(pare initColors(); } -KStylePage::~KStylePage(){ +TDEStylePage::~TDEStylePage(){ delete ctwin; delete appliedStyle; } -void KStylePage::save(bool curSettings){ - kdDebug() << "KStylePage::save()" << endl; +void TDEStylePage::save(bool curSettings){ + kdDebug() << "TDEStylePage::save()" << endl; // First, the style, then the colors as styles overwrite color settings saveStyle(curSettings); saveColors(curSettings); @@ -104,17 +104,17 @@ void KStylePage::save(bool curSettings){ } /** save the widget-style */ -void KStylePage::saveStyle(bool curSettings){ +void TDEStylePage::saveStyle(bool curSettings){ TQString style = curSettings ? currentStyle : origStyle; TDEConfig cfg( "kdeglobals" ); cfg.setGroup("General"); cfg.writeEntry( "widgetStyle", style, true, true ); cfg.sync(); - kdDebug() << "KStylePage::saveStyle(): " << style << endl; + kdDebug() << "TDEStylePage::saveStyle(): " << style << endl; } /** save the KWin-style*/ -void KStylePage::saveKWin(bool curSettings){ +void TDEStylePage::saveKWin(bool curSettings){ TQString twin = origKWinStyle; if(curSettings) { KDesktopFile* kdf = 0L; @@ -147,11 +147,11 @@ void KStylePage::saveKWin(bool curSettings){ } ctwin->writeEntry("PluginLib", twin); ctwin->sync(); - kdDebug() << "KStylePage::saveKWin(): " << twin << endl; + kdDebug() << "TDEStylePage::saveKWin(): " << twin << endl; } /** Save the color-scheme */ -void KStylePage::saveColors(bool curSettings){ +void TDEStylePage::saveColors(bool curSettings){ struct colorSet* toSave; if(curSettings) toSave=¤tColors; // set the color struct to save as the style colors @@ -213,11 +213,11 @@ void KStylePage::saveColors(bool curSettings){ kdesktop.writeEntry("Color1", toSave->usrCol1); kdesktop.writeEntry("Color2", toSave->usrCol2); kdesktop.sync(); - kdDebug() << "KStylePage::saveColors(): colorFile: " << toSave->colorFile << endl; + kdDebug() << "TDEStylePage::saveColors(): colorFile: " << toSave->colorFile << endl; } /** save the icon-theme*/ -void KStylePage::saveIcons(bool curSettings) { +void TDEStylePage::saveIcons(bool curSettings) { TQString theme = origIcons; if (curSettings) { if ( (kde->isSelected() || platinum->isSelected() || keramik->isSelected()) @@ -242,11 +242,11 @@ void KStylePage::saveIcons(bool curSettings) { TDEGlobal::config()->writeEntry("Size", icontheme.defaultSize(i)); } TDEGlobal::config()->sync(); - kdDebug() << "KStylePage::saveIcons(): " << theme << endl; + kdDebug() << "TDEStylePage::saveIcons(): " << theme << endl; } /** called whenever the selection in the listview changes */ -void KStylePage::slotCurrentChanged() { +void TDEStylePage::slotCurrentChanged() { // fill the currentColors-struct with the selected color-scheme getColors(¤tColors, true); // fill the currentStyle-string with the selected style-name @@ -254,7 +254,7 @@ void KStylePage::slotCurrentChanged() { switchPrevStyle(); } -void KStylePage::changeCurrentStyle() { +void TDEStylePage::changeCurrentStyle() { // set the style if (cde->isSelected() && cde_exist) { currentStyle="Motif"; @@ -291,14 +291,14 @@ void KStylePage::changeCurrentStyle() { } } // update the preview-widget - kdDebug() << "KStylePage::changeCurrentStyle(): "<< currentStyle << endl; + kdDebug() << "TDEStylePage::changeCurrentStyle(): "<< currentStyle << endl; } /** to be connected to the OS page. Catches * either KDE, CDE, win or mac and pre-sets the style. */ -void KStylePage::presetStyle(const TQString& style){ - kdDebug() << "KStylePage::presetStyle(): "<< style << endl; +void TDEStylePage::presetStyle(const TQString& style){ + kdDebug() << "TDEStylePage::presetStyle(): "<< style << endl; if(style=="KDE") { if (kde_plastik_exist) klv_styles->setSelected(kde,true); @@ -315,11 +315,11 @@ void KStylePage::presetStyle(const TQString& style){ } /** set the defaults for this page */ -void KStylePage::setDefaults(){ +void TDEStylePage::setDefaults(){ } /** Fill a colorSet with a colorfile, or the default. */ -void KStylePage::getColors(colorSet *set, bool colorfile ){ +void TDEStylePage::getColors(colorSet *set, bool colorfile ){ TDEConfig* config; bool deleteConfig = false; // get the color scheme file and go to the color scheme group @@ -365,7 +365,7 @@ void KStylePage::getColors(colorSet *set, bool colorfile ){ set->contrast=7; config = new KSimpleConfig(set->colorFile, true); config->setGroup("Color Scheme"); - kdDebug() << "KStylePage::getColors(): schemefile: " << set->colorFile << endl; + kdDebug() << "TDEStylePage::getColors(): schemefile: " << set->colorFile << endl; deleteConfig = true; } else { @@ -383,7 +383,7 @@ void KStylePage::getColors(colorSet *set, bool colorfile ){ set->colorFile=config->readEntry("colorScheme", ""); set->contrast=config->readNumEntry("contrast", 7); config->setGroup( "General" ); - kdDebug() << "KStylePage::getColors(): schemefile: "<< set->colorFile << endl; + kdDebug() << "TDEStylePage::getColors(): schemefile: "<< set->colorFile << endl; } set->foreground=config->readColorEntry( "foreground", &black ); set->background=config->readColorEntry( "background", &widget ); @@ -412,7 +412,7 @@ void KStylePage::getColors(colorSet *set, bool colorfile ){ } /** Test widget- and twin- styles for availability */ -void KStylePage::getAvailability() { +void TDEStylePage::getAvailability() { // test, wich styles are available kde_keramik_exist = kde_hc_exist = kde_def_exist = cde_exist = kde_plastik_exist = win_exist = platinum_exist = false; @@ -467,10 +467,10 @@ void KStylePage::getAvailability() { } /** get the user's former settings */ -void KStylePage::getUserDefaults() { +void TDEStylePage::getUserDefaults() { // Get the user's current widget-style TDEGlobal::config()->setGroup("General"); - origStyle = TDEGlobal::config()->readEntry( "widgetStyle", KStyle::defaultStyle() ); + origStyle = TDEGlobal::config()->readEntry( "widgetStyle", TDEStyle::defaultStyle() ); // get the user's current KWin-style ctwin = new TDEConfig("twinrc"); @@ -484,14 +484,14 @@ void KStylePage::getUserDefaults() { TDEGlobal::config()->setGroup("Icons"); origIcons = TDEGlobal::config()->readEntry("Theme"); - kdDebug() << "KStylePage::getUserDefaults(): style: " << origStyle << endl; - kdDebug() << "KStylePage::getUserDefaults(): KWinStyle: " << origKWinStyle << endl; - kdDebug() << "KStylePage::getUserDefaults(): Colors: " << usrColors.colorFile << endl; - kdDebug() << "KStylePage::getUserDefaults(): Icons: " << origIcons << endl; + kdDebug() << "TDEStylePage::getUserDefaults(): style: " << origStyle << endl; + kdDebug() << "TDEStylePage::getUserDefaults(): KWinStyle: " << origKWinStyle << endl; + kdDebug() << "TDEStylePage::getUserDefaults(): Colors: " << usrColors.colorFile << endl; + kdDebug() << "TDEStylePage::getUserDefaults(): Icons: " << origIcons << endl; } /** initialize KDE default color values */ -void KStylePage::initColors() { +void TDEStylePage::initColors() { widget.setRgb(239, 239, 239); trinity4Blue.setRgb(103,141,178); inactiveBackground.setRgb(157,170,186); @@ -512,7 +512,7 @@ void KStylePage::initColors() { } /** live-update the system */ -void KStylePage::liveUpdate() { +void TDEStylePage::liveUpdate() { // tell all apps about the changed icons for (int i=0; isetStyle(s); // Recursively update all children. @@ -566,7 +566,7 @@ void KStylePage::setStyleRecursive(TQWidget* w, TQPalette &palette, TQStyle* s) } /** create a TQPalette of our current colorset */ -TQPalette KStylePage::createPalette() { +TQPalette TDEStylePage::createPalette() { colorSet *cc = ¤tColors; TQColorGroup disabledgrp(cc->windowForeground, cc->background, cc->background.light(150), cc->background.dark(), cc->background.dark(120), cc->background.dark(120), diff --git a/kpersonalizer/kstylepage.h b/kpersonalizer/kstylepage.h index 2a3f554e0..7a31e26cf 100644 --- a/kpersonalizer/kstylepage.h +++ b/kpersonalizer/kstylepage.h @@ -26,12 +26,12 @@ */ class TQListViewItem; -class KStylePage : public KStylePageDlg { +class TDEStylePage : public TDEStylePageDlg { Q_OBJECT public: - KStylePage(TQWidget *parent=0, const char *name=0); - ~KStylePage(); + TDEStylePage(TQWidget *parent=0, const char *name=0); + ~TDEStylePage(); void save(bool curSettings=true); /** resets to KDE style as default */ void setDefaults(); diff --git a/kpersonalizer/kstylepagedlg.ui b/kpersonalizer/kstylepagedlg.ui index b9b6b7ac8..65570e542 100644 --- a/kpersonalizer/kstylepagedlg.ui +++ b/kpersonalizer/kstylepagedlg.ui @@ -1,8 +1,8 @@ -KStylePageDlg +TDEStylePageDlg - KStylePageDlg + TDEStylePageDlg -- cgit v1.2.1