forgot some new files

svn path=/trunk/kdenetwork/kmail/; revision=981
wilder-work
cvs 29 years ago
parent adf1620afa
commit 5e728fcae7
  1. 64
      kmacctseldlg.cpp
  2. 33
      kmacctseldlg.h

@ -0,0 +1,64 @@
// kmacctseldlg.cpp
#include <qpushbt.h>
#include <qradiobt.h>
#include <qbttngrp.h>
#include <qradiobt.h>
#include <klocale.h>
#include <qlayout.h>
#include "kmacctseldlg.h"
#include "kmglobal.h"
//-----------------------------------------------------------------------------
KMAcctSelDlg::KMAcctSelDlg(QWidget* parent, const char* name):
KMAcctSelDlgInherited(parent, name, TRUE)
{
QPushButton *cancel;
QRadioButton *rbtn;
initMetaObject();
setFixedSize(230,150);
setCaption(name);
mSelBtn = 0;
grp = new QButtonGroup(nls->translate("Account Type"), this);
grp->resize(230, 110);
connect(grp, SIGNAL(clicked(int)), SLOT(buttonClicked(int)));
ok = new QPushButton(nls->translate("Ok"), this);
ok->adjustSize();
ok->setMinimumSize(ok->sizeHint());
ok->resize(100, ok->size().height());
ok->move(10, 145-ok->size().height());
ok->setEnabled(FALSE);
connect(ok, SIGNAL(clicked()), SLOT(accept()));
cancel = new QPushButton(nls->translate("Cancel"), this);
cancel->adjustSize();
cancel->setMinimumSize(cancel->sizeHint());
cancel->resize(100, cancel->size().height());
cancel->move(120, 145-cancel->size().height());
connect(cancel, SIGNAL(clicked()), SLOT(reject()));
rbtn = new QRadioButton(nls->translate("Local Mailbox"), grp);
rbtn->adjustSize();
rbtn->move(30,30);
rbtn = new QRadioButton(nls->translate("Pop3"), grp);
rbtn->adjustSize();
rbtn->move(30,60);
}
//-----------------------------------------------------------------------------
void KMAcctSelDlg::buttonClicked(int id)
{
mSelBtn = id;
ok->setEnabled(TRUE);
}
//-----------------------------------------------------------------------------
#include "kmacctseldlg.moc"

@ -0,0 +1,33 @@
/* Select account from given list of account types
* Author: Stefan Taferner <taferner@alpin.or.at>
*/
#ifndef kmacctseldlg_h
#define kmacctseldlg_h
#include <qdialog.h>
class QButtonGroup;
class QPushButton;
#define KMAcctSelDlgInherited QDialog
class KMAcctSelDlg: public QDialog
{
Q_OBJECT;
public:
KMAcctSelDlg(QWidget* parent=0, const char* name=0);
/** Returns selected button from the account selection group:
0=local mail, 1=pop3. */
int selected(void) const { return mSelBtn; }
protected slots:
void buttonClicked(int);
protected:
QButtonGroup* grp;
QPushButton* ok;
int mSelBtn;
};
#endif /*kmacctseldlg_h*/
Loading…
Cancel
Save