Diffstat (limited to 'noncore/net/mailit/editaccount.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/editaccount.cpp | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/noncore/net/mailit/editaccount.cpp b/noncore/net/mailit/editaccount.cpp deleted file mode 100644 index c0afbb2..0000000 --- a/noncore/net/mailit/editaccount.cpp +++ b/dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qt Palmtop Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | *** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include <qhbox.h> | ||
22 | #include "editaccount.h" | ||
23 | |||
24 | EditAccount::EditAccount( QWidget* parent, const char* name, WFlags fl ) | ||
25 | : QDialog(parent, name, fl) | ||
26 | { | ||
27 | setCaption( tr("Edit Account") ); | ||
28 | init(); | ||
29 | popPasswInput->setEchoMode(QLineEdit::Password); | ||
30 | } | ||
31 | |||
32 | void EditAccount::setAccount(MailAccount *in, bool newOne) | ||
33 | { | ||
34 | account = in; | ||
35 | if (newOne) { | ||
36 | accountNameInput->setText(""); | ||
37 | nameInput->setText(""); | ||
38 | emailInput->setText(""); | ||
39 | popUserInput->setText(""); | ||
40 | popPasswInput->setText(""); | ||
41 | popServerInput->setText(""); | ||
42 | smtpServerInput->setText(""); | ||
43 | syncCheckBox->setChecked(TRUE); | ||
44 | syncLimitInput->setValue(2); | ||
45 | |||
46 | setCaption( tr("Create new Account") ); | ||
47 | } else { | ||
48 | accountNameInput->setText(account->accountName); | ||
49 | nameInput->setText(account->name); | ||
50 | emailInput->setText(account->emailAddress); | ||
51 | popUserInput->setText(account->popUserName); | ||
52 | popPasswInput->setText(account->popPasswd); | ||
53 | popServerInput->setText(account->popServer); | ||
54 | smtpServerInput->setText(account->smtpServer); | ||
55 | syncCheckBox->setChecked(account->synchronize); | ||
56 | syncLimitInput->setValue(account->syncLimit/1000); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | void EditAccount::init() | ||
61 | { | ||
62 | grid = new QGridLayout(this); | ||
63 | grid->setSpacing( 6 ); | ||
64 | grid->setMargin( 11 ); | ||
65 | |||
66 | accountNameInputLabel = new QLabel(tr("Account name"), this); | ||
67 | grid->addWidget( accountNameInputLabel, 0, 0 ); | ||
68 | accountNameInput = new QLineEdit( this, "account nameInput" ); | ||
69 | grid->addWidget( accountNameInput, 0, 1 ); | ||
70 | |||
71 | nameInputLabel = new QLabel(tr("Your name"), this); | ||
72 | grid->addWidget( nameInputLabel, 1, 0 ); | ||
73 | nameInput = new QLineEdit( this, "nameInput" ); | ||
74 | grid->addWidget( nameInput, 1, 1 ); | ||
75 | |||
76 | emailInputLabel = new QLabel(tr("Email"), this); | ||
77 | grid->addWidget(emailInputLabel, 2, 0 ); | ||
78 | emailInput = new QLineEdit( this, "emailInput" ); | ||
79 | grid->addWidget( emailInput, 2, 1 ); | ||
80 | |||
81 | popUserInputLabel = new QLabel(tr("POP username"), this); | ||
82 | grid->addWidget( popUserInputLabel, 3, 0 ); | ||
83 | popUserInput = new QLineEdit( this, "popUserInput" ); | ||
84 | grid->addWidget( popUserInput, 3, 1 ); | ||
85 | |||
86 | popPasswInputLabel = new QLabel( tr("POP password"), this); | ||
87 | grid->addWidget( popPasswInputLabel, 4, 0 ); | ||
88 | popPasswInput = new QLineEdit( this, "popPasswInput" ); | ||
89 | grid->addWidget( popPasswInput, 4, 1 ); | ||
90 | |||
91 | popServerInputLabel = new QLabel(tr("POP server"), this); | ||
92 | grid->addWidget( popServerInputLabel, 5, 0 ); | ||
93 | popServerInput = new QLineEdit( this, "popServerInput" ); | ||
94 | grid->addWidget( popServerInput, 5, 1 ); | ||
95 | |||
96 | smtpServerInputLabel = new QLabel(tr("SMTP server"), this ); | ||
97 | grid->addWidget( smtpServerInputLabel, 6, 0 ); | ||
98 | smtpServerInput = new QLineEdit( this, "smtpServerInput" ); | ||
99 | grid->addWidget( smtpServerInput, 6, 1 ); | ||
100 | |||
101 | QHBox* syncBox=new QHBox(this); | ||
102 | grid->addWidget( syncBox, 7, 1 ); | ||
103 | |||
104 | syncCheckBox = new QCheckBox( tr( "Synchronize" ), this); | ||
105 | syncCheckBox->setChecked( TRUE ); | ||
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 | |||
113 | } | ||
114 | |||
115 | |||
116 | void EditAccount::accept() | ||
117 | { | ||
118 | account->accountName = accountNameInput->text(); | ||
119 | account->name = nameInput->text(); | ||
120 | account->emailAddress = emailInput->text(); | ||
121 | account->popUserName = popUserInput->text(); | ||
122 | account->popPasswd = popPasswInput->text(); | ||
123 | account->popServer = popServerInput->text(); | ||
124 | account->smtpServer = smtpServerInput->text(); | ||
125 | account->synchronize = syncCheckBox->isChecked(); | ||
126 | account->syncLimit = syncLimitInput->value()*1000;//Display in kB | ||
127 | |||
128 | QDialog::accept(); | ||
129 | } | ||
130 | |||
131 | void EditAccount::reject() | ||
132 | { | ||
133 | } | ||