Rename KStyle to TDEStyle to avoid conflicts with KDE4

pull/2/head
Timothy Pearson 11 years ago
parent 3e5506b29b
commit 4f841fbbbc

@ -402,7 +402,7 @@ void KColorScheme::save()
XDeleteProperty( tqt_xdisplay(), tqt_xrootwin(), XA_RESOURCE_MANAGER );
#endif
}
runRdb( flags ); // Save the palette to qtrc for KStyles
runRdb( flags ); // Save the palette to qtrc for TDEStyles
// Notify all TDE applications
KIPC::sendMessageAll(KIPC::PaletteChanged);

@ -252,7 +252,7 @@ static void applyQtSettings( TDEConfig& kglobals, TQSettings& settings )
/* export widget style */
kglobals.setGroup("General");
TQString style = kglobals.readEntry("widgetStyle", KStyle::defaultStyle() );
TQString style = kglobals.readEntry("widgetStyle", TDEStyle::defaultStyle() );
if (!style.isEmpty())
settings.writeEntry("/qt/style", style);

@ -324,7 +324,7 @@ TQString KTheme::createYourself( bool pack )
// 10. Widget style
globalConf->setGroup( "General" );
TQDomElement widgetsElem = m_dom.createElement( "widgets" );
widgetsElem.setAttribute( "name", globalConf->readEntry( "widgetStyle",KStyle::defaultStyle() ) );
widgetsElem.setAttribute( "name", globalConf->readEntry( "widgetStyle",TDEStyle::defaultStyle() ) );
m_root.appendChild( widgetsElem );
// 12.

