diff options
Diffstat (limited to 'twin/kcmtwin')
26 files changed, 775 insertions, 557 deletions
diff --git a/twin/kcmtwin/twindecoration/buttons.cpp b/twin/kcmtwin/twindecoration/buttons.cpp index 17381247a..0a3c6331e 100644 --- a/twin/kcmtwin/twindecoration/buttons.cpp +++ b/twin/kcmtwin/twindecoration/buttons.cpp @@ -606,7 +606,7 @@ void ButtonDropSite::drawContents( TQPainter* p ) TQColor c1( 0x0A, 0x5F, 0x89 ); // KDE 2 titlebar default colour p->fillRect( r, c1 ); - p->setPen( Qt::white ); + p->setPen( TQt::white ); p->setFont( TQFont( TDEGlobalSettings::generalFont().family(), 12, TQFont::Bold) ); p->drawText( r, AlignLeft | AlignVCenter, i18n("TDE") ); @@ -689,11 +689,11 @@ ButtonPositionWidget::ButtonPositionWidget(TQWidget *parent, const char* name) layout->addWidget(m_dropSite); layout->addWidget(m_buttonSource); - connect( m_dropSite, TQT_SIGNAL(buttonAdded(TQChar)), m_buttonSource, TQT_SLOT(hideButton(TQChar)) ); - connect( m_dropSite, TQT_SIGNAL(buttonRemoved(TQChar)), m_buttonSource, TQT_SLOT(showButton(TQChar)) ); - connect( m_buttonSource, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), m_dropSite, TQT_SLOT(removeSelectedButton()) ); + connect( m_dropSite, TQ_SIGNAL(buttonAdded(TQChar)), m_buttonSource, TQ_SLOT(hideButton(TQChar)) ); + connect( m_dropSite, TQ_SIGNAL(buttonRemoved(TQChar)), m_buttonSource, TQ_SLOT(showButton(TQChar)) ); + connect( m_buttonSource, TQ_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), m_dropSite, TQ_SLOT(removeSelectedButton()) ); - connect( m_dropSite, TQT_SIGNAL(changed()), TQT_SIGNAL(changed()) ); + connect( m_dropSite, TQ_SIGNAL(changed()), TQ_SIGNAL(changed()) ); // insert all possible buttons into the source (backwards to keep the preferred order...) bool dummy; diff --git a/twin/kcmtwin/twindecoration/buttons.h b/twin/kcmtwin/twindecoration/buttons.h index 0564d8915..c9f562208 100644 --- a/twin/kcmtwin/twindecoration/buttons.h +++ b/twin/kcmtwin/twindecoration/buttons.h @@ -111,7 +111,7 @@ class ButtonSourceItem : public TQListViewItem */ class ButtonSource : public TDEListView { - Q_OBJECT + TQ_OBJECT public: ButtonSource(TQWidget *parent = 0, const char* name = 0); @@ -138,7 +138,7 @@ typedef TQValueList<ButtonDropSiteItem*> ButtonList; */ class ButtonDropSite: public TQFrame { - Q_OBJECT + TQ_OBJECT public: ButtonDropSite( TQWidget* parent=0, const char* name=0 ); @@ -191,7 +191,7 @@ class ButtonDropSite: public TQFrame class ButtonPositionWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: ButtonPositionWidget(TQWidget *parent = 0, const char* name = 0); diff --git a/twin/kcmtwin/twindecoration/preview.cpp b/twin/kcmtwin/twindecoration/preview.cpp index 954ff1774..a1c92c8cb 100644 --- a/twin/kcmtwin/twindecoration/preview.cpp +++ b/twin/kcmtwin/twindecoration/preview.cpp @@ -234,7 +234,7 @@ TQWidget* KDecorationPreviewBridge::initialParentWidget() const return preview; } -Qt::WFlags KDecorationPreviewBridge::initialWFlags() const +TQt::WFlags KDecorationPreviewBridge::initialWFlags() const { return 0; } diff --git a/twin/kcmtwin/twindecoration/preview.h b/twin/kcmtwin/twindecoration/preview.h index 56a342cfc..9d9f09402 100644 --- a/twin/kcmtwin/twindecoration/preview.h +++ b/twin/kcmtwin/twindecoration/preview.h @@ -32,7 +32,7 @@ class KDecorationPreviewOptions; class KDecorationPreview : public TQWidget { - Q_OBJECT + TQ_OBJECT public: // Note: Windows can't be added or removed without making changes to // the code, since parts of it assume there's just an active @@ -106,7 +106,7 @@ class KDecorationPreviewBridge virtual void setKeepBelow( bool ); virtual int currentDesktop() const; virtual TQWidget* initialParentWidget() const; - virtual Qt::WFlags initialWFlags() const; + virtual TQt::WFlags initialWFlags() const; virtual void helperShowHide( bool show ); virtual void grabXServer( bool grab ); private: diff --git a/twin/kcmtwin/twindecoration/twindecoration.cpp b/twin/kcmtwin/twindecoration/twindecoration.cpp index 79a72aafd..265fe2a1c 100644 --- a/twin/kcmtwin/twindecoration/twindecoration.cpp +++ b/twin/kcmtwin/twindecoration/twindecoration.cpp @@ -98,7 +98,7 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c pluginLayout->addWidget(decorationList); TQGroupBox *pluginSettingsGrp = new TQGroupBox( i18n("Decoration Options"), pluginPage ); - pluginSettingsGrp->setColumnLayout( 0, Qt::Vertical ); + pluginSettingsGrp->setColumnLayout( 0, TQt::Vertical ); pluginSettingsGrp->setFlat( true ); pluginSettingsGrp->layout()->setMargin( 0 ); pluginSettingsGrp->layout()->setSpacing( KDialog::spacingHint() ); @@ -184,77 +184,77 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c i18n("Enabling this checkbox will allow you to choose a kind of " "drop shadow to draw under each window.")); - activeShadowSettings = new TQGroupBox(1, Qt::Horizontal, + activeShadowSettings = new TQGroupBox(1, TQt::Horizontal, i18n("Active Window Shadow"), shadowPage); - inactiveShadowSettings = new TQGroupBox(1, Qt::Horizontal, + inactiveShadowSettings = new TQGroupBox(1, TQt::Horizontal, i18n("Inactive Window Shadows"), shadowPage); - whichShadowSettings = new TQGroupBox(3, Qt::Horizontal, - i18n("Draw Shadow Under Normal Windows And..."), shadowPage); + whichShadowSettings = new TQGroupBox(3, TQt::Horizontal, + i18n("Draw Shadow Under Normal Windows And…"), shadowPage); cbShadowDocks = new TQCheckBox(i18n("Docks and &panels"), whichShadowSettings); - connect(cbShadowDocks, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbShadowDocks, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); cbShadowOverrides = new TQCheckBox(i18n("O&verride windows"), whichShadowSettings); - connect(cbShadowOverrides, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbShadowOverrides, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); cbShadowTopMenus = new TQCheckBox(i18n("&Top menu"), whichShadowSettings); - connect(cbShadowTopMenus, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbShadowTopMenus, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); cbInactiveShadow = new TQCheckBox( i18n("Draw shadow under &inactive windows"), inactiveShadowSettings); - connect(cbInactiveShadow, TQT_SIGNAL(toggled(bool)), - TQT_SLOT(slotSelectionChanged())); + connect(cbInactiveShadow, TQ_SIGNAL(toggled(bool)), + TQ_SLOT(slotSelectionChanged())); shadowColourHBox = new TQHBox(activeShadowSettings); shadowColourHBox->setSpacing(KDialog::spacingHint()); shadowColourLabel = new TQLabel(i18n("Colour:"), shadowColourHBox); shadowColourButton = new KColorButton(shadowColourHBox); - connect(shadowColourButton, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotSelectionChanged())); + connect(shadowColourButton, TQ_SIGNAL(changed(const TQColor &)), TQ_SLOT(slotSelectionChanged())); inactiveShadowColourHBox = new TQHBox(inactiveShadowSettings); inactiveShadowColourHBox->setSpacing(KDialog::spacingHint()); inactiveShadowColourLabel = new TQLabel(i18n("Colour:"), inactiveShadowColourHBox); inactiveShadowColourButton = new KColorButton(inactiveShadowColourHBox); - connect(inactiveShadowColourButton, TQT_SIGNAL(changed(const TQColor &)), TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowColourButton, TQ_SIGNAL(changed(const TQColor &)), TQ_SLOT(slotSelectionChanged())); shadowOpacityHBox = new TQHBox(activeShadowSettings); shadowOpacityHBox->setSpacing(KDialog::spacingHint()); shadowOpacityLabel = new TQLabel(i18n("Maximum opacity:"), shadowOpacityHBox); - shadowOpacitySlider = new TQSlider(1, 100, 10, 50, Qt::Horizontal, + shadowOpacitySlider = new TQSlider(1, 100, 10, 50, TQt::Horizontal, shadowOpacityHBox); shadowOpacitySlider->setTickmarks(TQSlider::Below); shadowOpacitySlider->setTickInterval(10); shadowOpacitySpinBox = new TQSpinBox(1, 100, 1, shadowOpacityHBox); shadowOpacitySpinBox->setSuffix(" %"); - connect(shadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), shadowOpacitySpinBox, - TQT_SLOT(setValue(int))); - connect(shadowOpacitySpinBox, TQT_SIGNAL(valueChanged(int)), shadowOpacitySlider, - TQT_SLOT(setValue(int))); - connect(shadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), shadowOpacitySpinBox, + TQ_SLOT(setValue(int))); + connect(shadowOpacitySpinBox, TQ_SIGNAL(valueChanged(int)), shadowOpacitySlider, + TQ_SLOT(setValue(int))); + connect(shadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowOpacityHBox = new TQHBox(inactiveShadowSettings); inactiveShadowOpacityHBox->setSpacing(KDialog::spacingHint()); inactiveShadowOpacityLabel = new TQLabel(i18n("Maximum opacity:"), inactiveShadowOpacityHBox); - inactiveShadowOpacitySlider = new TQSlider(1, 100, 10, 50, Qt::Horizontal, + inactiveShadowOpacitySlider = new TQSlider(1, 100, 10, 50, TQt::Horizontal, inactiveShadowOpacityHBox); inactiveShadowOpacitySlider->setTickmarks(TQSlider::Below); inactiveShadowOpacitySlider->setTickInterval(10); inactiveShadowOpacitySpinBox = new TQSpinBox(1, 100, 1, inactiveShadowOpacityHBox); inactiveShadowOpacitySpinBox->setSuffix(" %"); - connect(inactiveShadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), + connect(inactiveShadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), inactiveShadowOpacitySpinBox, - TQT_SLOT(setValue(int))); - connect(inactiveShadowOpacitySpinBox, TQT_SIGNAL(valueChanged(int)), + TQ_SLOT(setValue(int))); + connect(inactiveShadowOpacitySpinBox, TQ_SIGNAL(valueChanged(int)), inactiveShadowOpacitySlider, - TQT_SLOT(setValue(int))); - connect(inactiveShadowOpacitySlider, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + TQ_SLOT(setValue(int))); + connect(inactiveShadowOpacitySlider, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); shadowXOffsetHBox = new TQHBox(activeShadowSettings); shadowXOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -263,8 +263,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c shadowXOffsetHBox); shadowXOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, shadowXOffsetHBox); shadowXOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(shadowXOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowXOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowXOffsetHBox = new TQHBox(inactiveShadowSettings); inactiveShadowXOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -274,8 +274,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c inactiveShadowXOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, inactiveShadowXOffsetHBox); inactiveShadowXOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(inactiveShadowXOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowXOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); shadowYOffsetHBox = new TQHBox(activeShadowSettings); shadowYOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -284,8 +284,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c shadowYOffsetHBox); shadowYOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, shadowYOffsetHBox); shadowYOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(shadowYOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowYOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowYOffsetHBox = new TQHBox(inactiveShadowSettings); inactiveShadowYOffsetHBox->setSpacing(KDialog::spacingHint()); @@ -295,8 +295,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c inactiveShadowYOffsetSpinBox = new TQSpinBox(-1024, 1024, 1, inactiveShadowYOffsetHBox); inactiveShadowYOffsetSpinBox->setSuffix(i18n(" pixels")); - connect(inactiveShadowYOffsetSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowYOffsetSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); shadowThicknessHBox = new TQHBox(activeShadowSettings); shadowThicknessHBox->setSpacing(KDialog::spacingHint()); @@ -306,8 +306,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c shadowThicknessSpinBox = new TQSpinBox(1, 100, 1, shadowThicknessHBox); shadowThicknessSpinBox->setSuffix(i18n(" pixels")); - connect(shadowThicknessSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(shadowThicknessSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); inactiveShadowThicknessHBox = new TQHBox(inactiveShadowSettings); inactiveShadowThicknessHBox->setSpacing(KDialog::spacingHint()); @@ -317,8 +317,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c inactiveShadowThicknessSpinBox = new TQSpinBox(1, 100, 1, inactiveShadowThicknessHBox); inactiveShadowThicknessSpinBox->setSuffix(i18n(" pixels")); - connect(inactiveShadowThicknessSpinBox, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotSelectionChanged())); + connect(inactiveShadowThicknessSpinBox, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotSelectionChanged())); // Page 4 (WM selector) windowmanagerPage = new TQWidget( tabWidget ); @@ -355,25 +355,25 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c tabWidget->insertTab( shadowPage, i18n("&Shadows") ); tabWidget->insertTab( windowmanagerPage, i18n("&Window Manager") ); - connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotButtonsChanged()) ); // update preview etc. - connect( buttonPositionWidget, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) ); // emit changed()... - connect( decorationList, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotSelectionChanged()) ); - connect( decorationList, TQT_SIGNAL(activated(const TQString&)), - TQT_SLOT(slotChangeDecoration(const TQString&)) ); - connect( cbUseCustomButtonPositions, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), buttonPositionWidget, TQT_SLOT(setEnabled(bool))); - connect(cbUseCustomButtonPositions, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsChanged()) ); - connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), activeShadowSettings, TQT_SLOT(setEnabled(bool))); - connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), inactiveShadowSettings, TQT_SLOT(setEnabled(bool))); - connect(cbWindowShadow, TQT_SIGNAL(toggled(bool)), whichShadowSettings, TQT_SLOT(setEnabled(bool))); - - connect( cbShowToolTips, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - connect( cbWindowShadow, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - connect( cBorder, TQT_SIGNAL( activated( int )), TQT_SLOT( slotBorderChanged( int ))); -// connect( cbUseMiniWindows, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); - - connect( thirdpartyWMList, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotSelectionChanged()) ); - connect( thirdpartyWMArguments, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotSelectionChanged()) ); + connect( buttonPositionWidget, TQ_SIGNAL(changed()), this, TQ_SLOT(slotButtonsChanged()) ); // update preview etc. + connect( buttonPositionWidget, TQ_SIGNAL(changed()), this, TQ_SLOT(slotSelectionChanged()) ); // emit changed()... + connect( decorationList, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotSelectionChanged()) ); + connect( decorationList, TQ_SIGNAL(activated(const TQString&)), + TQ_SLOT(slotChangeDecoration(const TQString&)) ); + connect( cbUseCustomButtonPositions, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + connect(cbUseCustomButtonPositions, TQ_SIGNAL(toggled(bool)), buttonPositionWidget, TQ_SLOT(setEnabled(bool))); + connect(cbUseCustomButtonPositions, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotButtonsChanged()) ); + connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), activeShadowSettings, TQ_SLOT(setEnabled(bool))); + connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), inactiveShadowSettings, TQ_SLOT(setEnabled(bool))); + connect(cbWindowShadow, TQ_SIGNAL(toggled(bool)), whichShadowSettings, TQ_SLOT(setEnabled(bool))); + + connect( cbShowToolTips, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + connect( cbWindowShadow, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + connect( cBorder, TQ_SIGNAL( activated( int )), TQ_SLOT( slotBorderChanged( int ))); +// connect( cbUseMiniWindows, TQ_SIGNAL(clicked()), TQ_SLOT(slotSelectionChanged()) ); + + connect( thirdpartyWMList, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotSelectionChanged()) ); + connect( thirdpartyWMArguments, TQ_SIGNAL(textChanged(const TQString&)), TQ_SLOT(slotSelectionChanged()) ); // Allow twin dcop signal to update our selection list connectDCOPSignal("twin", 0, "dcopResetAllClients()", "dcopUpdateClientList()", false); @@ -414,7 +414,7 @@ void KWinDecorationModule::findDecorations() KDesktopFile desktopFile(filename); TQString libName = desktopFile.readEntry("X-TDE-Library"); - if (!libName.isEmpty() && libName.startsWith( "twin3_" )) + if (!libName.isEmpty() && libName.startsWith("twin_") || libName.startsWith("twin3_")) { DecorationInfo di; di.name = desktopFile.readName(); @@ -614,7 +614,7 @@ TQString KWinDecorationModule::decorationLibName( const TQString& name ) void KWinDecorationModule::resetPlugin( TDEConfig* conf, const TQString& currentDecoName ) { // Config names are "twin_icewm_config" - // for "twin3_icewm" twin client + // for "twin_icewm" twin client TQString oldName = styleToConfigLib( oldLibraryName ); @@ -660,10 +660,10 @@ void KWinDecorationModule::resetPlugin( TDEConfig* conf, const TQString& current pluginObject = (TQObject*)(allocatePlugin( conf, pluginConfigWidget )); // connect required signals and slots together... - connect( pluginObject, TQT_SIGNAL(changed()), this, TQT_SLOT(slotSelectionChanged()) ); - connect( this, TQT_SIGNAL(pluginLoad(TDEConfig*)), pluginObject, TQT_SLOT(load(TDEConfig*)) ); - connect( this, TQT_SIGNAL(pluginSave(TDEConfig*)), pluginObject, TQT_SLOT(save(TDEConfig*)) ); - connect( this, TQT_SIGNAL(pluginDefaults()), pluginObject, TQT_SLOT(defaults()) ); + connect( pluginObject, TQ_SIGNAL(changed()), this, TQ_SLOT(slotSelectionChanged()) ); + connect( this, TQ_SIGNAL(pluginLoad(TDEConfig*)), pluginObject, TQ_SLOT(load(TDEConfig*)) ); + connect( this, TQ_SIGNAL(pluginSave(TDEConfig*)), pluginObject, TQ_SLOT(save(TDEConfig*)) ); + connect( this, TQ_SIGNAL(pluginDefaults()), pluginObject, TQ_SLOT(defaults()) ); pluginConfigWidget->show(); return; } @@ -895,7 +895,7 @@ void KWinDecorationModule::defaults() border_size = BorderNormal; checkSupportedBorderSizes(); - shadowColourButton->setColor(Qt::black); + shadowColourButton->setColor(TQt::black); shadowOpacitySlider->setValue(70); shadowXOffsetSpinBox->setValue(0); shadowYOffsetSpinBox->setValue(10); @@ -904,7 +904,7 @@ void KWinDecorationModule::defaults() cbShadowOverrides->setChecked(false); cbShadowTopMenus->setChecked(false); cbInactiveShadow->setChecked(false); - inactiveShadowColourButton->setColor(Qt::black); + inactiveShadowColourButton->setColor(TQt::black); inactiveShadowOpacitySlider->setValue(70); inactiveShadowXOffsetSpinBox->setValue(0); inactiveShadowYOffsetSpinBox->setValue(5); @@ -938,10 +938,7 @@ void KWinDecorationModule::checkSupportedBorderSizes() TQString KWinDecorationModule::styleToConfigLib( TQString& styleLib ) { - if( styleLib.startsWith( "twin3_" )) - return "twin_" + styleLib.mid( 6 ) + "_config"; - else - return styleLib + "_config"; + return styleLib + "_config"; } TQString KWinDecorationModule::quickHelp() const @@ -951,7 +948,7 @@ TQString KWinDecorationModule::quickHelp() const "as well as titlebar button positions and custom decoration options.</p>" "To choose a theme for your window decoration click on its name and apply your choice by clicking the \"Apply\" button below." " If you do not want to apply your choice you can click the \"Reset\" button to discard your changes." - "<p>You can configure each theme in the \"Configure [...]\" tab. There are different options specific for each theme.</p>" + "<p>You can configure each theme in the \"Configure […]\" tab. There are different options specific for each theme.</p>" "<p>In \"General Options (if available)\" you can activate the \"Buttons\" tab by checking the \"Use custom titlebar button positions\" box." " In the \"Buttons\" tab you can change the positions of the buttons to your liking.</p>" ); } diff --git a/twin/kcmtwin/twindecoration/twindecoration.h b/twin/kcmtwin/twindecoration/twindecoration.h index 5f5f94ab9..b55455c12 100644 --- a/twin/kcmtwin/twindecoration/twindecoration.h +++ b/twin/kcmtwin/twindecoration/twindecoration.h @@ -61,7 +61,7 @@ struct DecorationInfo class KWinDecorationModule : public TDECModule, virtual public KWinDecorationIface, public KDecorationDefines { - Q_OBJECT + TQ_OBJECT public: KWinDecorationModule(TQWidget* parent, const char* name, const TQStringList &); diff --git a/twin/kcmtwin/twinoptions/CMakeLists.txt b/twin/kcmtwin/twinoptions/CMakeLists.txt index b991bac96..6686f99b1 100644 --- a/twin/kcmtwin/twinoptions/CMakeLists.txt +++ b/twin/kcmtwin/twinoptions/CMakeLists.txt @@ -31,7 +31,7 @@ tde_create_translated_desktop( tde_create_translated_desktop( SOURCE twinactions.desktop twinadvanced.desktop twinfocus.desktop - twinmoving.desktop twintranslucency.desktop + twinmoving.desktop twintranslucency.desktop twinactiveborders.desktop DESTINATION ${APPS_INSTALL_DIR}/.hidden PO_DIR twin-desktops ) diff --git a/twin/kcmtwin/twinoptions/main.cpp b/twin/kcmtwin/twinoptions/main.cpp index 8ed52b067..0b392cd14 100644 --- a/twin/kcmtwin/twinoptions/main.cpp +++ b/twin/kcmtwin/twinoptions/main.cpp @@ -36,7 +36,7 @@ extern "C" { - KDE_EXPORT TDECModule *create_twinfocus(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinfocus(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -44,14 +44,14 @@ extern "C" return new KFocusConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twinactions(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinactions(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); return new TDEActionsOptions( parent, name); } - KDE_EXPORT TDECModule *create_twinmoving(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinmoving(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -59,15 +59,22 @@ extern "C" return new KMovingConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twinadvanced(TQWidget *parent, const char *name) + TDE_EXPORT TDECModule *create_twinaborders(TQWidget *parent, const char *name) + { + TDEGlobal::locale()->insertCatalogue("kcmkwm"); + TDEConfig *c = new TDEConfig("twinrc", false, true); + return new KActiveBorderConfig(true, c, parent, name); + } + + TDE_EXPORT TDECModule *create_twinadvanced(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); TDEConfig *c = new TDEConfig("twinrc", false, true); return new KAdvancedConfig(true, c, parent, name); } - - KDE_EXPORT TDECModule *create_twintranslucency(TQWidget *parent, const char *name) + + TDE_EXPORT TDECModule *create_twintranslucency(TQWidget *parent, const char *name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -75,7 +82,7 @@ extern "C" return new KTranslucencyConfig(true, c, parent, name); } - KDE_EXPORT TDECModule *create_twinoptions ( TQWidget *parent, const char* name) + TDE_EXPORT TDECModule *create_twinoptions ( TQWidget *parent, const char* name) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue("kcmkwm"); @@ -95,33 +102,38 @@ KWinOptions::KWinOptions(TQWidget *parent, const char *name) mFocus = new KFocusConfig(false, mConfig, this, "TWin Focus Config"); mFocus->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mFocus, i18n("&Focus")); - connect(mFocus, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mFocus, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "TWin TitleBar Actions"); mTitleBarActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mTitleBarActions, i18n("&Titlebar Actions")); - connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mTitleBarActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mWindowActions = new KWindowActionsConfig(false, mConfig, this, "TWin Window Actions"); mWindowActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mWindowActions, i18n("Window Actio&ns")); - connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mWindowActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mMoving = new KMovingConfig(false, mConfig, this, "TWin Moving"); mMoving->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mMoving, i18n("&Moving")); - connect(mMoving, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mMoving, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); + + mABorders = new KActiveBorderConfig(false, mConfig, this, "TWin Active Borders"); + mABorders->layout()->setMargin(KDialog::marginHint()); + tab->addTab(mABorders, i18n("Active &Borders")); + connect(mABorders, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mAdvanced = new KAdvancedConfig(false, mConfig, this, "TWin Advanced"); mAdvanced->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mAdvanced, i18n("Ad&vanced")); - connect(mAdvanced, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mAdvanced, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mTranslucency = new KTranslucencyConfig(false, mConfig, this, "TWin Translucency"); mTranslucency->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mTranslucency, i18n("&Translucency")); - connect(mTranslucency, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); - + connect(mTranslucency, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); + TDEAboutData *about = new TDEAboutData(I18N_NOOP("kcmtwinoptions"), I18N_NOOP("Window Behavior Configuration Module"), 0, 0, TDEAboutData::License_GPL, @@ -151,6 +163,7 @@ void KWinOptions::load() mTitleBarActions->load(); mWindowActions->load(); mMoving->load(); + mABorders->load(); mAdvanced->load(); mTranslucency->load(); emit TDECModule::changed( false ); @@ -163,6 +176,7 @@ void KWinOptions::save() mTitleBarActions->save(); mWindowActions->save(); mMoving->save(); + mABorders->save(); mAdvanced->save(); mTranslucency->save(); @@ -181,6 +195,7 @@ void KWinOptions::defaults() mTitleBarActions->defaults(); mWindowActions->defaults(); mMoving->defaults(); + mABorders->defaults(); mAdvanced->defaults(); mTranslucency->defaults(); } @@ -222,10 +237,14 @@ TQString KWinOptions::handbookSection() const } else if (index == 4) { - return "advanced"; + return "active-borders"; } else if (index == 5) { + return "advanced"; + } + else if (index == 6) + { return "translucency"; } else @@ -247,12 +266,12 @@ TDEActionsOptions::TDEActionsOptions(TQWidget *parent, const char *name) mTitleBarActions = new KTitleBarActionsConfig(false, mConfig, this, "TWin TitleBar Actions"); mTitleBarActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mTitleBarActions, i18n("&Titlebar Actions")); - connect(mTitleBarActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mTitleBarActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); mWindowActions = new KWindowActionsConfig(false, mConfig, this, "TWin Window Actions"); mWindowActions->layout()->setMargin( KDialog::marginHint() ); tab->addTab(mWindowActions, i18n("Window Actio&ns")); - connect(mWindowActions, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool))); + connect(mWindowActions, TQ_SIGNAL(changed(bool)), this, TQ_SLOT(moduleChanged(bool))); } TDEActionsOptions::~TDEActionsOptions() diff --git a/twin/kcmtwin/twinoptions/main.h b/twin/kcmtwin/twinoptions/main.h index 554b7b761..18464ac79 100644 --- a/twin/kcmtwin/twinoptions/main.h +++ b/twin/kcmtwin/twinoptions/main.h @@ -32,12 +32,13 @@ class TDEConfig; class KFocusConfig; class KTitleBarActionsConfig; class KWindowActionsConfig; +class KActiveBorderConfig; class KAdvancedConfig; class KTranslucencyConfig; class KWinOptions : public TDECModule { - Q_OBJECT + TQ_OBJECT public: @@ -64,6 +65,7 @@ private: KTitleBarActionsConfig *mTitleBarActions; KWindowActionsConfig *mWindowActions; KMovingConfig *mMoving; + KActiveBorderConfig *mABorders; KAdvancedConfig *mAdvanced; KTranslucencyConfig *mTranslucency; @@ -72,7 +74,7 @@ private: class TDEActionsOptions : public TDECModule { - Q_OBJECT + TQ_OBJECT public: diff --git a/twin/kcmtwin/twinoptions/mouse.cpp b/twin/kcmtwin/twinoptions/mouse.cpp index 8778d915e..0e197071c 100644 --- a/twin/kcmtwin/twinoptions/mouse.cpp +++ b/twin/kcmtwin/twinoptions/mouse.cpp @@ -18,7 +18,7 @@ */ #include <tqlabel.h> -#include <tqcombobox.h> +#include <tqcheckbox.h> #include <tqwhatsthis.h> #include <tqlayout.h> #include <tqvgroupbox.h> @@ -164,7 +164,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co combo->insertItem(i18n("On All Desktops")); combo->insertItem(i18n("Nothing")); combo->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); hlayout->addWidget(combo); coTiDbl = combo; TQWhatsThis::add(combo, i18n("Behavior on <em>double</em> click into the titlebar.")); @@ -178,23 +178,28 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co hlayoutW->addWidget(label); txtButton4 = i18n("Handle mouse wheel events"); TQWhatsThis::add( label, txtButton4); - - // Titlebar and frame mouse Wheel + + // Titlebar and frame mouse Wheel TQComboBox* comboW = new TQComboBox(this); comboW->insertItem(i18n("Raise/Lower")); comboW->insertItem(i18n("Shade/Unshade")); comboW->insertItem(i18n("Maximize/Restore")); - comboW->insertItem(i18n("Keep Above/Below")); - comboW->insertItem(i18n("Move to Previous/Next Desktop")); - comboW->insertItem(i18n("Change Opacity")); - comboW->insertItem(i18n("Nothing")); + comboW->insertItem(i18n("Keep Above/Below")); + comboW->insertItem(i18n("Move to Previous/Next Desktop")); + comboW->insertItem(i18n("Change Opacity")); + comboW->insertItem(i18n("Nothing")); comboW->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); - connect(comboW, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(comboW, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); hlayoutW->addWidget(comboW); - coTiAct4 = comboW; + coTiW = comboW; TQWhatsThis::add(comboW, txtButton4); label->setBuddy(comboW); - + + cbTiRevW = new TQCheckBox(i18n("Reverse wheel direction"), this); + connect(cbTiRevW, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + TQWhatsThis::add( cbTiRevW, i18n("Use this to reverse the action of the mouse wheel.") ); + hlayoutW->addWidget(cbTiRevW); + /** Titlebar and frame **************/ box = new TQVGroupBox( i18n("Titlebar && Frame"), this, "Titlebar and Frame"); @@ -204,7 +209,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co TQWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on the" " titlebar or the frame of a window.") ); - grid = new TQGrid(4, Qt::Vertical, box); + grid = new TQGrid(4, TQt::Vertical, box); new TQLabel(grid); // dummy @@ -239,15 +244,12 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co TQWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar" " or the frame of an active window.") ); - // Titlebar and frame, active, mouse button 1 - combo = new TQComboBox(grid); - combo->insertItem(i18n("Raise")); - combo->insertItem(i18n("Lower")); - combo->insertItem(i18n("Operations Menu")); - combo->insertItem(i18n("Toggle Raise & Lower")); - combo->insertItem(i18n("Nothing")); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); - coTiAct1 = combo; + items << i18n("Raise") + << i18n("Lower") + << i18n("Operations Menu") + << i18n("Toggle Raise & Lower") + << i18n("Nothing") + << i18n("Shade"); txtButton1 = i18n("Behavior on <em>left</em> click into the titlebar or frame of an " "<em>active</em> window."); @@ -256,29 +258,29 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co "<em>active</em> window."); // Be nice to left handed users - if ( leftHandedMouse ) tqSwap(txtButton1, txtButton3); + if (leftHandedMouse) + { + tqSwap(txtButton1, txtButton3); + } + // Titlebar and frame, active, mouse button 1 + combo = new TQComboBox(grid); + combo->insertStringList(items); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); + coTiAct1 = combo; TQWhatsThis::add(combo, txtButton1); // Titlebar and frame, active, mouse button 2 - - items << i18n("Raise") - << i18n("Lower") - << i18n("Operations Menu") - << i18n("Toggle Raise & Lower") - << i18n("Nothing") - << i18n("Shade"); - combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiAct2 = combo; TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window.")); // Titlebar and frame, active, mouse button 3 combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiAct3 = combo; TQWhatsThis::add(combo, txtButton3 ); @@ -308,19 +310,19 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiInAct1 = combo; TQWhatsThis::add(combo, txtButton1); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiInAct2 = combo; TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>inactive</em> window.")); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coTiInAct3 = combo; TQWhatsThis::add(combo, txtButton3); @@ -360,13 +362,13 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co coMax[b] = new ToolTipComboBox(box, tbl_Max); for (int t = 0; t < 3; ++t) coMax[b]->insertItem(maxButtonPixmaps[t]); - connect(coMax[b], TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); - connect(coMax[b], TQT_SIGNAL(activated(int)), coMax[b], TQT_SLOT(changed())); + connect(coMax[b], TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); + connect(coMax[b], TQ_SIGNAL(activated(int)), coMax[b], TQ_SLOT(changed())); TQWhatsThis::add( coMax[b], txtButton[b] ); coMax[b]->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum )); } - connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(paletteChanged())); + connect(kapp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(paletteChanged())); layout->addStretch(); @@ -491,8 +493,8 @@ void KTitleBarActionsConfig::setComboText( TQComboBox* combo, const char*txt ) combo->setCurrentItem( tbl_txt_lookup( tbl_TiAc, txt )); else if( combo == coTiInAct1 || combo == coTiInAct2 || combo == coTiInAct3 ) combo->setCurrentItem( tbl_txt_lookup( tbl_TiInAc, txt )); - else if( combo == coTiAct4 ) - combo->setCurrentItem( tbl_txt_lookup( tbl_TiWAc, txt )); + else if( combo == coTiW ) + combo->setCurrentItem( tbl_txt_lookup( tbl_TiWAc, txt )); else if( combo == coMax[0] || combo == coMax[1] || combo == coMax[2] ) { combo->setCurrentItem( tbl_txt_lookup( tbl_Max, txt )); @@ -538,10 +540,11 @@ void KTitleBarActionsConfig::load() setComboText(coTiAct1,config->readEntry("CommandActiveTitlebar1","Raise").ascii()); setComboText(coTiAct2,config->readEntry("CommandActiveTitlebar2","Lower").ascii()); setComboText(coTiAct3,config->readEntry("CommandActiveTitlebar3","Operations menu").ascii()); - setComboText(coTiAct4,config->readEntry("CommandTitlebarWheel","Nothing").ascii()); setComboText(coTiInAct1,config->readEntry("CommandInactiveTitlebar1","Activate and raise").ascii()); setComboText(coTiInAct2,config->readEntry("CommandInactiveTitlebar2","Activate and lower").ascii()); setComboText(coTiInAct3,config->readEntry("CommandInactiveTitlebar3","Operations menu").ascii()); + setComboText(coTiW,config->readEntry("CommandTitlebarWheel","Nothing").ascii()); + cbTiRevW->setChecked(config->readBoolEntry("CommandTitlebarReverseWheel", false)); } void KTitleBarActionsConfig::save() @@ -556,10 +559,11 @@ void KTitleBarActionsConfig::save() config->writeEntry("CommandActiveTitlebar2", functionTiAc(coTiAct2->currentItem())); config->writeEntry("CommandActiveTitlebar3", functionTiAc(coTiAct3->currentItem())); config->writeEntry("CommandInactiveTitlebar1", functionTiInAc(coTiInAct1->currentItem())); - config->writeEntry("CommandTitlebarWheel", functionTiWAc(coTiAct4->currentItem())); config->writeEntry("CommandInactiveTitlebar2", functionTiInAc(coTiInAct2->currentItem())); config->writeEntry("CommandInactiveTitlebar3", functionTiInAc(coTiInAct3->currentItem())); - + config->writeEntry("CommandTitlebarWheel", functionTiWAc(coTiW->currentItem())); + config->writeEntry("CommandTitlebarReverseWheel", cbTiRevW->isChecked()); + if (standAlone) { config->sync(); @@ -575,10 +579,11 @@ void KTitleBarActionsConfig::defaults() setComboText(coTiAct1,"Raise"); setComboText(coTiAct2,"Lower"); setComboText(coTiAct3,"Operations menu"); - setComboText(coTiAct4,"Nothing"); setComboText(coTiInAct1,"Activate and raise"); setComboText(coTiInAct2,"Activate and lower"); setComboText(coTiInAct3,"Operations menu"); + setComboText(coTiW,"Nothing"); + cbTiRevW->setChecked(false); for (int t = 0; t < 3; ++t) setComboText(coMax[t], tbl_Max[t]); } @@ -606,7 +611,7 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config TQWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on an inactive" " inner window ('inner' means: not titlebar, not frame).") ); - grid = new TQGrid(3, Qt::Vertical, box); + grid = new TQGrid(3, TQt::Vertical, box); strMouseButton1 = i18n("Left button:"); txtButton1 = i18n("In this row you can customize left click behavior when clicking into" @@ -650,19 +655,19 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config TQComboBox* combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coWin1 = combo; TQWhatsThis::add( combo, strWin1 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coWin2 = combo; TQWhatsThis::add( combo, strWin2 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coWin3 = combo; TQWhatsThis::add( combo, strWin3 ); @@ -676,7 +681,7 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config TQWhatsThis::add( box, i18n("Here you can customize TDE's behavior when clicking somewhere into" " a window while pressing a modifier key.")); - grid = new TQGrid(5, Qt::Vertical, box); + grid = new TQGrid(6, TQt::Vertical, box); // Labels label = new TQLabel(i18n("Modifier key:"), grid); @@ -716,11 +721,13 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config " in a window while pressing the modifier key."); TQWhatsThis::add( label, strAllW); + label = new TQLabel("", grid); // Dummy label to keep grid in order + // Combo's combo = new TQComboBox(grid); combo->insertItem(i18n("Meta")); combo->insertItem(i18n("Alt")); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAllKey = combo; TQWhatsThis::add( combo, strAllKey ); @@ -736,19 +743,19 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAll1 = combo; TQWhatsThis::add( combo, strAll1 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAll2 = combo; TQWhatsThis::add( combo, strAll2 ); combo = new TQComboBox(grid); combo->insertStringList(items); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAll3 = combo; TQWhatsThis::add( combo, strAll3 ); @@ -756,14 +763,18 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config combo->insertItem(i18n("Raise/Lower")); combo->insertItem(i18n("Shade/Unshade")); combo->insertItem(i18n("Maximize/Restore")); - combo->insertItem(i18n("Keep Above/Below")); - combo->insertItem(i18n("Move to Previous/Next Desktop")); - combo->insertItem(i18n("Change Opacity")); - combo->insertItem(i18n("Nothing")); - connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + combo->insertItem(i18n("Keep Above/Below")); + combo->insertItem(i18n("Move to Previous/Next Desktop")); + combo->insertItem(i18n("Change Opacity")); + combo->insertItem(i18n("Nothing")); + connect(combo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); coAllW = combo; TQWhatsThis::add( combo, strAllW ); + cbAllRevW = new TQCheckBox(i18n("Reverse wheel direction"), grid); + connect(cbAllRevW, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + TQWhatsThis::add( cbAllRevW, i18n("Use this to reverse the action of the mouse wheel.") ); + layout->addStretch(); load(); @@ -784,7 +795,7 @@ void KWindowActionsConfig::setComboText( TQComboBox* combo, const char*txt ) else if( combo == coAll1 || combo == coAll2 || combo == coAll3 ) combo->setCurrentItem( tbl_txt_lookup( tbl_All, txt )); else if( combo == coAllW ) - combo->setCurrentItem( tbl_txt_lookup( tbl_AllW, txt )); + combo->setCurrentItem( tbl_txt_lookup( tbl_AllW, txt )); else abort(); } @@ -820,6 +831,7 @@ void KWindowActionsConfig::load() setComboText(coAll2,config->readEntry("CommandAll2","Toggle raise and lower").ascii()); setComboText(coAll3,config->readEntry("CommandAll3","Resize").ascii()); setComboText(coAllW,config->readEntry("CommandAllWheel","Nothing").ascii()); + cbAllRevW->setChecked(config->readBoolEntry("CommandAllReverseWheel", false)); } void KWindowActionsConfig::save() @@ -833,7 +845,8 @@ void KWindowActionsConfig::save() config->writeEntry("CommandAll2", functionAll(coAll2->currentItem())); config->writeEntry("CommandAll3", functionAll(coAll3->currentItem())); config->writeEntry("CommandAllWheel", functionAllW(coAllW->currentItem())); - + config->writeEntry("CommandAllReverseWheel", cbAllRevW->isChecked()); + if (standAlone) { config->sync(); @@ -853,4 +866,5 @@ void KWindowActionsConfig::defaults() setComboText(coAll2,"Toggle raise and lower"); setComboText(coAll3,"Resize"); setComboText(coAllW,"Nothing"); + cbAllRevW->setChecked(false); } diff --git a/twin/kcmtwin/twinoptions/mouse.h b/twin/kcmtwin/twinoptions/mouse.h index 772bc5ac9..2a57fc534 100644 --- a/twin/kcmtwin/twinoptions/mouse.h +++ b/twin/kcmtwin/twinoptions/mouse.h @@ -22,6 +22,7 @@ #ifndef __KKWMMOUSECONFIG_H__ #define __KKWMMOUSECONFIG_H__ +class TQCheckBox; class TDEConfig; #include <tqwidget.h> @@ -32,8 +33,8 @@ class TDEConfig; class ToolTipComboBox: public TQComboBox { - Q_OBJECT - + TQ_OBJECT + public: ToolTipComboBox(TQWidget * owner, char const * const * toolTips_) : TQComboBox(owner) @@ -50,7 +51,7 @@ protected: class KTitleBarActionsConfig : public TDECModule { - Q_OBJECT + TQ_OBJECT public: @@ -62,18 +63,18 @@ public: void defaults(); public slots: - void changed() { emit TDECModule::changed(true); } + void changed() { emit TDECModule::changed(true); } private: TQComboBox* coTiDbl; - TQComboBox* coTiAct1; TQComboBox* coTiAct2; TQComboBox* coTiAct3; - TQComboBox* coTiAct4; TQComboBox* coTiInAct1; TQComboBox* coTiInAct2; TQComboBox* coTiInAct3; + TQComboBox* coTiW; + TQCheckBox* cbTiRevW; ToolTipComboBox * coMax[3]; @@ -82,7 +83,7 @@ private: const char* functionTiDbl(int); const char* functionTiAc(int); - const char* functionTiWAc(int); + const char* functionTiWAc(int); const char* functionTiInAc(int); const char* functionMax(int); @@ -96,7 +97,7 @@ private slots: class KWindowActionsConfig : public TDECModule { - Q_OBJECT + TQ_OBJECT public: @@ -108,7 +109,7 @@ public: void defaults(); public slots: - void changed() { emit TDECModule::changed(true); } + void changed() { emit TDECModule::changed(true); } private: TQComboBox* coWin1; @@ -120,6 +121,7 @@ private: TQComboBox* coAll2; TQComboBox* coAll3; TQComboBox* coAllW; + TQCheckBox* cbAllRevW; TDEConfig *config; bool standAlone; diff --git a/twin/kcmtwin/twinoptions/twinactiveborders.desktop b/twin/kcmtwin/twinoptions/twinactiveborders.desktop new file mode 100644 index 000000000..54e7d0731 --- /dev/null +++ b/twin/kcmtwin/twinoptions/twinactiveborders.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Icon=kcmkwm +Type=Application +Exec=tdecmshell twinoptions +X-DocPath=kcontrol/windowbehavior/index.html + +X-TDE-ModuleType=Library +X-TDE-Library=twinoptions +X-TDE-FactoryName=twinaborders + +Name=Active Borders + +Comment=Configure active borders/corners feature + +Keywords=window behavior;windows;frame;titlebar;borders;corners;active borders;aerosnap; + +Categories=Qt;TDE;X-TDE-settings-desktop; diff --git a/twin/kcmtwin/twinoptions/windows.cpp b/twin/kcmtwin/twinoptions/windows.cpp index 66249d474..9d8e8d617 100644 --- a/twin/kcmtwin/twinoptions/windows.cpp +++ b/twin/kcmtwin/twinoptions/windows.cpp @@ -29,6 +29,7 @@ #include <tqslider.h> #include <tqwhatsthis.h> #include <tqvbuttongroup.h> +#include <tqvbox.h> #include <tqcheckbox.h> #include <tqradiobutton.h> #include <tqlabel.h> @@ -55,34 +56,39 @@ // twin config keywords -#define KWIN_FOCUS "FocusPolicy" -#define KWIN_PLACEMENT "Placement" -#define KWIN_MOVE "MoveMode" -#define KWIN_MINIMIZE_ANIM "AnimateMinimize" -#define KWIN_MINIMIZE_ANIM_SPEED "AnimateMinimizeSpeed" -#define KWIN_RESIZE_OPAQUE "ResizeMode" -#define KWIN_GEOMETRY "GeometryTip" -#define KWIN_AUTORAISE_INTERVAL "AutoRaiseInterval" -#define KWIN_AUTORAISE "AutoRaise" -#define KWIN_DELAYFOCUS_INTERVAL "DelayFocusInterval" -#define KWIN_DELAYFOCUS "DelayFocus" -#define KWIN_CLICKRAISE "ClickRaise" -#define KWIN_ANIMSHADE "AnimateShade" -#define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows" -#define KWIN_ALTTABMODE "AltTabStyle" -#define KWIN_TRAVERSE_ALL "TraverseAll" -#define KWIN_SHOW_POPUP "ShowPopup" -#define KWIN_ROLL_OVER_DESKTOPS "RollOverDesktops" -#define KWIN_SHADEHOVER "ShadeHover" -#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval" -#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel" -#define KWIN_HIDE_UTILITY "HideUtilityWindowsForInactive" -#define KWIN_SEPARATE_SCREEN_FOCUS "SeparateScreenFocus" -#define KWIN_ACTIVE_MOUSE_SCREEN "ActiveMouseScreen" - -// kwm config keywords -#define KWM_ELECTRIC_BORDER "ElectricBorders" -#define KWM_ELECTRIC_BORDER_DELAY "ElectricBorderDelay" +#define KWIN_FOCUS "FocusPolicy" +#define KWIN_PLACEMENT "Placement" +#define KWIN_MOVE_MODE "MoveMode" +#define KWIN_RESIZE_MODE "ResizeMode" +#define KWIN_TILING_MODE "TilingMode" +#define KWIN_MINIMIZE_ANIM "AnimateMinimize" +#define KWIN_MINIMIZE_ANIM_SPEED "AnimateMinimizeSpeed" +#define KWIN_GEOMETRY "GeometryTip" +#define KWIN_AUTORAISE_INTERVAL "AutoRaiseInterval" +#define KWIN_AUTORAISE "AutoRaise" +#define KWIN_DELAYFOCUS_INTERVAL "DelayFocusInterval" +#define KWIN_DELAYFOCUS "DelayFocus" +#define KWIN_CLICKRAISE "ClickRaise" +#define KWIN_ANIMSHADE "AnimateShade" +#define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows" +#define KWIN_RESET_MAX_WIN_GEOM "ResetMaximizedWindowGeometry" +#define KWIN_ALTTABMODE "AltTabStyle" +#define KWIN_TRAVERSE_ALL "TraverseAll" +#define KWIN_SHOW_POPUP "ShowPopup" +#define KWIN_ROLL_OVER_DESKTOPS "RollOverDesktops" +#define KWIN_SHADEHOVER "ShadeHover" +#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval" +#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel" +#define KWIN_HIDE_UTILITY "HideUtilityWindowsForInactive" +#define KWIN_SEPARATE_SCREEN_FOCUS "SeparateScreenFocus" +#define KWIN_ACTIVE_MOUSE_SCREEN "ActiveMouseScreen" +#define KWIN_ACTIVE_BORDERS "ActiveBorders" +#define KWIN_ACTIVE_BORDER_DELAY "ActiveBorderDelay" +#define KWIN_ACTIVE_BORDER_DISTANCE "ActiveBorderDistance" + +// legacy options +#define KWIN_OLD_ACTIVE_BORDERS "ElectricBorders" +#define KWIN_OLD_ACTIVE_BORDER_DELAY "ElectricBorderDelay" //CT 15mar 98 - magics #define KWM_BRDR_SNAP_ZONE "BorderSnapZone" @@ -124,7 +130,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par // focus policy fcsBox = new TQButtonGroup(i18n("Focus"),this); - fcsBox->setColumnLayout( 0, Qt::Horizontal ); + fcsBox->setColumnLayout( 0, TQt::Horizontal ); TQBoxLayout *fLay = new TQVBoxLayout(fcsBox->layout(), KDialog::spacingHint()); @@ -137,7 +143,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par focusCombo->insertItem(i18n("Focus Follows Mouse"), FOCUS_FOLLOWS_MOUSE); focusCombo->insertItem(i18n("Focus Under Mouse"), FOCUS_UNDER_MOUSE); focusCombo->insertItem(i18n("Focus Strictly Under Mouse"), FOCUS_STRICTLY_UNDER_MOUSE); - cLay->addWidget(focusCombo,1 ,Qt::AlignLeft); + cLay->addWidget(focusCombo,1 ,TQt::AlignLeft); fLabel->setBuddy(focusCombo); // FIXME, when more policies have been added to TWin @@ -163,35 +169,35 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par TQWhatsThis::add( focusCombo, wtstr); TQWhatsThis::add(fLabel, wtstr); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setAutoRaiseEnabled()) ); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setAutoRaiseEnabled()) ); // autoraise delay autoRaiseOn = new TQCheckBox(i18n("Auto &raise"), fcsBox); fLay->addWidget(autoRaiseOn); - connect(autoRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(autoRaiseOnTog(bool))); + connect(autoRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(autoRaiseOnTog(bool))); autoRaise = new KIntNumInput(500, fcsBox); - autoRaise->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft); + autoRaise->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft); autoRaise->setRange(0, 3000, 100, true); autoRaise->setSteps(100,100); autoRaise->setSuffix(i18n(" msec")); fLay->addWidget(autoRaise); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDelayFocusEnabled()) ); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setDelayFocusEnabled()) ); delayFocusOn = new TQCheckBox(i18n("Delay focus"), fcsBox); fLay->addWidget(delayFocusOn); - connect(delayFocusOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(delayFocusOnTog(bool))); + connect(delayFocusOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(delayFocusOnTog(bool))); delayFocus = new KIntNumInput(500, fcsBox); - delayFocus->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft); + delayFocus->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft); delayFocus->setRange(0, 3000, 100, true); delayFocus->setSteps(100,100); delayFocus->setSuffix(i18n(" msec")); fLay->addWidget(delayFocus); clickRaiseOn = new TQCheckBox(i18n("Click &raises active window"), fcsBox); - connect(clickRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(clickRaiseOnTog(bool))); + connect(clickRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(clickRaiseOnTog(bool))); fLay->addWidget(clickRaiseOn); // fLay->addColSpacing(0,TQMAX(autoRaiseOn->sizeHint().width(), @@ -206,7 +212,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "High" )); focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "Extreme" )); focusStealingLabel->setBuddy( focusStealing ); - cLay->addWidget(focusStealing,2 ,Qt::AlignLeft); + cLay->addWidget(focusStealing,2 ,TQt::AlignLeft); wtstr = i18n( "<p>This option specifies how much TWin will try to prevent unwanted focus stealing " "caused by unexpected activation of new windows. (Note: This feature does not " "work with the Focus Under Mouse or Focus Strictly Under Mouse focus policies.)" @@ -228,7 +234,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par "in the Notifications control module.</p>" ); TQWhatsThis::add( focusStealing, wtstr ); TQWhatsThis::add( focusStealingLabel, wtstr ); - + TQWhatsThis::add( autoRaiseOn, i18n("When this option is enabled, a window in the background will automatically" " come to the front when the mouse pointer has been over it for some time.") ); wtstr = i18n("This is the delay after which the window that the mouse pointer is over will automatically" @@ -257,10 +263,10 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par " with the focused window. This option is by default disabled for Click to focus and" " enabled for other focus policies." ); TQWhatsThis::add( activeMouseScreen, wtstr ); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateActiveMouseScreen())); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateActiveMouseScreen())); if (!TQApplication::desktop()->isVirtualDesktop() || - TQApplication::desktop()->numScreens() == 1) // No Ximerama + TQApplication::desktop()->numScreens() == 1) // No Ximerama { separateScreenFocus->hide(); activeMouseScreen->hide(); @@ -269,7 +275,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par lay->addWidget(fcsBox); kbdBox = new TQButtonGroup(i18n("Navigation"), this); - kbdBox->setColumnLayout( 0, Qt::Horizontal ); + kbdBox->setColumnLayout( 0, TQt::Horizontal ); TQVBoxLayout *kLay = new TQVBoxLayout(kbdBox->layout(), KDialog::spacingHint()); altTabPopup = new TQCheckBox( i18n("Show window list while switching windows"), kbdBox ); @@ -285,7 +291,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par " is pressed, with no popup widget. In addition, the previously" " activated window will be sent to the back in this mode."); TQWhatsThis::add( altTabPopup, wtstr ); - connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateAltTabMode())); + connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateAltTabMode())); traverseAll = new TQCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox ); kLay->addWidget( traverseAll ); @@ -313,17 +319,17 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par lay->addStretch(); // Any changes goes to slotChanged() - connect(focusCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); - connect(fcsBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed())); - connect(autoRaise, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(delayFocus, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(separateScreenFocus, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(activeMouseScreen, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(altTabPopup, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(traverseAll, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(rollOverDesktops, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(showPopupinfo, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect(focusStealing, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); + connect(focusCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); + connect(fcsBox, TQ_SIGNAL(clicked(int)), TQ_SLOT(changed())); + connect(autoRaise, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(delayFocus, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(separateScreenFocus, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(activeMouseScreen, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(altTabPopup, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(traverseAll, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(rollOverDesktops, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(showPopupinfo, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect(focusStealing, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); load(); } @@ -493,7 +499,7 @@ void KFocusConfig::load( void ) setClickRaise(key != "off"); setAutoRaiseEnabled(); // this will disable/hide the auto raise delay widget if focus==click setDelayFocusEnabled(); - + setSeparateScreenFocus( config->readBoolEntry(KWIN_SEPARATE_SCREEN_FOCUS, false)); // on by default for non click to focus policies setActiveMouseScreen( config->readBoolEntry(KWIN_ACTIVE_MOUSE_SCREEN, focusCombo->currentItem() != 0 )); @@ -607,6 +613,220 @@ void KFocusConfig::defaults() emit TDECModule::changed(true); } +KActiveBorderConfig::~KActiveBorderConfig() { + if (standAlone) delete config; +} + +KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, TQWidget *parent, const char*) + : TDECModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone) { + + TQBoxLayout *lay = new TQVBoxLayout(this, 0, KDialog::spacingHint()); + + active_box = new TQButtonGroup(i18n("Active Desktop Borders"), this); + TQVBoxLayout *active_vbox = new TQVBoxLayout(active_box); + active_vbox->setSpacing(5); + active_vbox->setMargin(15); + TQWhatsThis::add( active_box, i18n("If this option is enabled, moving the mouse to a screen border" + " will perform an action. It will either change your desktop or tile the window that is currently" + " dragged.") ); + + TQLabel *active_func_label = new TQLabel(i18n("Function:"), active_box); + + active_disable = new TQRadioButton(i18n("D&isabled"), active_box); + + active_desktop = new TQRadioButton(i18n("Switch &desktop"), active_box); + active_desktop_conf = new TQWidget(active_box); + TQHBoxLayout *active_desktop_conf_hbox = new TQHBoxLayout(active_desktop_conf); + active_desktop_conf_hbox->addSpacing(20); + active_desktop_conf_hbox->setAutoAdd(true); + active_move = new TQCheckBox(i18n("Switch desktop only when &moving a window"), active_desktop_conf); + + active_tile = new TQRadioButton(i18n("Tile &window"), active_box); + active_tile_conf = new TQWidget(active_box); + TQHBoxLayout *active_tile_conf_hbox = new TQHBoxLayout(active_tile_conf); + active_tile_conf_hbox->addSpacing(20); + TQVBox *active_tile_conf_vbox = new TQVBox(active_tile_conf); + active_tile_conf_hbox->addWidget(active_tile_conf_vbox); + active_maximize = new TQCheckBox(i18n("Maximize windows by dragging them to the &top of the screen"), active_tile_conf_vbox); + tilingOpaque = new TQCheckBox(i18n("Display content &while tiling windows"), active_tile_conf_vbox); + TQWhatsThis::add(tilingOpaque, i18n("Enable this option if you want a window's" + " content to be shown while tiling it," + " instead of just showing a window" + " 'skeleton'. The result may not be " + " satisfying on slow machines.")); + + delays = new KIntNumInput(10, active_box); + delays->setRange(0, MAX_EDGE_RES, 50, true); + delays->setSuffix(i18n(" msec")); + delays->setLabel(i18n("Border &activation delay:")); + TQWhatsThis::add( delays, i18n("Here you can set a delay for the activation of" + " active borders feature. The selected action will be performed after the mouse " + " has been pushed against a screen border for the specified number of milliseconds.") ); + + distance = new KIntNumInput(10, active_box); + distance->setRange(1, 100, 1, true); + distance->setSuffix(i18n(" px")); + distance->setLabel(i18n("Border &activation distance:")); + TQWhatsThis::add( distance, i18n("The distance from which an active border can" + " be activated. A lower value requires you to push repeatedly into the edge." + " Setting this to a higher value (e.g. 30) activates the borders when the" + " mouse is close enough, making them easier to activate but also more prone" + " to false activations.")); + + active_vbox->addSpacing(10); + active_vbox->addWidget(active_func_label); + active_vbox->addWidget(active_disable); + active_vbox->addWidget(active_desktop); + active_vbox->addWidget(active_desktop_conf); + active_vbox->addWidget(active_tile); + active_vbox->addWidget(active_tile_conf); + active_vbox->addSpacing(15); + active_vbox->addWidget(delays); + active_vbox->addWidget(distance); + active_vbox->addSpacing(15); + active_vbox->addWidget(tilingOpaque); + + connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(updateActiveBorders())); + + // Any changes go to slotChanged() + connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(changed())); + connect(active_move, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed())); + connect(active_maximize, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed())); + connect(delays, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed())); + connect(distance, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed())); + connect(tilingOpaque, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed())); + + lay->addWidget(active_box); + lay->addStretch(); + load(); +} + +void KActiveBorderConfig::load() { + config->setGroup("Windows"); + + // compatibility with old option names + int active_borders = config->readNumEntry(KWIN_ACTIVE_BORDERS, -1); + if (active_borders == -1) { + active_borders = config->readNumEntry(KWIN_OLD_ACTIVE_BORDERS, 0); + } + + int active_borders_delay = config->readNumEntry(KWIN_ACTIVE_BORDER_DELAY, -1); + if (active_borders_delay == -1) { + active_borders_delay = config->readNumEntry(KWIN_OLD_ACTIVE_BORDER_DELAY, 150); + } + + setActiveBorders(active_borders); + setActiveBorderDelay(active_borders_delay); + setActiveBorderDistance(config->readNumEntry(KWIN_ACTIVE_BORDER_DISTANCE, 10)); + + TQString tilingMode = config->readEntry(KWIN_TILING_MODE, "Opaque"); + if (tilingMode == "Opaque") + setTilingMode(OPAQUE); + else if (tilingMode == "Transparent") + setTilingMode(TRANSPARENT); + + emit TDECModule::changed(false); +} + +void KActiveBorderConfig::save() { + config->setGroup("Windows"); + + config->writeEntry(KWIN_ACTIVE_BORDERS, getActiveBorders()); + config->writeEntry(KWIN_ACTIVE_BORDER_DELAY, getActiveBorderDelay()); + config->writeEntry(KWIN_ACTIVE_BORDER_DISTANCE, getActiveBorderDistance()); + + // remove replaced legacy entries + config->deleteEntry(KWIN_OLD_ACTIVE_BORDERS); + config->deleteEntry(KWIN_OLD_ACTIVE_BORDER_DELAY); + + int tilingMode = getTilingMode(); + if (tilingMode == OPAQUE) + config->writeEntry(KWIN_TILING_MODE, "Opaque"); + else + config->writeEntry(KWIN_TILING_MODE, "Transparent"); + + if (standAlone) + { + config->sync(); + if (!kapp->dcopClient()->isAttached()) + kapp->dcopClient()->attach(); + kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString("")); + } + emit TDECModule::changed(false); +} + +void KActiveBorderConfig::defaults() { + setActiveBorders(0); + setActiveBorderDelay(150); + setActiveBorderDistance(10); + setTilingMode(TRANSPARENT); + emit TDECModule::changed(true); +} + +int KActiveBorderConfig::getTilingMode() { + return tilingOpaque->isChecked() ? OPAQUE : TRANSPARENT; +} + +void KActiveBorderConfig::setTilingMode(int opaque) { + tilingOpaque->setChecked(opaque == OPAQUE); +} + +void KActiveBorderConfig::updateActiveBorders() { + active_desktop_conf->setEnabled(active_desktop->isChecked()); + active_tile_conf->setEnabled(active_tile->isChecked()); +} + +int KActiveBorderConfig::getActiveBorders() { + if (active_desktop->isChecked()) + { + return active_move->isChecked() ? 1 : 2; + } + + if (active_tile->isChecked()) + { + return active_maximize->isChecked() ? 4 : 3; + } + + return 0; +} + +int KActiveBorderConfig::getActiveBorderDelay() { + return delays->value(); +} + +int KActiveBorderConfig::getActiveBorderDistance() { + return distance->value(); +} + +void KActiveBorderConfig::setActiveBorders(int i) { + switch(i) + { + case 1: + active_move->setChecked(true); + case 2: + active_desktop->setChecked(true); + break; + case 4: + active_maximize->setChecked(true); + case 3: + active_tile->setChecked(true); + break; + default: + active_disable->setChecked(true); + break; + } + updateActiveBorders(); +} + +void KActiveBorderConfig::setActiveBorderDelay(int delay) +{ + delays->setValue(delay); +} + +void KActiveBorderConfig::setActiveBorderDistance(int d) { + distance->setValue(d); +} + KAdvancedConfig::~KAdvancedConfig () { if (standAlone) @@ -640,10 +860,10 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget shadeHoverOn = new TQCheckBox(i18n("&Enable hover"), shBox); - connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(shadeHoverChanged(bool))); + connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(shadeHoverChanged(bool))); shadeHover = new KIntNumInput(500, shBox); - shadeHover->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft); + shadeHover->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft); shadeHover->setRange(0, 3000, 100, true); shadeHover->setSteps(100, 100); shadeHover->setSuffix(i18n(" msec")); @@ -658,42 +878,16 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget lay->addWidget(shBox); // Any changes goes to slotChanged() - connect(animateShade, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(shadeHover, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - - electricBox = new TQVButtonGroup(i18n("Active Desktop Borders"), this); - electricBox->setMargin(15); - - TQWhatsThis::add( electricBox, i18n("If this option is enabled, moving the mouse to a screen border" - " will change your desktop. This is e.g. useful if you want to drag windows from one desktop" - " to the other.") ); - active_disable = new TQRadioButton(i18n("D&isabled"), electricBox); - active_move = new TQRadioButton(i18n("Only &when moving windows"), electricBox); - active_always = new TQRadioButton(i18n("A&lways enabled"), electricBox); - - delays = new KIntNumInput(10, electricBox); - delays->setRange(0, MAX_EDGE_RES, 50, true); - delays->setSuffix(i18n(" msec")); - delays->setLabel(i18n("Desktop &switch delay:")); - TQWhatsThis::add( delays, i18n("Here you can set a delay for switching desktops using the active" - " borders feature. Desktops will be switched after the mouse has been pushed against a screen border" - " for the specified number of milliseconds.") ); - - connect( electricBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(setEBorders())); - - // Any changes goes to slotChanged() - connect(electricBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed())); - connect(delays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - - lay->addWidget(electricBox); + connect(animateShade, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(shadeHover, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); hideUtilityWindowsForInactive = new TQCheckBox( i18n( "Hide utility windows for inactive applications" ), this ); TQWhatsThis::add( hideUtilityWindowsForInactive, - i18n( "When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be" + i18n( "When turned on, utility windows (tool windows, torn-off menus,…) of inactive applications will be" " hidden and will be shown only when the application becomes active. Note that applications" " have to mark the windows with the proper window type for this feature to work." )); - connect(hideUtilityWindowsForInactive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); + connect(hideUtilityWindowsForInactive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); lay->addWidget( hideUtilityWindowsForInactive ); lay->addStretch(); @@ -736,9 +930,6 @@ void KAdvancedConfig::load( void ) setShadeHover(config->readBoolEntry(KWIN_SHADEHOVER, false)); setShadeHoverInterval(config->readNumEntry(KWIN_SHADEHOVER_INTERVAL, 250)); - setElectricBorders(config->readNumEntry(KWM_ELECTRIC_BORDER, 0)); - setElectricBorderDelay(config->readNumEntry(KWM_ELECTRIC_BORDER_DELAY, 150)); - setHideUtilityWindowsForInactive( config->readBoolEntry( KWIN_HIDE_UTILITY, true )); emit TDECModule::changed(false); @@ -758,10 +949,6 @@ void KAdvancedConfig::save( void ) v = getShadeHoverInterval(); if (v<0) v = 0; config->writeEntry(KWIN_SHADEHOVER_INTERVAL, v); - - config->writeEntry(KWM_ELECTRIC_BORDER, getElectricBorders()); - config->writeEntry(KWM_ELECTRIC_BORDER_DELAY,getElectricBorderDelay()); - config->writeEntry(KWIN_HIDE_UTILITY, hideUtilityWindowsForInactive->isChecked()); if (standAlone) @@ -779,47 +966,10 @@ void KAdvancedConfig::defaults() setAnimateShade(true); setShadeHover(false); setShadeHoverInterval(250); - setElectricBorders(0); - setElectricBorderDelay(150); setHideUtilityWindowsForInactive( true ); emit TDECModule::changed(true); } -void KAdvancedConfig::setEBorders() -{ - delays->setEnabled(!active_disable->isChecked()); -} - -int KAdvancedConfig::getElectricBorders() -{ - if (active_move->isChecked()) - return 1; - if (active_always->isChecked()) - return 2; - return 0; -} - -int KAdvancedConfig::getElectricBorderDelay() -{ - return delays->value(); -} - -void KAdvancedConfig::setElectricBorders(int i){ - switch(i) - { - case 1: active_move->setChecked(true); break; - case 2: active_always->setChecked(true); break; - default: active_disable->setChecked(true); break; - } - setEBorders(); -} - -void KAdvancedConfig::setElectricBorderDelay(int delay) -{ - delays->setValue(delay); -} - - KMovingConfig::~KMovingConfig () { if (standAlone) @@ -833,24 +983,24 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa TQBoxLayout *lay = new TQVBoxLayout (this, 0, KDialog::spacingHint()); windowsBox = new TQButtonGroup(i18n("Windows"), this); - windowsBox->setColumnLayout( 0, Qt::Horizontal ); + windowsBox->setColumnLayout( 0, TQt::Horizontal ); TQBoxLayout *wLay = new TQVBoxLayout (windowsBox->layout(), KDialog::spacingHint()); TQBoxLayout *bLay = new TQVBoxLayout; wLay->addLayout(bLay); - opaque = new TQCheckBox(i18n("Di&splay content in moving windows"), windowsBox); - bLay->addWidget(opaque); - TQWhatsThis::add( opaque, i18n("Enable this option if you want a window's content to be fully shown" - " while moving it, instead of just showing a window 'skeleton'. The result may not be satisfying" - " on slow machines without graphic acceleration.") ); + moveOpaque = new TQCheckBox(i18n("Di&splay content in moving windows"), windowsBox); + bLay->addWidget(moveOpaque); + TQWhatsThis::add(moveOpaque, i18n("Enable this option if you want a window's content to be fully shown" + " while moving it, instead of just showing a window 'skeleton'. The result may not be satisfying" + " on slow machines without graphic acceleration.")); - resizeOpaqueOn = new TQCheckBox(i18n("Display content in &resizing windows"), windowsBox); - bLay->addWidget(resizeOpaqueOn); - TQWhatsThis::add( resizeOpaqueOn, i18n("Enable this option if you want a window's content to be shown" - " while resizing it, instead of just showing a window 'skeleton'. The result may not be satisfying" - " on slow machines.") ); + resizeOpaque = new TQCheckBox(i18n("Display content in &resizing windows"), windowsBox); + bLay->addWidget(resizeOpaque); + TQWhatsThis::add(resizeOpaque, i18n("Enable this option if you want a window's content to be shown" + " while resizing it, instead of just showing a window 'skeleton'. The result may not be satisfying" + " on slow machines.")); geometryTipOn = new TQCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox); bLay->addWidget(geometryTipOn); @@ -860,7 +1010,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa " its size.")); TQGridLayout *rLay = new TQGridLayout(2,3); - bLay->addLayout(TQT_TQLAYOUT(rLay)); + bLay->addLayout(rLay); rLay->setColStretch(0,0); rLay->setColStretch(1,1); @@ -870,22 +1020,22 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa " windows are minimized or restored." ) ); rLay->addWidget(minimizeAnimOn,0,0); - minimizeAnimSlider = new TQSlider(0,10,10,0,Qt::Horizontal, windowsBox); + minimizeAnimSlider = new TQSlider(0,10,10,0,TQt::Horizontal, windowsBox); minimizeAnimSlider->setSteps(1, 1); // TQSlider::Below clashes with a X11/X.h #define #undef Below minimizeAnimSlider->setTickmarks(TQSlider::Below); rLay->addMultiCellWidget(minimizeAnimSlider,0,0,1,2); - connect(minimizeAnimOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setMinimizeAnim(bool))); - connect(minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setMinimizeAnimSpeed(int))); + connect(minimizeAnimOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setMinimizeAnim(bool))); + connect(minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(setMinimizeAnimSpeed(int))); minimizeAnimSlowLabel= new TQLabel(i18n("Slow"),windowsBox); - minimizeAnimSlowLabel->setAlignment(Qt::AlignTop|Qt::AlignLeft); + minimizeAnimSlowLabel->setAlignment(TQt::AlignTop|TQt::AlignLeft); rLay->addWidget(minimizeAnimSlowLabel,1,1); minimizeAnimFastLabel= new TQLabel(i18n("Fast"),windowsBox); - minimizeAnimFastLabel->setAlignment(Qt::AlignTop|Qt::AlignRight); + minimizeAnimFastLabel->setAlignment(TQt::AlignTop|TQt::AlignRight); rLay->addWidget(minimizeAnimFastLabel,1,2); wtstr = i18n("Here you can set the speed of the animation shown when windows are" @@ -900,6 +1050,11 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa " and allows you to move or resize them," " just like for normal windows")); + resetMaximizedWindowGeometry = new TQCheckBox( i18n("Restore size of maximized/tiled windows when moving"), windowsBox); + bLay->addWidget(resetMaximizedWindowGeometry); + TQWhatsThis::add(resetMaximizedWindowGeometry, i18n("If this feature is enabled, dragging a maximized or tiled window" + " will restore the window to its original size.")); + TQBoxLayout *vLay = new TQHBoxLayout(bLay); TQLabel *plcLabel = new TQLabel(i18n("&Placement:"),windowsBox); @@ -935,7 +1090,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa plcLabel->setBuddy(placementCombo); vLay->addWidget(plcLabel, 0); - vLay->addWidget(placementCombo, 1, Qt::AlignLeft); + vLay->addWidget(placementCombo, 1, TQt::AlignLeft); bLay->addSpacing(10); @@ -988,34 +1143,25 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa load(); // Any changes goes to slotChanged() - connect( opaque, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect( resizeOpaqueOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect( geometryTipOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); - connect( minimizeAnimOn, TQT_SIGNAL(clicked() ), TQT_SLOT(changed())); - connect( minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect( moveResizeMaximized, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect( placementCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); - connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotBrdrSnapChanged(int))); - connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotWndwSnapChanged(int))); - connect( OverlapSnap, TQT_SIGNAL(clicked()), TQT_SLOT(changed())); + connect( moveOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect( resizeOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect( geometryTipOn, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); + connect( minimizeAnimOn, TQ_SIGNAL(clicked() ), TQ_SLOT(changed())); + connect( minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect( moveResizeMaximized, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect( resetMaximizedWindowGeometry, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect( placementCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed())); + connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotBrdrSnapChanged(int))); + connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotWndwSnapChanged(int))); + connect( OverlapSnap, TQ_SIGNAL(clicked()), TQ_SLOT(changed())); // To get suffix to BrdrSnap and WndwSnap inputs with default values. slotBrdrSnapChanged(BrdrSnap->value()); slotWndwSnapChanged(WndwSnap->value()); } -int KMovingConfig::getMove() -{ - return (opaque->isChecked())? OPAQUE : TRANSPARENT; -} - -void KMovingConfig::setMove(int trans) -{ - opaque->setChecked(trans == OPAQUE); -} - void KMovingConfig::setGeometryTip(bool showGeometryTip) { geometryTipOn->setChecked(showGeometryTip); @@ -1060,20 +1206,33 @@ void KMovingConfig::setMinimizeAnimSpeed(int speed) minimizeAnimSlider->setValue(speed); } -int KMovingConfig::getResizeOpaque() +int KMovingConfig::getMoveMode() { + return moveOpaque->isChecked() ? OPAQUE : TRANSPARENT; +} + +void KMovingConfig::setMoveMode(int opaque) +{ + moveOpaque->setChecked(opaque == OPAQUE); +} + +int KMovingConfig::getResizeMode() { - return (resizeOpaqueOn->isChecked())? RESIZE_OPAQUE : RESIZE_TRANSPARENT; + return resizeOpaque->isChecked() ? OPAQUE : TRANSPARENT; } -void KMovingConfig::setResizeOpaque(int opaque) +void KMovingConfig::setResizeMode(int opaque) { - resizeOpaqueOn->setChecked(opaque == RESIZE_OPAQUE); + resizeOpaque->setChecked(opaque == OPAQUE); } void KMovingConfig::setMoveResizeMaximized(bool a) { moveResizeMaximized->setChecked(a); } +void KMovingConfig::setResetMaximizedWindowGeometry(bool a) { + resetMaximizedWindowGeometry->setChecked(a); +} + void KMovingConfig::slotBrdrSnapChanged(int value) { BrdrSnap->setSuffix(i18n(" pixel", " pixels", value)); } @@ -1088,11 +1247,18 @@ void KMovingConfig::load( void ) config->setGroup( "Windows" ); - key = config->readEntry(KWIN_MOVE, "Opaque"); - if( key == "Transparent") - setMove(TRANSPARENT); - else if( key == "Opaque") - setMove(OPAQUE); + // DF: please keep the default consistent with twin (options.cpp) + key = config->readEntry(KWIN_MOVE_MODE, "Opaque"); + if (key == "Opaque") + setMoveMode(OPAQUE); + else if (key == "Transparent") + setMoveMode(TRANSPARENT); + + key = config->readEntry(KWIN_RESIZE_MODE, "Opaque"); + if (key == "Opaque") + setResizeMode(OPAQUE); + else if (key == "Transparent") + setResizeMode(TRANSPARENT); //CT 17Jun1998 - variable animation speed from 0 (none!!) to 10 (max) bool anim = config->readBoolEntry(KWIN_MINIMIZE_ANIM, true ); @@ -1102,13 +1268,6 @@ void KMovingConfig::load( void ) setMinimizeAnim( anim ); setMinimizeAnimSpeed( animSpeed ); - // DF: please keep the default consistent with twin (options.cpp line 145) - key = config->readEntry(KWIN_RESIZE_OPAQUE, "Opaque"); - if( key == "Opaque") - setResizeOpaque(RESIZE_OPAQUE); - else if ( key == "Transparent") - setResizeOpaque(RESIZE_TRANSPARENT); - //KS 10Jan2003 - Geometry Tip during window move/resize bool showGeomTip = config->readBoolEntry(KWIN_GEOMETRY, false); setGeometryTip( showGeomTip ); @@ -1149,6 +1308,7 @@ void KMovingConfig::load( void ) // } setMoveResizeMaximized(config->readBoolEntry(KWIN_MOVE_RESIZE_MAXIMIZED, false)); + setResetMaximizedWindowGeometry(config->readBoolEntry(KWIN_RESET_MAX_WIN_GEOM, false)); int v; @@ -1172,16 +1332,22 @@ void KMovingConfig::save( void ) config->setGroup( "Windows" ); - v = getMove(); - if (v == TRANSPARENT) - config->writeEntry(KWIN_MOVE,"Transparent"); + v = getMoveMode(); + if (v == OPAQUE) + config->writeEntry(KWIN_MOVE_MODE, "Opaque"); + else + config->writeEntry(KWIN_MOVE_MODE, "Transparent"); + + v = getResizeMode(); + if (v == OPAQUE) + config->writeEntry(KWIN_RESIZE_MODE, "Opaque"); else - config->writeEntry(KWIN_MOVE,"Opaque"); + config->writeEntry(KWIN_RESIZE_MODE, "Transparent"); config->writeEntry(KWIN_GEOMETRY, getGeometryTip()); // placement policy --- CT 31jan98 --- - v =getPlacement(); + v = getPlacement(); if (v == RANDOM_PLACEMENT) config->writeEntry(KWIN_PLACEMENT, "Random"); else if (v == CASCADE_PLACEMENT) @@ -1205,13 +1371,8 @@ void KMovingConfig::save( void ) config->writeEntry(KWIN_MINIMIZE_ANIM, getMinimizeAnim()); config->writeEntry(KWIN_MINIMIZE_ANIM_SPEED, getMinimizeAnimSpeed()); - v = getResizeOpaque(); - if (v == RESIZE_OPAQUE) - config->writeEntry(KWIN_RESIZE_OPAQUE, "Opaque"); - else - config->writeEntry(KWIN_RESIZE_OPAQUE, "Transparent"); - config->writeEntry(KWIN_MOVE_RESIZE_MAXIMIZED, moveResizeMaximized->isChecked()); + config->writeEntry(KWIN_RESET_MAX_WIN_GEOM, resetMaximizedWindowGeometry->isChecked()); config->writeEntry(KWM_BRDR_SNAP_ZONE,getBorderSnapZone()); @@ -1230,11 +1391,12 @@ void KMovingConfig::save( void ) void KMovingConfig::defaults() { - setMove(OPAQUE); - setResizeOpaque(RESIZE_TRANSPARENT); + setMoveMode(OPAQUE); + setResizeMode(TRANSPARENT); setGeometryTip(false); setPlacement(SMART_PLACEMENT); setMoveResizeMaximized(false); + setResetMaximizedWindowGeometry(false); //copied from kcontrol/konq/twindesktop, aleXXX setWindowSnapZone(KWM_WNDW_SNAP_ZONE_DEFAULT); @@ -1297,12 +1459,12 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, TQWidget *tGroup = new TQWidget(tabW); TQVBoxLayout *vLay = new TQVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint()); vLay->addSpacing(11); // to get the proper gb top offset - + onlyDecoTranslucent = new TQCheckBox(i18n("Apply translucency only to decoration"),tGroup); vLay->addWidget(onlyDecoTranslucent); - + vLay->addSpacing(11); - + TQGridLayout *gLay = new TQGridLayout(vLay,4,2,KDialog::spacingHint()); gLay->setColStretch(1,1); @@ -1440,7 +1602,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, TQLabel *label6 = new TQLabel(i18n("Shadow color:"),sGroup); gLay2->addWidget(label6,7,0); - shadowColor = new KColorButton(Qt::black,sGroup); + shadowColor = new KColorButton(TQt::black,sGroup); gLay2->addWidget(shadowColor,7,1); gLay2->setColStretch(1,1); vLay2->addSpacing(11); @@ -1478,84 +1640,84 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config, lay->addWidget(useTranslucency); lay->addWidget(tabW); - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), tabW, TQT_SLOT(setEnabled(bool))); - - connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), activeWindowOpacity, TQT_SLOT(setEnabled(bool))); - connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQT_SLOT(setEnabled(bool))); - connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), movingWindowOpacity, TQT_SLOT(setEnabled(bool))); - connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), dockWindowOpacity, TQT_SLOT(setEnabled(bool))); - - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(onlyDecoTranslucent, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(keepAboveAsActive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), blurBackground, TQT_SLOT(setEnabled(bool))); - connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), greyscaleBackground, TQT_SLOT(setEnabled(bool))); - connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(removeShadowsOnResize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(removeShadowsOnMove, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - - connect(activeWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(inactiveWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(movingWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(dockWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(dockWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(menuWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(activeWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(changed())); - connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed())); - connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed())); - - connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); - connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); - connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); - connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts())); + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), tabW, TQ_SLOT(setEnabled(bool))); + + connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), activeWindowOpacity, TQ_SLOT(setEnabled(bool))); + connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQ_SLOT(setEnabled(bool))); + connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), movingWindowOpacity, TQ_SLOT(setEnabled(bool))); + connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), dockWindowOpacity, TQ_SLOT(setEnabled(bool))); + + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(onlyDecoTranslucent, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(keepAboveAsActive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), blurBackground, TQ_SLOT(setEnabled(bool))); + connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), greyscaleBackground, TQ_SLOT(setEnabled(bool))); + connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(removeShadowsOnResize, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(removeShadowsOnMove, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + + connect(activeWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(inactiveWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(movingWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(dockWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(dockWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(menuWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(activeWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(changed())); + connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed())); + connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed())); + + connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); + connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); + connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); + connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts())); load(); tabW->setEnabled(useTranslucency->isChecked()); - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showWarning(bool))); + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(showWarning(bool))); // handle kompmgr restarts if necessary - connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(resetKompmgr())); - connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr())); - connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); - connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr())); + connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(resetKompmgr())); + connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr())); + connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); + connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr())); } } @@ -1642,7 +1804,7 @@ void KTranslucencyConfig::load( void ) r = g = b = 256; if (sscanf(hex.latin1(), "0x%02x%02x%02x", &r, &g, &b)!=3 || r > 255 || g > 255 || b > 255) - shadowColor->setColor(Qt::black); + shadowColor->setColor(TQt::black); else shadowColor->setColor(TQColor(r,g,b)); @@ -1850,7 +2012,7 @@ void KTranslucencyConfig::defaults() useShadowsOnDockWindows->setChecked(FALSE); removeShadowsOnMove->setChecked(FALSE); removeShadowsOnResize->setChecked(FALSE); - shadowColor->setColor(Qt::black); + shadowColor->setColor(TQt::black); fadeInWindows->setChecked(FALSE); fadeInMenuWindows->setChecked(TRUE); fadeInToolTipWindows->setChecked(TRUE); diff --git a/twin/kcmtwin/twinoptions/windows.h b/twin/kcmtwin/twinoptions/windows.h index d4d358e9a..80c9e76d7 100644 --- a/twin/kcmtwin/twinoptions/windows.h +++ b/twin/kcmtwin/twinoptions/windows.h @@ -50,9 +50,6 @@ class KIntNumInput; #define TITLEBAR_PLAIN 0 #define TITLEBAR_SHADED 1 -#define RESIZE_TRANSPARENT 0 -#define RESIZE_OPAQUE 1 - #define SMART_PLACEMENT 0 #define MAXIMIZING_PLACEMENT 1 #define CASCADE_PLACEMENT 2 @@ -68,10 +65,11 @@ class KIntNumInput; #define FOCUS_STRICTLY_UNDER_MOUSE 3 class TQSpinBox; +class TQHBox; class KFocusConfig : public TDECModule { - Q_OBJECT + TQ_OBJECT public: KFocusConfig( bool _standAlone, TDEConfig *_config, TQWidget *parent=0, const char* name=0 ); ~KFocusConfig(); @@ -88,7 +86,7 @@ private slots: void clickRaiseOnTog(bool); void updateAltTabMode(); void updateActiveMouseScreen(); - void changed() { emit TDECModule::changed(true); } + void changed() { emit TDECModule::changed(true); } private: @@ -134,7 +132,7 @@ private: class KMovingConfig : public TDECModule { - Q_OBJECT + TQ_OBJECT public: KMovingConfig( bool _standAlone, TDEConfig *config, TQWidget *parent=0, const char* name=0 ); ~KMovingConfig(); @@ -146,32 +144,34 @@ public: private slots: void setMinimizeAnim( bool ); void setMinimizeAnimSpeed( int ); - void changed() { emit TDECModule::changed(true); } + void changed() { emit TDECModule::changed(true); } void slotBrdrSnapChanged( int ); void slotWndwSnapChanged( int ); private: - int getMove( void ); + int getMoveMode( void ); + int getResizeMode ( void ); bool getMinimizeAnim( void ); - int getMinimizeAnimSpeed( void ); - int getResizeOpaque ( void ); + int getMinimizeAnimSpeed( void ); bool getGeometryTip( void ); //KS - int getPlacement( void ); //CT + int getPlacement( void ); //CT - void setMove(int); - void setResizeOpaque(int); + void setMoveMode(int); + void setResizeMode(int); void setGeometryTip(bool); //KS void setPlacement(int); //CT void setMoveResizeMaximized(bool); + void setResetMaximizedWindowGeometry(bool); TQButtonGroup *windowsBox; - TQCheckBox *opaque; - TQCheckBox *resizeOpaqueOn; + TQCheckBox *moveOpaque; + TQCheckBox *resizeOpaque; TQCheckBox *geometryTipOn; - TQCheckBox* minimizeAnimOn; + TQCheckBox *minimizeAnimOn; TQSlider *minimizeAnimSlider; TQLabel *minimizeAnimSlowLabel, *minimizeAnimFastLabel; TQCheckBox *moveResizeMaximized; + TQCheckBox *resetMaximizedWindowGeometry; TQComboBox *placementCombo; @@ -189,9 +189,54 @@ private: }; +class KActiveBorderConfig : public TDECModule +{ + TQ_OBJECT + public: + KActiveBorderConfig(bool _standAlone, TDEConfig *config, TQWidget *parent=0, const char *name = 0); + ~KActiveBorderConfig(); + + void load(); + void save(); + void defaults(); + + private slots: + // copied from kcontrol/konq/twindesktop, aleXXX + // original name: setEBorders() + void updateActiveBorders(); + + void changed() { emit TDECModule::changed(true); } + + private: + int getActiveBorders(); + int getActiveBorderDelay(); + int getActiveBorderDistance(); + int getTilingMode(); + + void setActiveBorders(int); + void setActiveBorderDelay(int); + void setActiveBorderDistance(int); + void setTilingMode(int); + + TQButtonGroup *active_box; + TQRadioButton *active_disable; + TQRadioButton *active_desktop; + TQCheckBox *active_move; + TQRadioButton *active_tile; + TQCheckBox *active_maximize; + KIntNumInput *delays; + KIntNumInput *distance; + TQWidget *active_desktop_conf; + TQWidget *active_tile_conf; + TQCheckBox *tilingOpaque; + + TDEConfig *config; + bool standAlone; +}; + class KAdvancedConfig : public TDECModule { - Q_OBJECT + TQ_OBJECT public: KAdvancedConfig( bool _standAlone, TDEConfig *config, TQWidget *parent=0, const char* name=0 ); ~KAdvancedConfig(); @@ -203,9 +248,6 @@ public: private slots: void shadeHoverChanged(bool); - //copied from kcontrol/konq/twindesktop, aleXXX - void setEBorders(); - void changed() { emit TDECModule::changed(true); } private: @@ -223,17 +265,6 @@ private: TDEConfig *config; bool standAlone; - int getElectricBorders( void ); - int getElectricBorderDelay(); - void setElectricBorders( int ); - void setElectricBorderDelay( int ); - - TQVButtonGroup *electricBox; - TQRadioButton *active_disable; - TQRadioButton *active_move; - TQRadioButton *active_always; - KIntNumInput *delays; - void setHideUtilityWindowsForInactive( bool ); TQCheckBox* hideUtilityWindowsForInactive; @@ -242,15 +273,15 @@ private: class TDEProcess; class KTranslucencyConfig : public TDECModule { - Q_OBJECT + TQ_OBJECT public: KTranslucencyConfig( bool _standAlone, TDEConfig *config, TQWidget *parent=0, const char* name=0 ); ~KTranslucencyConfig(); - + void load(); void save(); void defaults(); - + private: TQCheckBox *useTranslucency; TQCheckBox *activeWindowTransparency; diff --git a/twin/kcmtwin/twinrules/detectwidget.cpp b/twin/kcmtwin/twinrules/detectwidget.cpp index f450938bc..b01066403 100644 --- a/twin/kcmtwin/twinrules/detectwidget.cpp +++ b/twin/kcmtwin/twinrules/detectwidget.cpp @@ -164,19 +164,19 @@ void DetectDialog::selectWindow() grabber = new TQDialog( NULL, NULL, true, (WFlags)WX11BypassWM ); grabber->move( -1000, -1000 ); grabber->show(); - grabber->grabMouse( tqcrossCursor ); + grabber->grabMouse( TQt::crossCursor ); grabber->installEventFilter( this ); } bool DetectDialog::eventFilter( TQObject* o, TQEvent* e ) { - if( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(grabber) ) + if( o != grabber ) return false; if( e->type() != TQEvent::MouseButtonRelease ) return false; delete grabber; grabber = NULL; - if( TQT_TQMOUSEEVENT( e )->button() != Qt::LeftButton ) + if( static_cast<TQMouseEvent*>( e )->button() != TQt::LeftButton ) { emit detectionDone( false ); return true; diff --git a/twin/kcmtwin/twinrules/detectwidget.h b/twin/kcmtwin/twinrules/detectwidget.h index 75e725f5f..ecd608ea7 100644 --- a/twin/kcmtwin/twinrules/detectwidget.h +++ b/twin/kcmtwin/twinrules/detectwidget.h @@ -33,7 +33,7 @@ namespace KWinInternal class DetectWidget : public DetectWidgetBase { - Q_OBJECT + TQ_OBJECT public: DetectWidget( TQWidget* parent = NULL, const char* name = NULL ); }; @@ -41,7 +41,7 @@ class DetectWidget class DetectDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: DetectDialog( TQWidget* parent = NULL, const char* name = NULL ); void detect( WId window ); diff --git a/twin/kcmtwin/twinrules/editshortcutbase.ui b/twin/kcmtwin/twinrules/editshortcutbase.ui index 793784c42..8a9339c16 100644 --- a/twin/kcmtwin/twinrules/editshortcutbase.ui +++ b/twin/kcmtwin/twinrules/editshortcutbase.ui @@ -155,10 +155,10 @@ For example "<b>Shift+Alt+(123) Shift+Ctrl+(ABC)</b>" will first try <slot>clearShortcut()</slot> </connection> </connections> -<Q_SLOTS> +<slots> <slot access="protected" specifier="pure virtual">editShortcut()</slot> <slot access="protected" specifier="pure virtual">clearShortcut()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includes> diff --git a/twin/kcmtwin/twinrules/kcm.cpp b/twin/kcmtwin/twinrules/kcm.cpp index 2f28bc5dd..e2a75ee62 100644 --- a/twin/kcmtwin/twinrules/kcm.cpp +++ b/twin/kcmtwin/twinrules/kcm.cpp @@ -28,7 +28,7 @@ #include "ruleslist.h" extern "C" - KDE_EXPORT TDECModule *create_twinrules( TQWidget *parent, const char *name ) + TDE_EXPORT TDECModule *create_twinrules( TQWidget *parent, const char *name ) { //CT there's need for decision: kwm or twin? TDEGlobal::locale()->insertCatalogue( "kcmtwinrules" ); @@ -44,8 +44,8 @@ KCMRules::KCMRules( TQWidget *parent, const char *name ) { TQVBoxLayout *layout = new TQVBoxLayout( this ); widget = new KCMRulesList( this ); - layout->addWidget( TQT_TQWIDGET(widget) ); - connect( widget, TQT_SIGNAL( changed( bool )), TQT_SLOT( moduleChanged( bool ))); + layout->addWidget( widget ); + connect( widget, TQ_SIGNAL( changed( bool )), TQ_SLOT( moduleChanged( bool ))); TDEAboutData *about = new TDEAboutData(I18N_NOOP( "kcmtwinrules" ), I18N_NOOP( "Window-Specific Settings Configuration Module" ), 0, 0, TDEAboutData::License_GPL, I18N_NOOP( "(c) 2004 KWin and KControl Authors" )); diff --git a/twin/kcmtwin/twinrules/kcm.h b/twin/kcmtwin/twinrules/kcm.h index 5e89a7773..54e044845 100644 --- a/twin/kcmtwin/twinrules/kcm.h +++ b/twin/kcmtwin/twinrules/kcm.h @@ -34,7 +34,7 @@ class KCMRulesList; class KCMRules : public TDECModule { - Q_OBJECT + TQ_OBJECT public: KCMRules( TQWidget *parent, const char *name ); virtual void load(); diff --git a/twin/kcmtwin/twinrules/main.cpp b/twin/kcmtwin/twinrules/main.cpp index 21cb007ec..67e21332c 100644 --- a/twin/kcmtwin/twinrules/main.cpp +++ b/twin/kcmtwin/twinrules/main.cpp @@ -273,7 +273,7 @@ static const TDECmdLineOptions options[] = }; extern "C" -KDE_EXPORT int kdemain( int argc, char* argv[] ) +TDE_EXPORT int kdemain( int argc, char* argv[] ) { TDELocale::setMainCatalogue( "kcmtwinrules" ); TDECmdLineArgs::init( argc, argv, "twin_rules_dialog", I18N_NOOP( "TWin" ), diff --git a/twin/kcmtwin/twinrules/ruleslist.cpp b/twin/kcmtwin/twinrules/ruleslist.cpp index 8961874ae..a9238c178 100644 --- a/twin/kcmtwin/twinrules/ruleslist.cpp +++ b/twin/kcmtwin/twinrules/ruleslist.cpp @@ -33,22 +33,22 @@ KCMRulesList::KCMRulesList( TQWidget* parent, const char* name ) : KCMRulesListBase( parent, name ) { // connect both current/selected, so that current==selected (stupid TQListBox :( ) - connect( rules_listbox, TQT_SIGNAL( currentChanged( TQListBoxItem* )), - TQT_SLOT( activeChanged( TQListBoxItem*))); - connect( rules_listbox, TQT_SIGNAL( selectionChanged( TQListBoxItem* )), - TQT_SLOT( activeChanged( TQListBoxItem*))); - connect( new_button, TQT_SIGNAL( clicked()), - TQT_SLOT( newClicked())); - connect( modify_button, TQT_SIGNAL( clicked()), - TQT_SLOT( modifyClicked())); - connect( delete_button, TQT_SIGNAL( clicked()), - TQT_SLOT( deleteClicked())); - connect( moveup_button, TQT_SIGNAL( clicked()), - TQT_SLOT( moveupClicked())); - connect( movedown_button, TQT_SIGNAL( clicked()), - TQT_SLOT( movedownClicked())); - connect( rules_listbox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), - TQT_SLOT( modifyClicked())); + connect( rules_listbox, TQ_SIGNAL( currentChanged( TQListBoxItem* )), + TQ_SLOT( activeChanged( TQListBoxItem*))); + connect( rules_listbox, TQ_SIGNAL( selectionChanged( TQListBoxItem* )), + TQ_SLOT( activeChanged( TQListBoxItem*))); + connect( new_button, TQ_SIGNAL( clicked()), + TQ_SLOT( newClicked())); + connect( modify_button, TQ_SIGNAL( clicked()), + TQ_SLOT( modifyClicked())); + connect( delete_button, TQ_SIGNAL( clicked()), + TQ_SLOT( deleteClicked())); + connect( moveup_button, TQ_SIGNAL( clicked()), + TQ_SLOT( moveupClicked())); + connect( movedown_button, TQ_SIGNAL( clicked()), + TQ_SLOT( movedownClicked())); + connect( rules_listbox, TQ_SIGNAL( doubleClicked ( TQListBoxItem * ) ), + TQ_SLOT( modifyClicked())); load(); } diff --git a/twin/kcmtwin/twinrules/ruleslist.h b/twin/kcmtwin/twinrules/ruleslist.h index f7e7fb541..837ad6840 100644 --- a/twin/kcmtwin/twinrules/ruleslist.h +++ b/twin/kcmtwin/twinrules/ruleslist.h @@ -34,7 +34,7 @@ namespace KWinInternal class KCMRulesList : public KCMRulesListBase { - Q_OBJECT + TQ_OBJECT public: KCMRulesList( TQWidget* parent = NULL, const char* name = NULL ); virtual ~KCMRulesList(); diff --git a/twin/kcmtwin/twinrules/ruleslistbase.ui b/twin/kcmtwin/twinrules/ruleslistbase.ui index f079dcda3..233290e38 100644 --- a/twin/kcmtwin/twinrules/ruleslistbase.ui +++ b/twin/kcmtwin/twinrules/ruleslistbase.ui @@ -29,7 +29,7 @@ <cstring>new_button</cstring> </property> <property name="text"> - <string>&New...</string> + <string>&New…</string> </property> </widget> <widget class="KPushButton" row="1" column="1"> @@ -37,7 +37,7 @@ <cstring>modify_button</cstring> </property> <property name="text"> - <string>&Modify...</string> + <string>&Modify…</string> </property> </widget> <widget class="KPushButton" row="2" column="1"> @@ -47,9 +47,6 @@ <property name="text"> <string>Delete</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <widget class="KPushButton" row="3" column="1"> <property name="name"> diff --git a/twin/kcmtwin/twinrules/ruleswidget.cpp b/twin/kcmtwin/twinrules/ruleswidget.cpp index 334001bf7..116ac8b41 100644 --- a/twin/kcmtwin/twinrules/ruleswidget.cpp +++ b/twin/kcmtwin/twinrules/ruleswidget.cpp @@ -41,9 +41,9 @@ namespace KWinInternal { #define SETUP( var, type ) \ - connect( enable_##var, TQT_SIGNAL( toggled( bool )), rule_##var, TQT_SLOT( setEnabled( bool ))); \ - connect( enable_##var, TQT_SIGNAL( toggled( bool )), this, TQT_SLOT( updateEnable##var())); \ - connect( rule_##var, TQT_SIGNAL( activated( int )), this, TQT_SLOT( updateEnable##var())); \ + connect( enable_##var, TQ_SIGNAL( toggled( bool )), rule_##var, TQ_SLOT( setEnabled( bool ))); \ + connect( enable_##var, TQ_SIGNAL( toggled( bool )), this, TQ_SLOT( updateEnable##var())); \ + connect( rule_##var, TQ_SIGNAL( activated( int )), this, TQ_SLOT( updateEnable##var())); \ TQWhatsThis::add( enable_##var, enableDesc ); \ TQWhatsThis::add( rule_##var, type##RuleDesc ); @@ -550,7 +550,7 @@ void RulesWidget::detectClicked() { assert( detect_dlg == NULL ); detect_dlg = new DetectDialog; - connect( detect_dlg, TQT_SIGNAL( detectionDone( bool )), this, TQT_SLOT( detected( bool ))); + connect( detect_dlg, TQ_SIGNAL( detectionDone( bool )), this, TQ_SLOT( detected( bool ))); detect_dlg->detect( 0 ); } @@ -702,7 +702,7 @@ Rules* RulesDialog::edit( Rules* r, WId window, bool show_hints ) if( window != 0 ) widget->prepareWindowSpecific( window ); if( show_hints ) - TQTimer::singleShot( 0, this, TQT_SLOT( displayHints())); + TQTimer::singleShot( 0, this, TQ_SLOT( displayHints())); exec(); return rules; } diff --git a/twin/kcmtwin/twinrules/ruleswidget.h b/twin/kcmtwin/twinrules/ruleswidget.h index 4d22e1826..4c4ef4be0 100644 --- a/twin/kcmtwin/twinrules/ruleswidget.h +++ b/twin/kcmtwin/twinrules/ruleswidget.h @@ -36,7 +36,7 @@ class DetectDialog; class RulesWidget : public RulesWidgetBase { - Q_OBJECT + TQ_OBJECT public: RulesWidget( TQWidget* parent = NULL, const char* name = NULL ); void setRules( Rules* r ); @@ -97,7 +97,7 @@ class RulesWidget class RulesDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: RulesDialog( TQWidget* parent = NULL, const char* name = NULL ); Rules* edit( Rules* r, WId window, bool show_hints ); @@ -113,7 +113,7 @@ class RulesDialog class EditShortcut : public EditShortcutBase { - Q_OBJECT + TQ_OBJECT public: EditShortcut( TQWidget* parent = NULL, const char* name = NULL ); protected: @@ -124,7 +124,7 @@ class EditShortcut class EditShortcutDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: EditShortcutDialog( TQWidget* parent = NULL, const char* name = NULL ); void setShortcut( const TQString& cut ); @@ -137,7 +137,7 @@ class EditShortcutDialog class ShortcutDialog : public TDEShortcutDialog { - Q_OBJECT + TQ_OBJECT public: ShortcutDialog( const TDEShortcut& cut, TQWidget* parent = NULL, const char* name = NULL ); virtual void accept(); diff --git a/twin/kcmtwin/twinrules/ruleswidgetbase.ui b/twin/kcmtwin/twinrules/ruleswidgetbase.ui index 21486c4be..356a99676 100644 --- a/twin/kcmtwin/twinrules/ruleswidgetbase.ui +++ b/twin/kcmtwin/twinrules/ruleswidgetbase.ui @@ -216,9 +216,6 @@ <property name="text"> <string>Edit</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <spacer row="4" column="3" rowspan="1" colspan="2"> <property name="name"> @@ -487,9 +484,6 @@ <property name="text"> <string>Edit</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <spacer row="4" column="3"> <property name="name"> @@ -560,9 +554,6 @@ <property name="text"> <string>Edit</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <spacer row="7" column="3"> <property name="name"> @@ -633,9 +624,6 @@ <property name="text"> <string>Edit</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <spacer row="10" column="3"> <property name="name"> @@ -1869,9 +1857,6 @@ <property name="text"> <string>Shortcut</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <widget class="KComboBox" row="9" column="1"> <item> @@ -1916,7 +1901,7 @@ <cstring>shortcut_edit</cstring> </property> <property name="text"> - <string>Edit...</string> + <string>Edit…</string> </property> </widget> <widget class="KRestrictedLine" row="9" column="2" rowspan="1" colspan="3"> @@ -2292,9 +2277,6 @@ <property name="text"> <string>Strictly obey geometry</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <widget class="KComboBox" row="6" column="1"> <item> @@ -2348,9 +2330,6 @@ <property name="text"> <string>Block global shortcuts</string> </property> - <property name="accel"> - <string></string> - </property> </widget> <widget class="KComboBox" row="7" column="1"> <item> @@ -2530,7 +2509,7 @@ <tabstop>rule_disableglobalshortcuts</tabstop> <tabstop>disableglobalshortcuts</tabstop> </tabstops> -<Q_SLOTS> +<slots> <slot access="protected" specifier="pure virtual">detectClicked()</slot> <slot access="protected" specifier="pure virtual">wmclassMatchChanged()</slot> <slot access="protected" specifier="pure virtual">roleMatchChanged()</slot> @@ -2538,7 +2517,7 @@ <slot access="protected" specifier="pure virtual">extraMatchChanged()</slot> <slot access="protected" specifier="pure virtual">machineMatchChanged()</slot> <slot access="protected" specifier="pure virtual">shortcutEditClicked()</slot> -</Q_SLOTS> +</slots> <layoutdefaults spacing="6" margin="11"/> <layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> <includes> @@ -2546,8 +2525,6 @@ <include location="global" impldecl="in implementation">klineedit.h</include> <include location="global" impldecl="in implementation">kpushbutton.h</include> <include location="global" impldecl="in implementation">krestrictedline.h</include> + <include location="global" impldecl="in implementation">tdelistbox.h</include> </includes> -<includehints> - <includehint>tdelistbox.h</includehint> -</includehints> </UI> |