00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
#ifndef STARTUPWIZARD_H
00035
#define STARTUPWIZARD_H
00036
00037
#include <qwizard.h>
00038
00039
class KMFolder;
00040
class KMFolderComboBox;
00041
class KMAcctCachedImap;
00042
class NetworkPage;
00043
namespace KPIM {
class Identity; }
00044
class KMTransportInfo;
00045
00046
class QLabel;
00047
class QComboBox;
00048
class QLineEdit;
00049
class QCheckBox;
00050
class QButtonGroup;
00051
class QTextBrowser;
00052
class KIntNumInput;
00053
00054
class WizardIdentityPage :
public QWidget {
00055 Q_OBJECT
00056
public:
00057 WizardIdentityPage(
QWidget *parent,
const char *name );
00058
00059
void apply() const;
00060
00061 KPIM::Identity &identity() const;
00062
00063 private:
00064
int mIdentity;
00065
00066
QLineEdit *nameEdit, *orgEdit, *emailEdit;
00067 };
00068
00069
00070 class WizardKolabPage : public
QWidget {
00071 Q_OBJECT
00072
public:
00073 WizardKolabPage( QWidget * parent,
const char * name );
00074
00075
void apply();
00076
void init(
const QString &userEmail );
00077
KMFolder *folder()
const {
return mFolder; }
00078
00079
QLineEdit *loginEdit;
00080
QLineEdit *passwordEdit;
00081
QLineEdit *hostEdit;
00082
QCheckBox *storePasswordCheck;
00083
QCheckBox *excludeCheck;
00084
QCheckBox *intervalCheck;
00085
QLabel *intervalLabel;
00086 KIntNumInput *intervalSpin;
00087
00088
KMFolder *mFolder;
00089 KMAcctCachedImap *mAccount;
00090 KMTransportInfo *mTransport;
00091 };
00092
00093
00094
class StartupWizard :
public QWizard {
00095 Q_OBJECT
00096
public:
00097
00098
static void run();
00099
00100
private slots:
00101
virtual void back();
00102
virtual void next();
00103
00104
void slotGroupwareEnabled(
int );
00105
void slotServerSettings(
int i );
00106
void slotUpdateParentFolderName();
00107
00108
private:
00109 StartupWizard(
QWidget* parent = 0,
const char* name = 0,
bool modal = FALSE );
00110
00111
int language() const;
00112
KMFolder* folder() const;
00113
00114
bool groupwareEnabled()
const {
return mGroupwareEnabled; }
00115
bool useDefaultKolabSettings()
const {
return mUseDefaultKolabSettings; }
00116
00117
QString name() const;
00118
QString login() const;
00119
QString host() const;
00120
QString email() const;
00121
QString passwd() const;
00122
bool storePasswd() const;
00123
00124
void setAppropriatePages();
00125
void guessExistingFolderLanguage();
00126
void setLanguage(
int,
bool );
00127
00128
00129 static
void writeKOrganizerConfig( const StartupWizard& );
00130
00131
00132 static
void writeKAbcConfig();
00133
00134
00135 static
void writeKAddressbookConfig( const StartupWizard& );
00136
00137 KPIM::Identity& userIdentity();
00138 const KPIM::Identity& userIdentity() const;
00139
00140
QWidget* createIntroPage();
00141
QWidget* createIdentityPage();
00142
QWidget* createKolabPage();
00143
QWidget* createAccountPage();
00144
QWidget* createLanguagePage();
00145
QWidget* createFolderSelectionPage();
00146
QWidget* createFolderCreationPage();
00147
QWidget* createOutroPage();
00148
00149
QWidget *mIntroPage, *mIdentityPage, *mKolabPage, *mAccountPage, *mLanguagePage,
00150 *mFolderSelectionPage, *mFolderCreationPage, *mOutroPage;
00151
00152
QComboBox* mLanguageCombo;
00153 KMFolderComboBox* mFolderCombo;
00154
QTextBrowser* mFolderCreationText;
00155
QLabel* mLanguageLabel;
00156
00157 WizardIdentityPage* mIdentityWidget;
00158 WizardKolabPage* mKolabWidget;
00159 NetworkPage* mAccountWidget;
00160
00161
QButtonGroup *serverSettings;
00162
00163
bool mGroupwareEnabled;
00164
bool mUseDefaultKolabSettings;
00165
00166
KMFolder *mFolder;
00167 };
00168
00169
00170 #endif