kmail

accountwizard.h
1/*******************************************************************************
2**
3** Filename : accountwizard.h
4** Created on : 07 February, 2005
5** Copyright : (c) 2005 Tobias Koenig
6** Email : tokoe@kde.org
7**
8*******************************************************************************/
9
10/*******************************************************************************
11**
12** This program is free software; you can redistribute it and/or modify
13** it under the terms of the GNU General Public License as published by
14** the Free Software Foundation; either version 2 of the License, or
15** (at your option) any later version.
16**
17** In addition, as a special exception, the copyright holders give
18** permission to link the code of this program with any edition of
19** the TQt library by Trolltech AS, Norway (or with modified versions
20** of TQt that use the same license as TQt), and distribute linked
21** combinations including the two. You must obey the GNU General
22** Public License in all respects for all of the code used other than
23** TQt. If you modify this file, you may extend this exception to
24** your version of the file, but you are not obligated to do so. If
25** you do not wish to do so, delete this exception statement from
26** your version.
27*******************************************************************************/
28
29#ifndef KMWIZARD_H
30#define KMWIZARD_H
31
32#include <kwizard.h>
33
34class KLineEdit;
35class TQCheckBox;
36class TQLabel;
37class TQPushButton;
38
39class KMAccount;
40class KMKernel;
41class KMServerTest;
42class AccountTypeBox;
43class KMTransportInfo;
44
45class AccountWizard : public KWizard
46{
47 TQ_OBJECT
48
49
50 public:
58 static void start( KMKernel *kernel, TQWidget *parent = 0 );
59
63 void showPage( TQWidget *page );
64
65 protected:
66 AccountWizard( KMKernel *kernel, TQWidget *parent );
67 ~AccountWizard() {};
68
69 void setupWelcomePage();
70 void setupAccountTypePage();
71 void setupAccountInformationPage();
72 void setupLoginInformationPage();
73 void setupServerInformationPage();
74
75 protected slots:
76 void chooseLocation();
77 virtual void accept();
78 void createTransport();
79 void transportCreated();
80 void createAccount();
81 void accountCreated();
82 void finished();
83
84 private slots:
85 void popCapabilities( const TQStringList&, const TQStringList& );
86 void imapCapabilities( const TQStringList&, const TQStringList& );
87 void smtpCapabilities( const TQStringList&, const TQStringList&,
88 const TQString&, const TQString&, const TQString& );
89
90 private:
91 TQString accountName() const;
92 TQLabel *createInfoLabel( const TQString &msg );
93
94 void checkPopCapabilities( const TQString&, int );
95 void checkImapCapabilities( const TQString&, int );
96 void checkSmtpCapabilities( const TQString&, int );
97 uint popCapabilitiesFromStringList( const TQStringList& );
98 uint imapCapabilitiesFromStringList( const TQStringList& );
99 uint authMethodsFromString( const TQString& );
100 uint authMethodsFromStringList( const TQStringList& );
101
102 TQWidget *mWelcomePage;
103
104 TQWidget *mAccountTypePage;
105 AccountTypeBox *mTypeBox;
106
107 TQWidget *mAccountInformationPage;
108 KLineEdit *mRealName;
109 KLineEdit *mEMailAddress;
110 KLineEdit *mOrganization;
111
112 TQWidget *mLoginInformationPage;
113 KLineEdit *mLoginName;
114 KLineEdit *mPassword;
115
116 TQWidget *mServerInformationPage;
117 TQLabel *mIncomingLabel;
118 KLineEdit *mIncomingServer;
119 TQCheckBox *mIncomingUseSSL;
120 KLineEdit *mIncomingLocation;
121
122 TQPushButton *mChooseLocation;
123 KLineEdit *mOutgoingServer;
124 TQCheckBox *mOutgoingUseSSL;
125 TQCheckBox *mLocalDelivery;
126
127 TQWidget *mIncomingServerWdg;
128 TQWidget *mIncomingLocationWdg;
129
130 TQLabel *mAuthInfoLabel;
131
132 KMKernel *mKernel;
133 KMAccount *mAccount;
134 KMTransportInfo *mTransportInfo;
135 TQPtrList<KMTransportInfo> mTransportInfoList;
136 KMServerTest *mServerTest;
137};
138
139#endif
Central point of coordination in KMail.
Definition: kmkernel.h:92