diff options
Diffstat (limited to 'kcontrol/background')
-rw-r--r-- | kcontrol/background/CMakeLists.txt | 2 | ||||
-rw-r--r-- | kcontrol/background/KCrossBGRender.cpp (renamed from kcontrol/background/KCrossBGRender.cc) | 0 | ||||
-rw-r--r-- | kcontrol/background/bgadvanced.cpp | 30 | ||||
-rw-r--r-- | kcontrol/background/bgadvanced.h | 6 | ||||
-rw-r--r-- | kcontrol/background/bgdefaults.h | 6 | ||||
-rw-r--r-- | kcontrol/background/bgdialog.cpp | 149 | ||||
-rw-r--r-- | kcontrol/background/bgdialog.h | 9 | ||||
-rw-r--r-- | kcontrol/background/bgdialog_ui.ui | 8 | ||||
-rw-r--r-- | kcontrol/background/bgmonitor.cpp | 5 | ||||
-rw-r--r-- | kcontrol/background/bgmonitor.h | 7 | ||||
-rw-r--r-- | kcontrol/background/bgrender.cpp | 19 | ||||
-rw-r--r-- | kcontrol/background/bgrender.h | 9 | ||||
-rw-r--r-- | kcontrol/background/bgsettings.cpp | 3 | ||||
-rw-r--r-- | kcontrol/background/bgsettings.h | 3 | ||||
-rw-r--r-- | kcontrol/background/bgwallpaper.cpp | 12 | ||||
-rw-r--r-- | kcontrol/background/bgwallpaper.h | 4 | ||||
-rw-r--r-- | kcontrol/background/crossfade.h | 3 | ||||
-rw-r--r-- | kcontrol/background/main.cpp | 4 | ||||
-rw-r--r-- | kcontrol/background/main.h | 4 |
19 files changed, 154 insertions, 129 deletions
diff --git a/kcontrol/background/CMakeLists.txt b/kcontrol/background/CMakeLists.txt index a62259b8d..5e3670616 100644 --- a/kcontrol/background/CMakeLists.txt +++ b/kcontrol/background/CMakeLists.txt @@ -29,7 +29,7 @@ if( BUILD_KCONTROL OR BUILD_KDESKTOP OR BUILD_TDM ) ##### bgnd (static) ############################# tde_add_library( bgnd STATIC_PIC AUTOMOC - SOURCES bgrender.cpp bgsettings.cpp KCrossBGRender.cc + SOURCES bgrender.cpp bgsettings.cpp KCrossBGRender.cpp LINK ${LIBART_LIBRARIES} ) diff --git a/kcontrol/background/KCrossBGRender.cc b/kcontrol/background/KCrossBGRender.cpp index 489e98d1b..489e98d1b 100644 --- a/kcontrol/background/KCrossBGRender.cc +++ b/kcontrol/background/KCrossBGRender.cpp diff --git a/kcontrol/background/bgadvanced.cpp b/kcontrol/background/bgadvanced.cpp index 697836797..03be761d7 100644 --- a/kcontrol/background/bgadvanced.cpp +++ b/kcontrol/background/bgadvanced.cpp @@ -1,4 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 +/* This file is part of the KDE project, module kcmbackground. @@ -77,8 +77,8 @@ BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r, dlg->m_listPrograms->header()->setStretchEnabled ( true, 1 ); dlg->m_listPrograms->setAllColumnsShowFocus(true); - connect(dlg->m_listPrograms, TQT_SIGNAL(clicked(TQListViewItem *)), - TQT_SLOT(slotProgramItemClicked(TQListViewItem *))); + connect(dlg->m_listPrograms, TQ_SIGNAL(clicked(TQListViewItem *)), + TQ_SLOT(slotProgramItemClicked(TQListViewItem *))); // Load programs TQStringList lst = KBackgroundProgram::list(); @@ -100,15 +100,15 @@ BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r, dlg->m_spinCache->setSpecialValueText(i18n("Unlimited")); dlg->m_spinCache->setSuffix(i18n(" KB")); - connect(dlg->m_buttonAdd, TQT_SIGNAL(clicked()), - TQT_SLOT(slotAdd())); - connect(dlg->m_buttonRemove, TQT_SIGNAL(clicked()), - TQT_SLOT(slotRemove())); - connect(dlg->m_buttonModify, TQT_SIGNAL(clicked()), - TQT_SLOT(slotModify())); + connect(dlg->m_buttonAdd, TQ_SIGNAL(clicked()), + TQ_SLOT(slotAdd())); + connect(dlg->m_buttonRemove, TQ_SIGNAL(clicked()), + TQ_SLOT(slotRemove())); + connect(dlg->m_buttonModify, TQ_SIGNAL(clicked()), + TQ_SLOT(slotModify())); - connect(dlg->m_listPrograms, TQT_SIGNAL(doubleClicked(TQListViewItem *)), - TQT_SLOT(slotProgramItemDoubleClicked(TQListViewItem *))); + connect(dlg->m_listPrograms, TQ_SIGNAL(doubleClicked(TQListViewItem *)), + TQ_SLOT(slotProgramItemDoubleClicked(TQListViewItem *))); } else { @@ -119,8 +119,8 @@ BGAdvancedDialog::BGAdvancedDialog(KBackgroundRenderer *_r, dlg->m_groupCache->hide(); } - connect( dlg->m_cbProgram, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotEnableProgram(bool))); + connect( dlg->m_cbProgram, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotEnableProgram(bool))); m_backgroundMode = m_oldBackgroundMode = r->backgroundMode(); if (m_oldBackgroundMode == KBackgroundSettings::Program) @@ -175,7 +175,7 @@ void BGAdvancedDialog::setTextBackgroundColor(const TQColor &color) else { dlg->m_cbSolidTextBackground->setChecked(false); - dlg->m_colorTextBackground->setColor(Qt::white); + dlg->m_colorTextBackground->setColor(TQt::white); dlg->m_colorTextBackground->setEnabled(false); } dlg->m_colorTextBackground->blockSignals(false); @@ -434,7 +434,7 @@ KProgramEditDialog::KProgramEditDialog(const TQString &program, TQWidget *parent m_RefreshEdit->setSuffix(i18n(" min")); m_RefreshEdit->setFixedSize(m_RefreshEdit->sizeHint()); lbl->setBuddy(m_RefreshEdit); - grid->addWidget(m_RefreshEdit, 5, 1, Qt::AlignLeft); + grid->addWidget(m_RefreshEdit, 5, 1, TQt::AlignLeft); m_Program = program; if (m_Program.isEmpty()) { diff --git a/kcontrol/background/bgadvanced.h b/kcontrol/background/bgadvanced.h index cc1ba7bf1..71dfa61ac 100644 --- a/kcontrol/background/bgadvanced.h +++ b/kcontrol/background/bgadvanced.h @@ -1,4 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 +/* This file is part of the KDE project, module kcmbackground. @@ -38,7 +38,7 @@ class KBackgroundProgram; class BGAdvancedDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: BGAdvancedDialog(KBackgroundRenderer *_r, TQWidget *parent, bool m_multidesktop); @@ -95,7 +95,7 @@ private: */ class KProgramEditDialog: public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KProgramEditDialog(const TQString &program=TQString::null, TQWidget *parent=0L, diff --git a/kcontrol/background/bgdefaults.h b/kcontrol/background/bgdefaults.h index d64c6e546..e6ece1cfe 100644 --- a/kcontrol/background/bgdefaults.h +++ b/kcontrol/background/bgdefaults.h @@ -1,4 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 +/* * * This file is part of the KDE project, module kdesktop. * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl> @@ -24,12 +24,10 @@ #define _defMinOptimizationDepth 1 // Per desktop defaults -// Before you change this get in touch with me (kb9vqf@pearsoncomputing.net) -// Thanks!! #define _defColorA TQColor("#003082") #define _defColorB TQColor("#C0C0C0") #define _defBackgroundMode KBackgroundSettings::Flat -#define _defWallpaperMode KBackgroundSettings::Scaled +#define _defWallpaperMode KBackgroundSettings::ScaleAndCrop #define _defMultiMode KBackgroundSettings::NoMulti #define _defBlendMode KBackgroundSettings::NoBlending #define _defBlendBalance 100 diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp index e903b7bc2..c5d56af0f 100644 --- a/kcontrol/background/bgdialog.cpp +++ b/kcontrol/background/bgdialog.cpp @@ -1,6 +1,4 @@ /* - kate: space-indent on; indent-width 3; indent-mode cstyle; - This file is part of the KDE libraries Copyright (c) 2005 David Saxton <david@bluehaze.org> @@ -75,7 +73,7 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) m_previewUpdates = true; KWinModule *m_twin; - m_twin = new KWinModule(TQT_TQOBJECT(this)); + m_twin = new KWinModule(this); m_curDesk = m_twin->currentDesktop(); TQSize s(m_twin->numberOfViewports(m_twin->currentDesktop())); m_useViewports = s.width() * s.height() > 1; @@ -124,21 +122,21 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) m_eScreen = 0; } - connect(m_buttonIdentifyScreens, TQT_SIGNAL(clicked()), TQT_SLOT(slotIdentifyScreens())); + connect(m_buttonIdentifyScreens, TQ_SIGNAL(clicked()), TQ_SLOT(slotIdentifyScreens())); // preview monitor m_pMonitorArrangement = new BGMonitorArrangement(m_screenArrangement, "monitor arrangement"); - connect(m_pMonitorArrangement, TQT_SIGNAL(imageDropped(const TQString &)), TQT_SLOT(slotImageDropped(const TQString &))); + connect(m_pMonitorArrangement, TQ_SIGNAL(imageDropped(const TQString &)), TQ_SLOT(slotImageDropped(const TQString &))); if( m_multidesktop) { // desktop - connect(m_comboDesktop, TQT_SIGNAL(activated(int)), - TQT_SLOT(slotSelectDesk(int))); + connect(m_comboDesktop, TQ_SIGNAL(activated(int)), + TQ_SLOT(slotSelectDesk(int))); } if (m_numScreens > 1) { - connect(m_comboScreen, TQT_SIGNAL(activated(int)), - TQT_SLOT(slotSelectScreen(int))); + connect(m_comboScreen, TQ_SIGNAL(activated(int)), + TQ_SLOT(slotSelectScreen(int))); } // background image settings @@ -148,42 +146,42 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) m_urlWallpaperButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); TQToolTip::add(m_urlWallpaperButton, i18n("Open file dialog")); - connect(m_buttonGroupBackground, TQT_SIGNAL(clicked(int)), - TQT_SLOT(slotWallpaperTypeChanged(int))); - connect(m_urlWallpaperBox, TQT_SIGNAL(activated(int)), - TQT_SLOT(slotWallpaper(int))); - connect(m_urlWallpaperButton, TQT_SIGNAL(clicked()), - TQT_SLOT(slotWallpaperSelection())); - connect(m_comboWallpaperPos, TQT_SIGNAL(activated(int)), - TQT_SLOT(slotWallpaperPos(int))); - connect(m_buttonSetupWallpapers, TQT_SIGNAL(clicked()), - TQT_SLOT(slotSetupMulti())); + connect(m_buttonGroupBackground, TQ_SIGNAL(clicked(int)), + TQ_SLOT(slotWallpaperTypeChanged(int))); + connect(m_urlWallpaperBox, TQ_SIGNAL(activated(int)), + TQ_SLOT(slotWallpaper(int))); + connect(m_urlWallpaperButton, TQ_SIGNAL(clicked()), + TQ_SLOT(slotWallpaperSelection())); + connect(m_comboWallpaperPos, TQ_SIGNAL(activated(int)), + TQ_SLOT(slotWallpaperPos(int))); + connect(m_buttonSetupWallpapers, TQ_SIGNAL(clicked()), + TQ_SLOT(slotSetupMulti())); // set up the background colour stuff - connect(m_colorPrimary, TQT_SIGNAL(changed(const TQColor &)), - TQT_SLOT(slotPrimaryColor(const TQColor &))); - connect(m_colorSecondary, TQT_SIGNAL(changed(const TQColor &)), - TQT_SLOT(slotSecondaryColor(const TQColor &))); - connect(m_comboPattern, TQT_SIGNAL(activated(int)), - TQT_SLOT(slotPattern(int))); + connect(m_colorPrimary, TQ_SIGNAL(changed(const TQColor &)), + TQ_SLOT(slotPrimaryColor(const TQColor &))); + connect(m_colorSecondary, TQ_SIGNAL(changed(const TQColor &)), + TQ_SLOT(slotSecondaryColor(const TQColor &))); + connect(m_comboPattern, TQ_SIGNAL(activated(int)), + TQ_SLOT(slotPattern(int))); // blend - connect(m_comboBlend, TQT_SIGNAL(activated(int)), TQT_SLOT(slotBlendMode(int))); - connect(m_sliderBlend, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotBlendBalance(int))); - connect(m_cbBlendReverse, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotBlendReverse(bool))); + connect(m_comboBlend, TQ_SIGNAL(activated(int)), TQ_SLOT(slotBlendMode(int))); + connect(m_sliderBlend, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotBlendBalance(int))); + connect(m_cbBlendReverse, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotBlendReverse(bool))); // Crossfading background - connect(m_cbCrossFadeBg, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotCrossFadeBg(bool))); + connect(m_cbCrossFadeBg, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotCrossFadeBg(bool))); // advanced options - connect(m_buttonAdvanced, TQT_SIGNAL(clicked()), - TQT_SLOT(slotAdvanced())); + connect(m_buttonAdvanced, TQ_SIGNAL(clicked()), + TQ_SLOT(slotAdvanced())); - connect(m_buttonGetNew, TQT_SIGNAL(clicked()), - TQT_SLOT(slotGetNewStuff())); + connect(m_buttonGetNew, TQ_SIGNAL(clicked()), + TQ_SLOT(slotGetNewStuff())); // renderers m_renderer.resize(m_numDesks+1); @@ -200,19 +198,19 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) // Setup the merged-screen renderer KBackgroundRenderer * r = new KBackgroundRenderer(eDesk, 0, false, _config); m_renderer[i].insert( 0, r ); - connect( r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)) ); + connect( r, TQ_SIGNAL(imageDone(int,int)), TQ_SLOT(slotPreviewDone(int,int)) ); // Setup the common-screen renderer r = new KBackgroundRenderer(eDesk, 0, true, _config); m_renderer[i].insert( 1, r ); - connect( r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)) ); + connect( r, TQ_SIGNAL(imageDone(int,int)), TQ_SLOT(slotPreviewDone(int,int)) ); // Setup the remaining renderers for each screen for (unsigned j=0; j < m_numScreens; ++j ) { r = new KBackgroundRenderer(eDesk, j, true, _config); m_renderer[i].insert( j+2, r ); - connect( r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int)) ); + connect( r, TQ_SIGNAL(imageDone(int,int)), TQ_SLOT(slotPreviewDone(int,int)) ); } } } @@ -227,14 +225,14 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) // set up the common desktop renderer KBackgroundRenderer * r = new KBackgroundRenderer(0, 0, false, _config); m_renderer[0].insert(0, r); - connect(r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int))); + connect(r, TQ_SIGNAL(imageDone(int,int)), TQ_SLOT(slotPreviewDone(int,int))); // set up all the other desktop renderers for (unsigned i = 0; i < m_numDesks; ++i) { r = new KBackgroundRenderer(i, 0, false, _config); m_renderer[i+1].insert(0, r); - connect(r, TQT_SIGNAL(imageDone(int,int)), TQT_SLOT(slotPreviewDone(int,int))); + connect(r, TQ_SIGNAL(imageDone(int,int)), TQ_SLOT(slotPreviewDone(int,int))); } } @@ -246,10 +244,36 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) m_slideShowRandom = KBackgroundSettings::InOrder; // Wallpaper Position + m_prevWallpaperPos = KBackgroundSettings::ScaleAndCrop; + m_prevTilePos = KBackgroundSettings::Tiled; + m_wallpaperPos = eRenderer()->wallpaperMode(); if (m_wallpaperPos == KBackgroundSettings::NoWallpaper) m_wallpaperPos = KBackgroundSettings::Centred; // Default + const TQString path = eRenderer()->wallpaper(); + KFileMetaInfo metaInfo(path); + if (metaInfo.isValid() && metaInfo.item("Dimensions").isValid()) + { + // If the image is greater than 800x600 default to using the user selected mode + // for a normal wallpaper, otherwise default to user selection for tiles. + TQSize s = metaInfo.item("Dimensions").value().toSize(); + m_isTile = (s.width() < 800 || s.height() < 600); + if (m_isTile) + { + m_prevTilePos = m_wallpaperPos; + } + else + { + m_prevWallpaperPos = m_wallpaperPos; + } + } + else if (KMimeType::findByPath(path)->is("image/svg+xml")) + { + m_prevWallpaperPos = m_wallpaperPos; + } + + // Restrictions if (TDEGlobal::dirs()->isRestrictedResource("wallpaper")) { m_urlWallpaperButton->hide(); @@ -261,7 +285,7 @@ BGDialog::BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop) updateUI(); #if (TQT_VERSION-0 >= 0x030200) - connect( tqApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( desktopResized())); // RANDR support + connect( tqApp->desktop(), TQ_SIGNAL( resized( int )), TQ_SLOT( desktopResized())); // RANDR support #endif } @@ -419,11 +443,11 @@ void BGDialog::slotIdentifyScreens() screenLabel->setFrameStyle(TQFrame::Panel); screenLabel->setFrameShadow(TQFrame::Plain); - screenLabel->setAlignment(Qt::AlignCenter); + screenLabel->setAlignment(TQt::AlignCenter); screenLabel->setNum(int(s + 1)); // BUGLET: we should not allow the identification to be entered again // until the timer fires. - TQTimer::singleShot(1500, screenLabel, TQT_SLOT(close())); + TQTimer::singleShot(1500, screenLabel, TQ_SLOT(close())); TQPoint screenCenter(TQApplication::desktop()->screenGeometry(s).center()); TQRect targetGeometry(TQPoint(0,0),screenLabel->sizeHint()); @@ -475,7 +499,7 @@ void BGDialog::initUI() loadWallpaperFilesList(); - // Wallpaper tilings: again they must match the ones from bgrender.cc + // Wallpaper tilings: again they must match the ones from bgrender.cpp m_comboWallpaperPos->insertItem(i18n("Centered")); m_comboWallpaperPos->insertItem(i18n("Tiled")); m_comboWallpaperPos->insertItem(i18n("Center Tiled")); @@ -485,7 +509,7 @@ void BGDialog::initUI() m_comboWallpaperPos->insertItem(i18n("Centered Auto Fit")); m_comboWallpaperPos->insertItem(i18n("Scale & Crop")); - // Blend modes: make sure these match with kdesktop/bgrender.cc !! + // Blend modes: make sure these match with kdesktop/bgrender.cpp !! m_comboBlend->insertItem(i18n("No Blending")); m_comboBlend->insertItem(i18n("Flat")); m_comboBlend->insertItem(i18n("Horizontal")); @@ -504,7 +528,7 @@ void BGDialog::loadWallpaperFilesList() { // Wallpapers // the following TQMap is lower cased names mapped to cased names and URLs // this way we get case insensitive sorting - TQMap<TQString, QPair<TQString, TQString> > papers; + TQMap<TQString, TQPair<TQString, TQString> > papers; //search for .desktop files before searching for images without .desktop files TQStringList lst = m_pDirs->findAllResources("wallpaper", "*desktop", false, true); @@ -596,7 +620,7 @@ void BGDialog::loadWallpaperFilesList() { comboWallpaper->clear(); m_wallpaper.clear(); int i = 0; - for (TQMap<TQString, QPair<TQString, TQString> >::Iterator it = papers.begin(); + for (TQMap<TQString, TQPair<TQString, TQString> >::Iterator it = papers.begin(); it != papers.end(); ++it) { @@ -941,18 +965,22 @@ void BGDialog::slotWallpaperTypeChanged(int i) KFileMetaInfo metaInfo(path); if (metaInfo.isValid() && metaInfo.item("Dimensions").isValid()) { - // If the image is greater than 800x600 default to using scaled mode, - // otherwise default to tiled. - + // If the image is greater than 800x600 default to using the user selected mode + // for a normal wallpaper, otherwise default to user selection for tiles. TQSize s = metaInfo.item("Dimensions").value().toSize(); - if (s.width() >= 800 && s.height() >= 600) - m_wallpaperPos = KBackgroundSettings::Scaled; + m_isTile = (s.width() < 800 || s.height() < 600); + if (m_isTile) + { + m_wallpaperPos = m_prevTilePos; + } else - m_wallpaperPos = KBackgroundSettings::Tiled; + { + m_wallpaperPos = m_prevWallpaperPos; + } } else if (KMimeType::findByPath(path)->is("image/svg+xml")) { - m_wallpaperPos = KBackgroundSettings::Scaled; + m_wallpaperPos = m_prevWallpaperPos; } r->setWallpaperMode(m_wallpaperPos); @@ -999,6 +1027,15 @@ void BGDialog::slotWallpaperPos(int mode) if (mode == r->wallpaperMode()) return; + if (m_isTile) + { + m_prevTilePos = mode; + } + else + { + m_prevWallpaperPos = mode; + } + r->stop(); r->setWallpaperMode(mode); r->start(true); @@ -1257,7 +1294,7 @@ void BGDialog::slotGetNewStuff() config->writeEntry( "StandardResource", "wallpaper" ); config->sync(); - KNS::DownloadDialog::open("wallpaper", i18n("Get New Wallpapers")); + KNS::DownloadDialog::open("Wallpapers", i18n("Get New Wallpapers")); loadWallpaperFilesList(); } diff --git a/kcontrol/background/bgdialog.h b/kcontrol/background/bgdialog.h index 6b33d8999..a2e7bfea6 100644 --- a/kcontrol/background/bgdialog.h +++ b/kcontrol/background/bgdialog.h @@ -34,7 +34,7 @@ class TDEStandardDirs; class BGDialog : public BGDialog_UI { - Q_OBJECT + TQ_OBJECT public: BGDialog(TQWidget* parent, TDEConfig* _config, bool _multidesktop = true); ~BGDialog(); @@ -99,8 +99,11 @@ protected: TQValueVector< TQPtrVector<KBackgroundRenderer> > m_renderer; // m_renderer[desk][screen] TQMap<TQString,int> m_wallpaper; TQStringList m_patterns; - int m_slideShowRandom; // Remembers last Slide Show setting - int m_wallpaperPos; // Remembers last wallpaper pos + int m_slideShowRandom; // Remembers last Slide Show setting + int m_wallpaperPos; // Remembers last wallpaper pos + int m_prevWallpaperPos; // Previous normal wallpaper pos + int m_prevTilePos; // Previous tile wallpaper pos + bool m_isTile; // Whether the wallpaper is a tile (800x600 or smaller) BGMonitorArrangement * m_pMonitorArrangement; diff --git a/kcontrol/background/bgdialog_ui.ui b/kcontrol/background/bgdialog_ui.ui index f35e19f78..4334cbbaf 100644 --- a/kcontrol/background/bgdialog_ui.ui +++ b/kcontrol/background/bgdialog_ui.ui @@ -719,15 +719,9 @@ <includes> <include location="global" impldecl="in declaration">kcolorbutton.h</include> <include location="global" impldecl="in declaration">kcombobox.h</include> - <include location="global" impldecl="in implementation">kurlrequester.h</include> <include location="global" impldecl="in implementation">kdialog.h</include> + <include location="global" impldecl="in implementation">kurlrequester.h</include> </includes> <layoutdefaults spacing="3" margin="6"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> -<includehints> - <includehint>kcombobox.h</includehint> - <includehint>kcolorbutton.h</includehint> - <includehint>kcolorbutton.h</includehint> - <includehint>kcombobox.h</includehint> -</includehints> </UI> diff --git a/kcontrol/background/bgmonitor.cpp b/kcontrol/background/bgmonitor.cpp index c05e70e5f..c75d42f6c 100644 --- a/kcontrol/background/bgmonitor.cpp +++ b/kcontrol/background/bgmonitor.cpp @@ -1,5 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 - kate: space-indent on; indent-width 4; indent-mode cstyle; +/* This file is part of the KDE project, module kcmbackground. @@ -48,7 +47,7 @@ BGMonitorArrangement::BGMonitorArrangement(TQWidget *parent, const char *name) BGMonitorLabel * label = new BGMonitorLabel(this); m_pBGMonitor[screen] = label; - connect( label->monitor(), TQT_SIGNAL(imageDropped(const TQString &)), this, TQT_SIGNAL(imageDropped(const TQString &)) ); + connect( label->monitor(), TQ_SIGNAL(imageDropped(const TQString &)), this, TQ_SIGNAL(imageDropped(const TQString &)) ); } parent->setFixedSize(200, 186); diff --git a/kcontrol/background/bgmonitor.h b/kcontrol/background/bgmonitor.h index 4a86ea3d2..95608261b 100644 --- a/kcontrol/background/bgmonitor.h +++ b/kcontrol/background/bgmonitor.h @@ -1,5 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 - kate: space-indent on; indent-width 4; indent-mode cstyle; +/* This file is part of the KDE project, module kcmbackground. @@ -39,7 +38,7 @@ class KPixmap; */ class BGMonitorArrangement : public TQWidget { - Q_OBJECT + TQ_OBJECT public: BGMonitorArrangement(TQWidget *parent, const char *name=0L); @@ -95,7 +94,7 @@ protected: */ class BGMonitor : public TQLabel { - Q_OBJECT + TQ_OBJECT public: BGMonitor(TQWidget *parent, const char *name=0L); diff --git a/kcontrol/background/bgrender.cpp b/kcontrol/background/bgrender.cpp index d8cc53c9a..12455b608 100644 --- a/kcontrol/background/bgrender.cpp +++ b/kcontrol/background/bgrender.cpp @@ -1,5 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 - * kate: space-indent on; tab-width 8; indent-width 4; indent-mode cstyle; +/* * * This file is part of the KDE project, module kdesktop. * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl> @@ -64,7 +63,7 @@ KBackgroundRenderer::KBackgroundRenderer(int desk, int screen, bool drawBackgrou m_TilingEnabled = false; m_pTimer = new TQTimer(this); - connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(render())); + connect(m_pTimer, TQ_SIGNAL(timeout()), TQ_SLOT(render())); } @@ -240,8 +239,8 @@ int KBackgroundRenderer::doBackground(bool quit) delete m_pProc; m_pProc = new KShellProcess; *m_pProc << file; - connect(m_pProc, TQT_SIGNAL(processExited(TDEProcess *)), - TQT_SLOT(slotBackgroundDone(TDEProcess *))); + connect(m_pProc, TQ_SIGNAL(processExited(TDEProcess *)), + TQ_SLOT(slotBackgroundDone(TDEProcess *))); m_pProc->start(KShellProcess::NotifyOnExit); retval = Wait; break; @@ -385,7 +384,7 @@ wp_load: wpmode = NoWallpaper; goto wp_out; } - m_Wallpaper = m_Wallpaper.convertDepth(32, Qt::DiffuseAlphaDither); + m_Wallpaper = m_Wallpaper.convertDepth(32, TQt::DiffuseAlphaDither); // If we're previewing, scale the wallpaper down to make the preview // look more like the real desktop. @@ -629,7 +628,7 @@ void KBackgroundRenderer::fullWallpaperBlend() m_Image = m_Background.copy(); if (m_Image.depth() < 32) - m_Image = m_Image.convertDepth(32, Qt::DiffuseAlphaDither); + m_Image = m_Image.convertDepth(32, TQt::DiffuseAlphaDither); } else { m_Image.create(w, h, 32); @@ -1161,7 +1160,7 @@ void KVirtualBGRenderer::desktopResized() { delete m_pPixmap; m_pPixmap = new TQPixmap(m_size); - m_pPixmap->fill(Qt::black); + m_pPixmap->fill(TQt::black); } initRenderers(); @@ -1229,7 +1228,7 @@ void KVirtualBGRenderer::initRenderers() KCrossBGRender *r = new KCrossBGRender(m_desk, eScreen, m_bDrawBackgroundPerScreen, m_pConfig); m_renderer.insert( i, r ); r->setSize(renderSize(i)); - connect( r, TQT_SIGNAL(imageDone(int,int)), this, TQT_SLOT(screenDone(int,int)) ); + connect( r, TQ_SIGNAL(imageDone(int,int)), this, TQ_SLOT(screenDone(int,int)) ); } } @@ -1318,7 +1317,7 @@ void KVirtualBGRenderer::start() // If are screen sizes do not properly tile the overall virtual screen // size, then we want the untiled parts to be black for use in desktop // previews, etc - m_pPixmap->fill(Qt::black); + m_pPixmap->fill(TQt::black); } m_bFinished.fill(false); diff --git a/kcontrol/background/bgrender.h b/kcontrol/background/bgrender.h index 5ab1cc6c3..f9042dd56 100644 --- a/kcontrol/background/bgrender.h +++ b/kcontrol/background/bgrender.h @@ -1,5 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 - * kate: space-indent on; tab-width 8; indent-width 4; indent-mode cstyle; +/* * * This file is part of the KDE project, module kdesktop. * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl> @@ -40,7 +39,7 @@ class KBackgroundRenderer: public TQObject, public KBackgroundSettings { - Q_OBJECT + TQ_OBJECT public: KBackgroundRenderer(int desk, int screen, bool drawBackgroundPerScreen, TDEConfig *config=0); @@ -121,9 +120,9 @@ private: * images. Usage is similar to KBackgroundRenderer: connect to the imageDone * signal. */ -class KVirtualBGRenderer : public QObject +class KVirtualBGRenderer : public TQObject { - Q_OBJECT + TQ_OBJECT public: KVirtualBGRenderer(int desk, TDEConfig *config=0l); ~KVirtualBGRenderer(); diff --git a/kcontrol/background/bgsettings.cpp b/kcontrol/background/bgsettings.cpp index 1ee452ac2..278a250c9 100644 --- a/kcontrol/background/bgsettings.cpp +++ b/kcontrol/background/bgsettings.cpp @@ -1,5 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 - * kate: space-indent on; indent-width 4; indent-mode cstyle; +/* * * This file is part of the KDE project, module kdesktop. * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl> diff --git a/kcontrol/background/bgsettings.h b/kcontrol/background/bgsettings.h index a49873af2..348446c82 100644 --- a/kcontrol/background/bgsettings.h +++ b/kcontrol/background/bgsettings.h @@ -1,5 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 - * kate: space-indent on; indent-width 4; indent-mode cstyle; +/* * * This file is part of the KDE project, module kdesktop. * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl> diff --git a/kcontrol/background/bgwallpaper.cpp b/kcontrol/background/bgwallpaper.cpp index 5e43caa4d..bc7de3e63 100644 --- a/kcontrol/background/bgwallpaper.cpp +++ b/kcontrol/background/bgwallpaper.cpp @@ -1,4 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 +/* This file is part of the KDE project, module kcmbackground. @@ -114,11 +114,11 @@ BGMultiWallpaperDialog::BGMultiWallpaperDialog(KBackgroundSettings *settings, if (m_pSettings->multiWallpaperMode() == KBackgroundSettings::Random) dlg->m_cbRandom->setChecked(true); - connect(dlg->m_buttonAdd, TQT_SIGNAL(clicked()), TQT_SLOT(slotAdd())); - connect(dlg->m_buttonRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemove())); - connect(dlg->m_buttonMoveUp, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveUp())); - connect(dlg->m_buttonMoveDown, TQT_SIGNAL(clicked()), TQT_SLOT(slotMoveDown())); - connect(dlg->m_listImages, TQT_SIGNAL(clicked ( TQListBoxItem * )), TQT_SLOT(slotItemSelected( TQListBoxItem *))); + connect(dlg->m_buttonAdd, TQ_SIGNAL(clicked()), TQ_SLOT(slotAdd())); + connect(dlg->m_buttonRemove, TQ_SIGNAL(clicked()), TQ_SLOT(slotRemove())); + connect(dlg->m_buttonMoveUp, TQ_SIGNAL(clicked()), TQ_SLOT(slotMoveUp())); + connect(dlg->m_buttonMoveDown, TQ_SIGNAL(clicked()), TQ_SLOT(slotMoveDown())); + connect(dlg->m_listImages, TQ_SIGNAL(clicked ( TQListBoxItem * )), TQ_SLOT(slotItemSelected( TQListBoxItem *))); dlg->m_buttonRemove->setEnabled( false ); dlg->m_buttonMoveUp->setEnabled( false ); dlg->m_buttonMoveDown->setEnabled( false ); diff --git a/kcontrol/background/bgwallpaper.h b/kcontrol/background/bgwallpaper.h index dfee2066e..6a61516ee 100644 --- a/kcontrol/background/bgwallpaper.h +++ b/kcontrol/background/bgwallpaper.h @@ -1,4 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 +/* This file is part of the KDE project, module kcmbackground. @@ -44,7 +44,7 @@ public: class BGMultiWallpaperDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: BGMultiWallpaperDialog(KBackgroundSettings *settings, TQWidget *parent, const char *name=0); diff --git a/kcontrol/background/crossfade.h b/kcontrol/background/crossfade.h index da589aac4..4a9bc2b30 100644 --- a/kcontrol/background/crossfade.h +++ b/kcontrol/background/crossfade.h @@ -1,5 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 - * kate: space-indent on; tab-width 8; indent-width 4; indent-mode cstyle; +/* * * This file is part of the KDE project, module kdesktop. * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org> diff --git a/kcontrol/background/main.cpp b/kcontrol/background/main.cpp index 2f6832dcc..e27aa50ac 100644 --- a/kcontrol/background/main.cpp +++ b/kcontrol/background/main.cpp @@ -1,4 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 +/* * This file is part of the KDE project, module kcmbackground. * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl> * Copyright (C) 2003 Waldo Bastian <bastian@kde.org> @@ -65,7 +65,7 @@ KBackground::KBackground(TQWidget *parent, const char *name, const TQStringList // reparenting that is done. setAcceptDrops(true); - connect(m_base, TQT_SIGNAL(changed(bool)), TQT_SIGNAL(changed(bool))); + connect(m_base, TQ_SIGNAL(changed(bool)), TQ_SIGNAL(changed(bool))); TDEAboutData *about = new TDEAboutData(I18N_NOOP("kcmbackground"), I18N_NOOP("TDE Background Control Module"), diff --git a/kcontrol/background/main.h b/kcontrol/background/main.h index 9fdba57b8..d4442b340 100644 --- a/kcontrol/background/main.h +++ b/kcontrol/background/main.h @@ -1,4 +1,4 @@ -/* vi: ts=8 sts=4 sw=4 +/* * * This file is part of the KDE project, module kcmdisplay. * Copyright (C) 1999 Geert Jansen <g.t.jansen@stud.tue.nl> @@ -20,7 +20,7 @@ class BGDialog; */ class KBackground: public TDECModule { - Q_OBJECT + TQ_OBJECT public: KBackground(TQWidget *parent, const char *name, const TQStringList &); |