summaryrefslogtreecommitdiff
path: root/noncore/net/mailit/editaccount.cpp
Unidiff
Diffstat (limited to 'noncore/net/mailit/editaccount.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mailit/editaccount.cpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/noncore/net/mailit/editaccount.cpp b/noncore/net/mailit/editaccount.cpp
index c4f95ea..c0afbb2 100644
--- a/noncore/net/mailit/editaccount.cpp
+++ b/noncore/net/mailit/editaccount.cpp
@@ -15,12 +15,13 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18*** 18***
19**********************************************************************/ 19**********************************************************************/
20 20
21#include <qhbox.h>
21#include "editaccount.h" 22#include "editaccount.h"
22 23
23EditAccount::EditAccount( QWidget* parent, const char* name, WFlags fl ) 24EditAccount::EditAccount( QWidget* parent, const char* name, WFlags fl )
24 : QDialog(parent, name, fl) 25 : QDialog(parent, name, fl)
25{ 26{
26 setCaption( tr("Edit Account") ); 27 setCaption( tr("Edit Account") );
@@ -37,23 +38,25 @@ void EditAccount::setAccount(MailAccount *in, bool newOne)
37 emailInput->setText(""); 38 emailInput->setText("");
38 popUserInput->setText(""); 39 popUserInput->setText("");
39 popPasswInput->setText(""); 40 popPasswInput->setText("");
40 popServerInput->setText(""); 41 popServerInput->setText("");
41 smtpServerInput->setText(""); 42 smtpServerInput->setText("");
42 syncCheckBox->setChecked(TRUE); 43 syncCheckBox->setChecked(TRUE);
44 syncLimitInput->setValue(2);
43 45
44 setCaption( tr("Create new Account") ); 46 setCaption( tr("Create new Account") );
45 } else { 47 } else {
46 accountNameInput->setText(account->accountName); 48 accountNameInput->setText(account->accountName);
47 nameInput->setText(account->name); 49 nameInput->setText(account->name);
48 emailInput->setText(account->emailAddress); 50 emailInput->setText(account->emailAddress);
49 popUserInput->setText(account->popUserName); 51 popUserInput->setText(account->popUserName);
50 popPasswInput->setText(account->popPasswd); 52 popPasswInput->setText(account->popPasswd);
51 popServerInput->setText(account->popServer); 53 popServerInput->setText(account->popServer);
52 smtpServerInput->setText(account->smtpServer); 54 smtpServerInput->setText(account->smtpServer);
53 syncCheckBox->setChecked(account->synchronize); 55 syncCheckBox->setChecked(account->synchronize);
56 syncLimitInput->setValue(account->syncLimit/1000);
54 } 57 }
55} 58}
56 59
57void EditAccount::init() 60void EditAccount::init()
58{ 61{
59 grid = new QGridLayout(this); 62 grid = new QGridLayout(this);
@@ -67,40 +70,49 @@ void EditAccount::init()
67 70
68 nameInputLabel = new QLabel(tr("Your name"), this); 71 nameInputLabel = new QLabel(tr("Your name"), this);
69 grid->addWidget( nameInputLabel, 1, 0 ); 72 grid->addWidget( nameInputLabel, 1, 0 );
70 nameInput = new QLineEdit( this, "nameInput" ); 73 nameInput = new QLineEdit( this, "nameInput" );
71 grid->addWidget( nameInput, 1, 1 ); 74 grid->addWidget( nameInput, 1, 1 );
72 75
73 emailInputLabel = new QLabel("Email", this); 76 emailInputLabel = new QLabel(tr("Email"), this);
74 grid->addWidget(emailInputLabel, 2, 0 ); 77 grid->addWidget(emailInputLabel, 2, 0 );
75 emailInput = new QLineEdit( this, "emailInput" ); 78 emailInput = new QLineEdit( this, "emailInput" );
76 grid->addWidget( emailInput, 2, 1 ); 79 grid->addWidget( emailInput, 2, 1 );
77 80
78 popUserInputLabel = new QLabel("POP username", this); 81 popUserInputLabel = new QLabel(tr("POP username"), this);
79 grid->addWidget( popUserInputLabel, 3, 0 ); 82 grid->addWidget( popUserInputLabel, 3, 0 );
80 popUserInput = new QLineEdit( this, "popUserInput" ); 83 popUserInput = new QLineEdit( this, "popUserInput" );
81 grid->addWidget( popUserInput, 3, 1 ); 84 grid->addWidget( popUserInput, 3, 1 );
82 85
83 popPasswInputLabel = new QLabel( "POP password", this); 86 popPasswInputLabel = new QLabel( tr("POP password"), this);
84 grid->addWidget( popPasswInputLabel, 4, 0 ); 87 grid->addWidget( popPasswInputLabel, 4, 0 );
85 popPasswInput = new QLineEdit( this, "popPasswInput" ); 88 popPasswInput = new QLineEdit( this, "popPasswInput" );
86 grid->addWidget( popPasswInput, 4, 1 ); 89 grid->addWidget( popPasswInput, 4, 1 );
87 90
88 popServerInputLabel = new QLabel("POP server", this); 91 popServerInputLabel = new QLabel(tr("POP server"), this);
89 grid->addWidget( popServerInputLabel, 5, 0 ); 92 grid->addWidget( popServerInputLabel, 5, 0 );
90 popServerInput = new QLineEdit( this, "popServerInput" ); 93 popServerInput = new QLineEdit( this, "popServerInput" );
91 grid->addWidget( popServerInput, 5, 1 ); 94 grid->addWidget( popServerInput, 5, 1 );
92 95
93 smtpServerInputLabel = new QLabel("SMTP server", this ); 96 smtpServerInputLabel = new QLabel(tr("SMTP server"), this );
94 grid->addWidget( smtpServerInputLabel, 6, 0 ); 97 grid->addWidget( smtpServerInputLabel, 6, 0 );
95 smtpServerInput = new QLineEdit( this, "smtpServerInput" ); 98 smtpServerInput = new QLineEdit( this, "smtpServerInput" );
96 grid->addWidget( smtpServerInput, 6, 1 ); 99 grid->addWidget( smtpServerInput, 6, 1 );
97 100
98 syncCheckBox = new QCheckBox( tr( "Synchronize with server" ), this); 101 QHBox* syncBox=new QHBox(this);
102 grid->addWidget( syncBox, 7, 1 );
103
104 syncCheckBox = new QCheckBox( tr( "Synchronize" ), this);
99 syncCheckBox->setChecked( TRUE ); 105 syncCheckBox->setChecked( TRUE );
100 grid->addMultiCellWidget( syncCheckBox, 7, 7, 0, 1 ); 106 grid->addWidget( syncCheckBox,7,0);
107
108 syncLimitInputLabel = new QLabel(tr("Mail Size (k)"), syncBox);
109 //syncBox->addWidget( syncLimitInputLabel);
110 syncLimitInput = new QSpinBox( syncBox, "syncSize" );
111 //syncBox->addWidget(syncLimitInput);
112
101} 113}
102 114
103 115
104void EditAccount::accept() 116void EditAccount::accept()
105{ 117{
106 account->accountName = accountNameInput->text(); 118 account->accountName = accountNameInput->text();
@@ -108,12 +120,13 @@ void EditAccount::accept()
108 account->emailAddress = emailInput->text(); 120 account->emailAddress = emailInput->text();
109 account->popUserName = popUserInput->text(); 121 account->popUserName = popUserInput->text();
110 account->popPasswd = popPasswInput->text(); 122 account->popPasswd = popPasswInput->text();
111 account->popServer = popServerInput->text(); 123 account->popServer = popServerInput->text();
112 account->smtpServer = smtpServerInput->text(); 124 account->smtpServer = smtpServerInput->text();
113 account->synchronize = syncCheckBox->isChecked(); 125 account->synchronize = syncCheckBox->isChecked();
126 account->syncLimit = syncLimitInput->value()*1000;//Display in kB
114 127
115 QDialog::accept(); 128 QDialog::accept();
116} 129}
117 130
118void EditAccount::reject() 131void EditAccount::reject()
119{ 132{