author | zautrix <zautrix> | 2004-09-10 22:52:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-10 22:52:50 (UTC) |
commit | 1b41a0e3bf63364940daf132446939e3570c57ad (patch) (unidiff) | |
tree | 81db8e427beadcf3bbd5356962b5d08b970a87e4 /kmicromail/editaccounts.cpp | |
parent | c280882f788b31f874f928e23fc29c2aaca991eb (diff) | |
download | kdepimpi-1b41a0e3bf63364940daf132446939e3570c57ad.zip kdepimpi-1b41a0e3bf63364940daf132446939e3570c57ad.tar.gz kdepimpi-1b41a0e3bf63364940daf132446939e3570c57ad.tar.bz2 |
Added pop3 settings
-rw-r--r-- | kmicromail/editaccounts.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index d272c3b..e7d2750 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp | |||
@@ -3,32 +3,33 @@ | |||
3 | #include "editaccounts.h" | 3 | #include "editaccounts.h" |
4 | #include "kapplication.h" | 4 | #include "kapplication.h" |
5 | /* OPIE */ | 5 | /* OPIE */ |
6 | #include <qpe/qpeapplication.h> | 6 | #include <qpe/qpeapplication.h> |
7 | 7 | ||
8 | /* QT */ | 8 | /* QT */ |
9 | #include <qstringlist.h> | 9 | #include <qstringlist.h> |
10 | 10 | ||
11 | #include <qcombobox.h> | 11 | #include <qcombobox.h> |
12 | #include <qcheckbox.h> | 12 | #include <qcheckbox.h> |
13 | #include <qmessagebox.h> | 13 | #include <qmessagebox.h> |
14 | #include <qpushbutton.h> | 14 | #include <qpushbutton.h> |
15 | #include <qlineedit.h> | 15 | #include <qlineedit.h> |
16 | #include <qlabel.h> | 16 | #include <qlabel.h> |
17 | #include <qtabwidget.h> | 17 | #include <qtabwidget.h> |
18 | #include <qlistview.h> | 18 | #include <qlistview.h> |
19 | #include <qspinbox.h> | ||
19 | 20 | ||
20 | #include <libmailwrapper/nntpwrapper.h> | 21 | #include <libmailwrapper/nntpwrapper.h> |
21 | 22 | ||
22 | using namespace Opie::Core; | 23 | using namespace Opie::Core; |
23 | 24 | ||
24 | AccountListItem::AccountListItem( QListView *parent, Account *a) | 25 | AccountListItem::AccountListItem( QListView *parent, Account *a) |
25 | : QListViewItem( parent ) | 26 | : QListViewItem( parent ) |
26 | { | 27 | { |
27 | account = a; | 28 | account = a; |
28 | setText( 0, account->getAccountName() ); | 29 | setText( 0, account->getAccountName() ); |
29 | QString ttext = ""; | 30 | QString ttext = ""; |
30 | switch (account->getType()) { | 31 | switch (account->getType()) { |
31 | case MAILLIB::A_NNTP: | 32 | case MAILLIB::A_NNTP: |
32 | ttext="NNTP"; | 33 | ttext="NNTP"; |
33 | break; | 34 | break; |
34 | case MAILLIB::A_POP3: | 35 | case MAILLIB::A_POP3: |
@@ -407,42 +408,53 @@ void POP3config::slotConnectionToggle( int index ) | |||
407 | CommandEdit->show(); | 408 | CommandEdit->show(); |
408 | } | 409 | } |
409 | else | 410 | else |
410 | { | 411 | { |
411 | portLine->setText( POP3_PORT ); | 412 | portLine->setText( POP3_PORT ); |
412 | } | 413 | } |
413 | } | 414 | } |
414 | 415 | ||
415 | void POP3config::fillValues() | 416 | void POP3config::fillValues() |
416 | { | 417 | { |
417 | accountLine->setText( data->getAccountName() ); | 418 | accountLine->setText( data->getAccountName() ); |
418 | serverLine->setText( data->getServer() ); | 419 | serverLine->setText( data->getServer() ); |
419 | portLine->setText( data->getPort() ); | 420 | portLine->setText( data->getPort() ); |
420 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 421 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
421 | userLine->setText( data->getUser() ); | 422 | userLine->setText( data->getUser() ); |
422 | passLine->setText( data->getPassword() ); | 423 | passLine->setText( data->getPassword() ); |
424 | localFolder->setText( data->getLocalFolder() ); | ||
425 | int max = data->getMaxMailSize() ; | ||
426 | if ( max ) { | ||
427 | CheckBoxDown->setChecked( true ); | ||
428 | SpinBoxDown->setValue ( max ); | ||
429 | } else { | ||
430 | CheckBoxDown->setChecked( false ); | ||
431 | SpinBoxDown->setValue ( 5 ); | ||
432 | } | ||
423 | } | 433 | } |
424 | 434 | ||
425 | void POP3config::accept() | 435 | void POP3config::accept() |
426 | { | 436 | { |
427 | data->setAccountName( accountLine->text() ); | 437 | data->setAccountName( accountLine->text() ); |
428 | data->setServer( serverLine->text() ); | 438 | data->setServer( serverLine->text() ); |
429 | data->setPort( portLine->text() ); | 439 | data->setPort( portLine->text() ); |
430 | data->setConnectionType( ComboBox1->currentItem() ); | 440 | data->setConnectionType( ComboBox1->currentItem() ); |
431 | data->setUser( userLine->text() ); | 441 | data->setUser( userLine->text() ); |
432 | data->setPassword( passLine->text() ); | 442 | data->setPassword( passLine->text() ); |
443 | data->setLocalFolder( localFolder->text() ); | ||
444 | data->setMaxMailSize( CheckBoxDown->isChecked()?SpinBoxDown->value():0 ) ; | ||
433 | 445 | ||
434 | QDialog::accept(); | 446 | QDialog::accept(); |
435 | } | 447 | } |
436 | 448 | ||
437 | /** | 449 | /** |
438 | * SMTPconfig | 450 | * SMTPconfig |
439 | */ | 451 | */ |
440 | 452 | ||
441 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 453 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
442 | : SMTPconfigUI( parent, name, modal, flags ) | 454 | : SMTPconfigUI( parent, name, modal, flags ) |
443 | { | 455 | { |
444 | data = account; | 456 | data = account; |
445 | 457 | ||
446 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); | 458 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
447 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); | 459 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
448 | 460 | ||