@ -519,15 +519,15 @@ void KCMStyle::save()
bool allowMenuTransparency = false;
bool allowMenuDropShadow = false;
// Read the KStyle flags to see if the style writer
// Read the TDEStyle flags to see if the style writer
// has enabled menu translucency in the style.
if (appliedStyle && appliedStyle->inherits("KStyle"))
if (appliedStyle && appliedStyle->inherits("TDEStyle"))
{
allowMenuDropShadow = true;
KStyle* style = dynamic_cast<KStyle*>(appliedStyle);
TDEStyle* style = dynamic_cast<TDEStyle*>(appliedStyle);
if (style) {
KStyle::KStyleFlags flags = style->styleFlags();
if (flags & KStyle::AllowMenuTransparency)
TDEStyle::TDEStyleFlags flags = style->styleFlags();
if (flags & TDEStyle::AllowMenuTransparency)
allowMenuTransparency = true;
}
}
@ -573,8 +573,8 @@ void KCMStyle::save()
config.writeEntry( "EffectFadeTooltip", item == 2 );
item = comboRubberbandEffect->currentItem();
{
TQSettings settings; // Only for KStyle stuff
settings.writeEntry("/KStyle/Settings/SemiTransparentRubberband", item == 1);
TQSettings settings; // Only for TDEStyle stuff
settings.writeEntry("/TDEStyle/Settings/SemiTransparentRubberband", item == 1);
}
item = comboMenuHandle->currentItem();
config.writeEntry( "InsertTearOffHandle", item );
@ -582,7 +582,7 @@ void KCMStyle::save()
config.writeEntry( "EffectAnimateMenu", item == 1 );
config.writeEntry( "EffectFadeMenu", item == 2 );
// Handle KStyle's menu effects
// Handle TDEStyle's menu effects
TQString engine("Disabled");
if (item == 3 && cbEnableEffects->isChecked()) // Make Translucent
switch( comboMenuEffectType->currentItem())
@ -594,19 +594,19 @@ void KCMStyle::save()
}
{ // Braces force a TQSettings::sync()
TQSettings settings; // Only for KStyle stuff
settings.writeEntry("/KStyle/Settings/MenuTransparencyEngine", engine);
settings.writeEntry("/KStyle/Settings/MenuOpacity", slOpacity->value()/100.0);
settings.writeEntry("/KStyle/Settings/MenuDropShadow",
TQSettings settings; // Only for TDEStyle stuff
settings.writeEntry("/TDEStyle/Settings/MenuTransparencyEngine", engine);
settings.writeEntry("/TDEStyle/Settings/MenuOpacity", slOpacity->value()/100.0);
settings.writeEntry("/TDEStyle/Settings/MenuDropShadow",
cbEnableEffects->isChecked() && cbMenuShadow->isChecked() );
}
// Misc page
config.writeEntry( "ShowIconsOnPushButtons", cbIconsOnButtons->isChecked(), true, true );
{ // Braces force a TQSettings::sync()
TQSettings settings; // Only for KStyle stuff
settings.writeEntry("/KStyle/Settings/ScrollablePopupMenus", cbScrollablePopupMenus->isChecked() );
settings.writeEntry("/KStyle/Settings/AutoHideAccelerators", cbAutoHideAccelerators->isChecked() );
TQSettings settings; // Only for TDEStyle stuff
settings.writeEntry("/TDEStyle/Settings/ScrollablePopupMenus", cbScrollablePopupMenus->isChecked() );
settings.writeEntry("/TDEStyle/Settings/AutoHideAccelerators", cbAutoHideAccelerators->isChecked() );
}
config.writeEntry( "EffectNoTooltip", !cbEnableTooltips->isChecked(), true, true );
@ -788,7 +788,7 @@ void KCMStyle::loadStyle( TDEConfig& config )
// Find out which style is currently being used
config.setGroup( "General" );
TQString defaultStyle = KStyle::defaultStyle();
TQString defaultStyle = TDEStyle::defaultStyle();
TQString cfgStyle = config.readEntry( "widgetStyle", defaultStyle );
// Select the current style
@ -914,7 +914,7 @@ void KCMStyle::loadEffects( TDEConfig& config )
comboTooltipEffect->setCurrentItem( 0 );
TQSettings settings;
bool semiTransparentRubberband = settings.readBoolEntry("/KStyle/Settings/SemiTransparentRubberband", false);
bool semiTransparentRubberband = settings.readBoolEntry("/TDEStyle/Settings/SemiTransparentRubberband", false);
comboRubberbandEffect->setCurrentItem( semiTransparentRubberband ? 1 : 0 );
if ( config.readBoolEntry( "EffectAnimateMenu", false) )
@ -926,9 +926,9 @@ void KCMStyle::loadEffects( TDEConfig& config )
comboMenuHandle->setCurrentItem(config.readNumEntry("InsertTearOffHandle", 0));
// KStyle Menu transparency and drop-shadow options...
// TDEStyle Menu transparency and drop-shadow options...
TQString effectEngine = settings.readEntry("/KStyle/Settings/MenuTransparencyEngine", "Disabled");
TQString effectEngine = settings.readEntry("/TDEStyle/Settings/MenuTransparencyEngine", "Disabled");
#ifdef HAVE_XRENDER
if (effectEngine == "XRender") {
@ -955,10 +955,10 @@ void KCMStyle::loadEffects( TDEConfig& config )
else
menuPreview->setPreviewMode( MenuPreview::Blend );
slOpacity->setValue( (int)(100 * settings.readDoubleEntry("/KStyle/Settings/MenuOpacity", 0.90)) );
slOpacity->setValue( (int)(100 * settings.readDoubleEntry("/TDEStyle/Settings/MenuOpacity", 0.90)) );
// Menu Drop-shadows...
cbMenuShadow->setChecked( settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", false) );
cbMenuShadow->setChecked( settings.readBoolEntry("/TDEStyle/Settings/MenuDropShadow", false) );
if (cbEnableEffects->isChecked()) {
containerFrame->setEnabled( true );
@ -1034,8 +1034,8 @@ void KCMStyle::loadMisc( TDEConfig& config )
cbTearOffHandles->setChecked(config.readBoolEntry("InsertTearOffHandle", false));
TQSettings settings;
cbScrollablePopupMenus->setChecked(settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false));
cbAutoHideAccelerators->setChecked(settings.readBoolEntry("/KStyle/Settings/AutoHideAccelerators", false));
cbScrollablePopupMenus->setChecked(settings.readBoolEntry("/TDEStyle/Settings/ScrollablePopupMenus", false));
cbAutoHideAccelerators->setChecked(settings.readBoolEntry("/TDEStyle/Settings/AutoHideAccelerators", false));
m_bToolbarsDirty = false;
}

@ -81,7 +81,7 @@ enum OverflowCategoryState { None, Filling, NotNeeded };
class KMenu : public KMenuBase
{
Q_OBJECT
TQ_PROPERTY (bool KStyleMenuDropShadow READ useKStyleMenuDropShadow )
TQ_PROPERTY (bool TDEStyleMenuDropShadow READ useTDEStyleMenuDropShadow )
public:
KMenu();
@ -90,7 +90,7 @@ public:
int insertClientMenu(KickerClientMenu *p);
void removeClientMenu(int id);
bool useKStyleMenuDropShadow() const { return true; }
bool useTDEStyleMenuDropShadow() const { return true; }
virtual void showMenu();
virtual bool eventFilter(TQObject*, TQEvent*);

@ -114,7 +114,7 @@ class runMenuWidget : public TQWidget, public QMenuItem
runLayout->addSpacing(KDialog::spacingHint());
TQSettings settings;
if (settings.readEntry("/KStyle/Settings/MenuTransparencyEngine", "Disabled") != "Disabled")
if (settings.readEntry("/TDEStyle/Settings/MenuTransparencyEngine", "Disabled") != "Disabled")
{
setBackgroundMode(Qt::X11ParentRelative, Qt::X11ParentRelative);
//l1->setBackgroundMode(Qt::X11ParentRelative, Qt::X11ParentRelative);

@ -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");

@ -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);

@ -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;

@ -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=&currentColors; // 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(&currentColors, 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", "<default>");
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; i<KIcon::LastGroup; i++) {
KIPC::sendMessageAll(KIPC::IconChanged, i);
@ -528,7 +528,7 @@ void KStylePage::liveUpdate() {
}
/** show the previewWidget styled with the selected one */
void KStylePage::switchPrevStyle() {
void TDEStylePage::switchPrevStyle() {
TQStyle* style = TQStyleFactory::create(currentStyle);
if (!style) return;
@ -548,7 +548,7 @@ void KStylePage::switchPrevStyle() {
appliedStyle = style;
}
void KStylePage::setStyleRecursive(TQWidget* w, TQPalette &palette, TQStyle* s) {
void TDEStylePage::setStyleRecursive(TQWidget* w, TQPalette &palette, TQStyle* s) {
// Apply the new style.
w->setStyle(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 = &currentColors;
TQColorGroup disabledgrp(cc->windowForeground, cc->background, cc->background.light(150),
cc->background.dark(), cc->background.dark(120), cc->background.dark(120),

@ -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();

@ -1,8 +1,8 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>KStylePageDlg</class>
<class>TDEStylePageDlg</class>
<widget class="TQWidget">
<property name="name">
<cstring>KStylePageDlg</cstring>
<cstring>TDEStylePageDlg</cstring>
</property>
<property name="geometry">
<rect>

Loading…
Cancel
Save