Diffstat (limited to 'noncore/net/mailit/editaccount.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mailit/editaccount.cpp | 27 |
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 | |||
@@ -18,6 +18,7 @@ | |||
18 | *** | 18 | *** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qhbox.h> | ||
21 | #include "editaccount.h" | 22 | #include "editaccount.h" |
22 | 23 | ||
23 | EditAccount::EditAccount( QWidget* parent, const char* name, WFlags fl ) | 24 | EditAccount::EditAccount( QWidget* parent, const char* name, WFlags fl ) |
@@ -40,6 +41,7 @@ void EditAccount::setAccount(MailAccount *in, bool newOne) | |||
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 { |
@@ -51,6 +53,7 @@ void EditAccount::setAccount(MailAccount *in, bool newOne) | |||
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 | ||
@@ -70,34 +73,43 @@ void EditAccount::init() | |||
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 | ||
@@ -111,6 +123,7 @@ void EditAccount::accept() | |||
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 | } |