wilder-work
Montel Laurent 12 years ago
parent d9c2d349f3
commit eae9278d98
  1. 23
      dialog/kmknotify.cpp
  2. 4
      dialog/kmknotify.h

@ -38,17 +38,29 @@
#include <KSeparator>
#include <KIconLoader>
#include <QStandardPaths>
#include <QDialogButtonBox>
#include <KConfigGroup>
#include <QPushButton>
using namespace KMail;
KMKnotify::KMKnotify( QWidget * parent )
:KDialog( parent ), m_changed( false )
:QDialog( parent ), m_changed( false )
{
setCaption( i18n("Notification") );
setButtons( Ok|Cancel );
setWindowTitle( i18n("Notification") );
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
QWidget *mainWidget = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout;
setLayout(mainLayout);
mainLayout->addWidget(mainWidget);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
okButton->setDefault(true);
okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
QWidget *page = new QWidget( this );
setMainWidget( page );
mainLayout->addWidget(page);
QVBoxLayout *layout = new QVBoxLayout( page );
layout->setMargin( 0 );
@ -65,9 +77,10 @@ KMKnotify::KMKnotify( QWidget * parent )
layout->addWidget(new KSeparator);
mainLayout->addWidget(buttonBox);
connect( m_comboNotify, SIGNAL(activated(int)),
SLOT(slotComboChanged(int)) );
connect( this, SIGNAL(okClicked()), SLOT(slotOk()) );
connect(okButton, SIGNAL(clicked()), SLOT(slotOk()) );
connect( m_notifyWidget ,SIGNAL(changed(bool)) , this , SLOT(slotConfigChanged(bool)));
initCombobox();
readConfig();

@ -29,12 +29,12 @@
#ifndef KMKNOTIFY_H
#define KMKNOTIFY_H
#include <KDialog>
#include <QDialog>
class KComboBox;
class KNotifyConfigWidget;
namespace KMail {
class KMKnotify : public KDialog
class KMKnotify : public QDialog
{
Q_OBJECT
public:

Loading…
Cancel
Save