From 9bb648da59d105afff24db2258ef302553f00bf5 Mon Sep 17 00:00:00 2001 From: Tobias Koenig Date: Tue, 13 Jun 2006 17:41:00 +0000 Subject: [PATCH] Ported to new KDialog/KPageWidget/KPageDialog svn path=/trunk/KDE/kdebase/workspace/; revision=551107 --- kcmkwin/kwinrules/detectwidget.cpp | 8 ++++++-- kcmkwin/kwinrules/detectwidget.h | 4 ++-- kcmkwin/kwinrules/ruleswidget.cpp | 24 +++++++++++++++++------- kcmkwin/kwinrules/ruleswidget.h | 6 +++--- 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/kcmkwin/kwinrules/detectwidget.cpp b/kcmkwin/kwinrules/detectwidget.cpp index e4582003a8..157c544a4a 100644 --- a/kcmkwin/kwinrules/detectwidget.cpp +++ b/kcmkwin/kwinrules/detectwidget.cpp @@ -46,9 +46,13 @@ DetectWidget::DetectWidget( QWidget* parent, const char* name ) } DetectDialog::DetectDialog( QWidget* parent, const char* name ) -: KDialogBase( Swallow, 0, parent, name, true, "", Ok | Cancel ) -, grabber( NULL ) + : KDialog( parent ), + grabber( NULL ) { + setObjectName( name ); + setModal( true ); + setButtons( Ok | Cancel ); + widget = new DetectWidget( this ); setMainWidget( widget ); } diff --git a/kcmkwin/kwinrules/detectwidget.h b/kcmkwin/kwinrules/detectwidget.h index 8110294bcb..27e121587b 100644 --- a/kcmkwin/kwinrules/detectwidget.h +++ b/kcmkwin/kwinrules/detectwidget.h @@ -22,7 +22,7 @@ #include "detectwidgetbase.h" -#include +#include #include #include "../../rules.h" @@ -42,7 +42,7 @@ class DetectWidget }; class DetectDialog - : public KDialogBase + : public KDialog { Q_OBJECT public: diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index d4c8c9a14f..d07184d414 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -687,10 +687,15 @@ void RulesWidget::shortcutEditClicked() } RulesDialog::RulesDialog( QWidget* parent, const char* name ) -: KDialogBase( Swallow, 0, parent, name, true, i18n( "Edit Window-Specific Settings" ), Ok | Cancel ) + : KDialog( parent ) { - widget = new RulesWidget( this ); - setMainWidget( widget ); + setObjectName( name ); + setModal( true ); + setCaption( i18n( "Edit Window-Specific Settings" ) ); + setButtons( Ok | Cancel ); + + widget = new RulesWidget( this ); + setMainWidget( widget ); } // window is set only for Alt+F3/Window-specific settings, because the dialog @@ -725,7 +730,7 @@ void RulesDialog::accept() if( !widget->finalCheck()) return; rules = widget->rules(); - KDialogBase::accept(); + KDialog::accept(); } EditShortcut::EditShortcut( QWidget* parent ) @@ -746,10 +751,15 @@ void EditShortcut::clearShortcut() } EditShortcutDialog::EditShortcutDialog( QWidget* parent, const char* name ) -: KDialogBase( Swallow, 0, parent, name, true, i18n( "Edit Shortcut" ), Ok | Cancel ) +: KDialog( parent ) { - widget = new EditShortcut( this ); - setMainWidget( widget ); + setObjectName( name ); + setModal( true ); + setCaption( i18n( "Edit Shortcut" ) ); + setButtons( Ok | Cancel ); + + widget = new EditShortcut( this ); + setMainWidget( widget ); } void EditShortcutDialog::setShortcut( const QString& cut ) diff --git a/kcmkwin/kwinrules/ruleswidget.h b/kcmkwin/kwinrules/ruleswidget.h index bcf3f022f4..8f30b47b03 100644 --- a/kcmkwin/kwinrules/ruleswidget.h +++ b/kcmkwin/kwinrules/ruleswidget.h @@ -20,7 +20,7 @@ #ifndef __RULESWIDGET_H__ #define __RULESWIDGET_H__ -#include +#include #include #include @@ -95,7 +95,7 @@ class RulesWidget }; class RulesDialog - : public KDialogBase + : public KDialog { Q_OBJECT public: @@ -122,7 +122,7 @@ class EditShortcut }; class EditShortcutDialog - : public KDialogBase + : public KDialog { Q_OBJECT public: