Kdialogbase->kdialog

svn path=/trunk/KDE/kdepim/; revision=555161
wilder-work
Laurent Montel 20 years ago
parent bdca8c0417
commit 6fc13ccf1b
  1. 11
      distributionlistdialog.cpp
  2. 4
      distributionlistdialog.h
  3. 13
      kmcomposewin.cpp
  4. 12
      kmfolderdia.cpp
  5. 39
      kmmsgpartdlg.cpp
  6. 4
      kmmsgpartdlg.h
  7. 25
      managesievescriptsdialog.cpp
  8. 4
      managesievescriptsdialog.h
  9. 4
      managesievescriptsdialog_p.h
  10. 20
      vacationdialog.cpp
  11. 6
      vacationdialog.h

@ -93,10 +93,15 @@ class DistributionListItem : public Q3CheckListItem
DistributionListDialog::DistributionListDialog( QWidget *parent )
: KDialogBase( Plain, i18n("Save Distribution List"), User1 | Cancel,
User1, parent, 0, false, false, i18n("Save List") )
: KDialog( parent )
{
QFrame *topFrame = plainPage();
QFrame *topFrame = new QFrame( this );
setMainWidget( topFrame );
setCaption( i18n("Save Distribution List") );
setButtons( User1 | Cancel );
setDefaultButton( User1 );
setModal( false );
setButtonText( User1, i18n("Save List") );
QBoxLayout *topLayout = new QVBoxLayout( topFrame );
topLayout->setSpacing( spacingHint() );

@ -21,14 +21,14 @@
#ifndef DISTRIBUTIONLISTDIALOG_H
#define DISTRIBUTIONLISTDIALOG_H
#include <kdialogbase.h>
#include <kdialog.h>
#include "recipientseditor.h"
class QLineEdit;
class K3ListView;
class DistributionListDialog : public KDialogBase
class DistributionListDialog : public KDialog
{
public:
DistributionListDialog( QWidget *parent );

@ -863,8 +863,8 @@ void KMComposeWin::rethinkFields(bool fromSlot)
delete mGrid;
mGrid = new QGridLayout(mMainWidget);
mGrid->setSpacing(KDialogBase::spacingHint());
mGrid->setMargin(KDialogBase::marginHint()/2);
mGrid->setSpacing(KDialog::spacingHint());
mGrid->setMargin(KDialog::marginHint()/2);
mGrid->setColumnStretch(0, 1);
mGrid->setColumnStretch(1, 100);
mGrid->setColumnStretch(2, 1);
@ -4359,9 +4359,12 @@ void KMComposeWin::slotIdentityChanged( uint uoid )
//-----------------------------------------------------------------------------
void KMComposeWin::slotSpellcheckConfig()
{
KDialogBase dlg(KDialogBase::Plain, i18n("Spellchecker"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok,
this, 0, true, true );
KDialog dlg(this);
dlg.setCaption( i18n("Spellchecker") );
dlg.setButtons( KDialog::Ok|KDialog::Cancel );
dlg.setDefaultButton( KDialog::Ok );
dlg.setModal( true );
dlg.enableButtonSeparator( true );
KWin kwin;
Q3TabDialog qtd (this, "tabdialog", true);
KSpellConfig mKSpellConfig (&qtd);

@ -159,14 +159,16 @@ void KMFolderDialog::addTab( FolderDiaTab* tab )
void KMFolderDialog::slotApply()
{
if ( mFolder.isNull() && !mIsNewFolder ) { // deleted meanwhile?
KDialogBase::slotApply();
//KDialog::slotApply();
#warning "kde4: port it 'slotApply'"
return;
}
for ( int i = 0 ; i < mTabs.count() ; ++i )
mTabs[i]->save();
if ( !mFolder.isNull() && mIsNewFolder ) // we just created it
mIsNewFolder = false; // so it's not new anymore :)
KDialogBase::slotApply();
#warning "kde4: port it slotApply"
//KDialogBase::slotApply();
}
// Called when pressing Ok
@ -175,7 +177,7 @@ void KMFolderDialog::slotApply()
void KMFolderDialog::slotOk()
{
if ( mFolder.isNull() && !mIsNewFolder ) { // deleted meanwhile?
KDialogBase::slotOk();
KDialog::accept();
return;
}
@ -193,14 +195,14 @@ void KMFolderDialog::slotOk()
if ( mDelayedSavingTabs )
enableButtonOk( false );
else
KDialogBase::slotOk();
KDialog::accept();
}
void KMFolderDialog::slotReadyForAccept()
{
--mDelayedSavingTabs;
if ( mDelayedSavingTabs == 0 )
KDialogBase::slotOk();
KDialog::accept();
}
void KMFolderDialog::slotCancelAccept()

@ -49,10 +49,14 @@ static const int numEncodingTypes =
KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
QWidget * parent, const char * name )
: KDialogBase( Plain,
caption.isEmpty() ? i18n("Message Part Properties") : caption,
Ok|Cancel|Help, Ok, parent, name, true, true)
: KDialog( parent )
{
setCaption( caption.isEmpty() ? i18n("Message Part Properties") : caption );
setButtons( Ok|Cancel|Help );
setDefaultButton( Ok );
setModal( true );
enableButtonSeparator( true );
// tmp vars:
QGridLayout * glay;
QLabel * label;
@ -62,19 +66,20 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
for ( int i = 0 ; i < numEncodingTypes ; ++i )
mI18nizedEncodings << i18n( encodingTypes[i].displayName );
glay = new QGridLayout( plainPage() );
QFrame *frame = new QFrame( this );
setMainWidget( frame );
glay = new QGridLayout(frame );
glay->setSpacing( spacingHint() );
glay->setColumnStretch( 1, 1 );
glay->setRowStretch( 8, 1 );
// mimetype icon:
mIcon = new QLabel( plainPage() );
mIcon = new QLabel( frame );
mIcon->setPixmap( DesktopIcon("unknown") );
glay->addWidget( mIcon, 0, 0, 2, 1);
// row 0: Type combobox:
mMimeType = new KComboBox( true, plainPage() );
mMimeType = new KComboBox( true, frame );
mMimeType->setInsertPolicy( QComboBox::NoInsert );
mMimeType->setValidator( new KMimeTypeValidator( mMimeType ) );
mMimeType->addItems( QStringList()
@ -98,7 +103,7 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
mMimeType->setWhatsThis( msg );
// row 1: Size label:
mSize = new QLabel( plainPage() );
mSize = new QLabel( frame );
setSize( KIO::filesize_t(0) );
glay->addWidget( mSize, 1, 1 );
@ -111,8 +116,8 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
mSize->setWhatsThis( msg );
// row 2: "Name" lineedit and label:
mFileName = new KLineEdit( plainPage() );
label = new QLabel( i18n("&Name:"), plainPage() );
mFileName = new KLineEdit( frame );
label = new QLabel( i18n("&Name:"), frame );
label->setBuddy( mFileName );
glay->addWidget( label, 2, 0 );
glay->addWidget( mFileName, 2, 1 );
@ -126,8 +131,8 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
mFileName->setWhatsThis( msg );
// row 3: "Description" lineedit and label:
mDescription = new KLineEdit( plainPage() );
label = new QLabel( i18n("&Description:"), plainPage() );
mDescription = new KLineEdit( frame );
label = new QLabel( i18n("&Description:"), frame );
label->setBuddy( mDescription );
glay->addWidget( label, 3, 0 );
glay->addWidget( mDescription, 3, 1 );
@ -141,10 +146,10 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
mDescription->setWhatsThis( msg );
// row 4: "Encoding" combobox and label:
mEncoding = new QComboBox( plainPage() );
mEncoding = new QComboBox( frame );
mEncoding->setEditable( false );
mEncoding->addItems( mI18nizedEncodings );
label = new QLabel( i18n("&Encoding:"), plainPage() );
label = new QLabel( i18n("&Encoding:"), frame );
label->setBuddy( mEncoding );
glay->addWidget( label, 4, 0 );
glay->addWidget( mEncoding, 4, 1 );
@ -162,7 +167,7 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
mEncoding->setWhatsThis( msg );
// row 5: "Suggest automatic display..." checkbox:
mInline = new QCheckBox( i18n("Suggest &automatic display"), plainPage() );
mInline = new QCheckBox( i18n("Suggest &automatic display"), frame );
glay->addWidget( mInline, 5, 0, 1, 2 );
msg = i18n("<qt><p>Check this option if you want to suggest to the "
@ -174,7 +179,7 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
mInline->setWhatsThis( msg );
// row 6: "Sign" checkbox:
mSigned = new QCheckBox( i18n("&Sign this part"), plainPage() );
mSigned = new QCheckBox( i18n("&Sign this part"), frame );
glay->addWidget( mSigned, 6, 0, 1, 2 );
msg = i18n("<qt><p>Check this option if you want this message part to be "
@ -184,7 +189,7 @@ KMMsgPartDialog::KMMsgPartDialog( const QString & caption,
mSigned->setWhatsThis( msg );
// row 7: "Encrypt" checkbox:
mEncrypted = new QCheckBox( i18n("Encr&ypt this part"), plainPage() );
mEncrypted = new QCheckBox( i18n("Encr&ypt this part"), frame );
glay->addWidget( mEncrypted, 7, 0, 1, 2 );
msg = i18n("<qt><p>Check this option if you want this message part to be "

@ -20,7 +20,7 @@
#ifndef kmmsgpartdlg_h
#define kmmsgpartdlg_h
#include <kdialogbase.h>
#include <kdialog.h>
#include <kio/global.h>
//Added by qt3to4:
#include <QLabel>
@ -38,7 +38,7 @@ class QLineEdit;
/** @short GUI for KMMsgPartDialog
@author Marc Mutz <mutz@kde.org>
*/
class KMMsgPartDialog: public KDialogBase
class KMMsgPartDialog: public KDialog
{
Q_OBJECT

@ -34,21 +34,26 @@ inline const Q3CheckListItem * qcli_cast( const Q3ListViewItem * lvi ) {
}
KMail::ManageSieveScriptsDialog::ManageSieveScriptsDialog( QWidget * parent, const char * name )
: KDialogBase( Plain, i18n( "Manage Sieve Scripts" ), Close, Close,
parent, name, false ),
: KDialog( parent ),
mSieveEditor( 0 ),
mContextMenuItem( 0 ),
mWasActive( false )
{
setCaption( i18n( "Manage Sieve Scripts" ) );
setButtons( Close );
setDefaultButton( Close );
setModal( false );
setAttribute( Qt::WA_GroupLeader );
setAttribute( Qt::WA_DeleteOnClose );
KWin::setIcons( winId(), qApp->windowIcon().pixmap(IconSize(K3Icon::Desktop),IconSize(K3Icon::Desktop)), qApp->windowIcon().pixmap(IconSize(K3Icon::Small),IconSize(K3Icon::Small)) );
QVBoxLayout * vlay = new QVBoxLayout( plainPage() );
QFrame *frame =new QFrame( this );
setMainWidget( frame );
QVBoxLayout * vlay = new QVBoxLayout( frame );
vlay->setSpacing( 0 );
vlay->setMargin( 0 );
mListView = new Q3ListView( plainPage() );
mListView = new Q3ListView( frame);
mListView->addColumn( i18n( "Available Scripts" ) );
mListView->setResizeMode( Q3ListView::LastColumn );
mListView->setRootIsDecorated( true );
@ -297,12 +302,18 @@ void KMail::ManageSieveScriptsDialog::slotNewScript() {
}
KMail::SieveEditor::SieveEditor( QWidget * parent, const char * name )
: KDialogBase( Plain, i18n( "Edit Sieve Script" ), Ok|Cancel, Ok, parent, name )
: KDialog( parent )
{
QVBoxLayout * vlay = new QVBoxLayout( plainPage() );
setCaption( i18n( "Edit Sieve Script" ) );
setButtons( Ok|Cancel );
setDefaultButton( Ok );
setModal( true );
QFrame *frame = new Qframe( this );
setMainWidget( frame );
QVBoxLayout * vlay = new QVBoxLayout( frame );
vlay->setSpacing( spacingHint() );
vlay->setMargin( 0 );
mTextEdit = new Q3TextEdit( plainPage() );
mTextEdit = new Q3TextEdit( frame);
vlay->addWidget( mTextEdit );
mTextEdit->setTextFormat( Qt::PlainText );
mTextEdit->setWordWrap( Q3TextEdit::NoWrap );

@ -1,7 +1,7 @@
#ifndef __KMAIL__MANAGESIEVESCRIPTSDIALOG_H__
#define __KMAIL__MANAGESIEVESCRIPTSDIALOG_H__
#include <kdialogbase.h>
#include <kdialog.h>
#include <kurl.h>
#include <QMap>
@ -14,7 +14,7 @@ namespace KMail {
class SieveJob;
class SieveEditor;
class ManageSieveScriptsDialog : public KDialogBase {
class ManageSieveScriptsDialog : public KDialog {
Q_OBJECT
public:
ManageSieveScriptsDialog( QWidget * parent=0, const char * name=0 );

@ -1,13 +1,13 @@
#ifndef __KMAIL__MANAGESIEVESCRIPTSDIALOG_P_H__
#define __KMAIL__MANAGESIEVESCRIPTSDIALOG_P_H__
#include <kdialogbase.h>
#include <kdialog.h>
#include <q3textedit.h>
namespace KMail {
class SieveEditor : public KDialogBase {
class SieveEditor : public KDialog {
Q_OBJECT
Q_PROPERTY( QString script READ script WRITE setScript )
public:

@ -44,14 +44,20 @@ namespace KMail {
VacationDialog::VacationDialog( const QString & caption, QWidget * parent,
const char * name, bool modal )
: KDialogBase( Plain, caption, Ok|Cancel|Default, Ok, parent, name, modal )
: KDialog( parent )
{
setCaption( caption );
setButtons( Ok|Cancel|Default );
setDefaultButton( Ok );
setModal( modal );
QFrame *frame = new QFrame( this );
setMainWidget( frame );
KWin::setIcons( winId(), qApp->windowIcon().pixmap(IconSize(K3Icon::Desktop),IconSize(K3Icon::Desktop)), qApp->windowIcon().pixmap(IconSize(K3Icon::Small),IconSize(K3Icon::Small)) );
static const int rows = 4;
int row = -1;
QGridLayout * glay = new QGridLayout( plainPage() );
QGridLayout * glay = new QGridLayout( frame );
glay->setSpacing( spacingHint() );
glay->setMargin( 0 );
glay->setColumnStretch( 1, 1 );
@ -60,26 +66,26 @@ namespace KMail {
++row;
glay->addWidget( new QLabel( i18n("Configure vacation "
"notifications to be sent:"),
plainPage() ), row, 0, 1, 2 );
frame ), row, 0, 1, 2 );
// Activate checkbox:
++row;
mActiveCheck = new QCheckBox( i18n("&Activate vacation notifications"), plainPage() );
mActiveCheck = new QCheckBox( i18n("&Activate vacation notifications"), frame );
glay->addWidget( mActiveCheck, row, 0, 1, 2 );
// Message text edit:
++row;
glay->setRowStretch( row, 1 );
mTextEdit = new Q3TextEdit( plainPage(), "mTextEdit" );
mTextEdit = new Q3TextEdit( frame, "mTextEdit" );
mTextEdit->setTextFormat( Qt::PlainText );
glay->addWidget( mTextEdit, row, 0, 1, 2 );
// "Resent only after" spinbox and label:
++row;
mIntervalSpin = new KIntSpinBox( 1, 356, 1, 7, plainPage() );
mIntervalSpin = new KIntSpinBox( 1, 356, 1, 7, frame );
mIntervalSpin->setObjectName( "mIntervalSpin" );
connect(mIntervalSpin, SIGNAL( valueChanged( int )), SLOT( slotIntervalSpinChanged( int ) ) );
QLabel *label = new QLabel( i18n("&Resend notification only after:"), plainPage() );
QLabel *label = new QLabel( i18n("&Resend notification only after:"), frame );
label->setBuddy( mIntervalSpin );
glay->addWidget( label, row, 0 );
glay->addWidget( mIntervalSpin, row, 1 );

@ -15,7 +15,7 @@
#ifndef __KMAIL_VACATIONDIALOG_H__
#define __KMAIL_VACATIONDIALOG_H__
#include "kdialogbase.h"
#include "kdialog.h"
//Added by qt3to4:
#include <QList>
@ -36,7 +36,7 @@ namespace KMime {
namespace KMail {
class VacationDialog : public KDialogBase {
class VacationDialog : public KDialog {
Q_OBJECT
public:
VacationDialog( const QString & caption, QWidget * parent=0,
@ -55,7 +55,7 @@ namespace KMail {
KMime::Types::AddrSpecList mailAliases() const;
virtual void setMailAliases( const KMime::Types::AddrSpecList & aliases );
virtual void setMailAliases( const QString & aliases );
private slots:
void slotIntervalSpinChanged( int value );

Loading…
Cancel
Save