author | groucho <groucho> | 2003-04-14 08:22:55 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-14 08:22:55 (UTC) |
commit | 4624a73cd100f860371fb01facea442737e9336e (patch) (unidiff) | |
tree | ae06cfd24013ca39816a5ca035605988f4033dcd /noncore/unsupported/mailit/editaccount.cpp | |
parent | 6d737040698a9c7ebc6492ba4234b64bf4db6c0b (diff) | |
download | opie-4624a73cd100f860371fb01facea442737e9336e.zip opie-4624a73cd100f860371fb01facea442737e9336e.tar.gz opie-4624a73cd100f860371fb01facea442737e9336e.tar.bz2 |
- Buttonlayout changed in attach dialog
- Removed file access for address list (reduces size)
- Added header size sping box for accounts
- mailit shows an icon in the message list if attachments are present
- Added translations in pro file
- Removed resource.* references in header files, uses qpe/resource.h instead
Diffstat (limited to 'noncore/unsupported/mailit/editaccount.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/mailit/editaccount.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/noncore/unsupported/mailit/editaccount.cpp b/noncore/unsupported/mailit/editaccount.cpp index c4f95ea..c0afbb2 100644 --- a/noncore/unsupported/mailit/editaccount.cpp +++ b/noncore/unsupported/mailit/editaccount.cpp | |||
@@ -9,112 +9,125 @@ | |||
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
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 | ||
23 | EditAccount::EditAccount( QWidget* parent, const char* name, WFlags fl ) | 24 | EditAccount::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") ); |
27 | init(); | 28 | init(); |
28 | popPasswInput->setEchoMode(QLineEdit::Password); | 29 | popPasswInput->setEchoMode(QLineEdit::Password); |
29 | } | 30 | } |
30 | 31 | ||
31 | void EditAccount::setAccount(MailAccount *in, bool newOne) | 32 | void EditAccount::setAccount(MailAccount *in, bool newOne) |
32 | { | 33 | { |
33 | account = in; | 34 | account = in; |
34 | if (newOne) { | 35 | if (newOne) { |
35 | accountNameInput->setText(""); | 36 | accountNameInput->setText(""); |
36 | nameInput->setText(""); | 37 | nameInput->setText(""); |
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 | ||
57 | void EditAccount::init() | 60 | void EditAccount::init() |
58 | { | 61 | { |
59 | grid = new QGridLayout(this); | 62 | grid = new QGridLayout(this); |
60 | grid->setSpacing( 6 ); | 63 | grid->setSpacing( 6 ); |
61 | grid->setMargin( 11 ); | 64 | grid->setMargin( 11 ); |
62 | 65 | ||
63 | accountNameInputLabel = new QLabel(tr("Account name"), this); | 66 | accountNameInputLabel = new QLabel(tr("Account name"), this); |
64 | grid->addWidget( accountNameInputLabel, 0, 0 ); | 67 | grid->addWidget( accountNameInputLabel, 0, 0 ); |
65 | accountNameInput = new QLineEdit( this, "account nameInput" ); | 68 | accountNameInput = new QLineEdit( this, "account nameInput" ); |
66 | grid->addWidget( accountNameInput, 0, 1 ); | 69 | grid->addWidget( accountNameInput, 0, 1 ); |
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 | ||
104 | void EditAccount::accept() | 116 | void EditAccount::accept() |
105 | { | 117 | { |
106 | account->accountName = accountNameInput->text(); | 118 | account->accountName = accountNameInput->text(); |
107 | account->name = nameInput->text(); | 119 | account->name = nameInput->text(); |
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 | ||
118 | void EditAccount::reject() | 131 | void EditAccount::reject() |
119 | { | 132 | { |
120 | } | 133 | } |