kmail Library API Documentation

startupwizard.h

00001 /* 00002 This file is part of KMail. 00003 00004 Copyright (c) 2003 Bo Thorsen <bo@klaralvdalens-datakonsult.se> 00005 Copyright (c) 2003 Steffen Hansen <steffen@klaralvdalens-datakonsult.se> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00020 Boston, MA 02111-1307, USA. 00021 */ 00022 00023 #ifndef STARTUPWIZARD_H 00024 #define STARTUPWIZARD_H 00025 00026 #include <qwizard.h> 00027 00028 class KMFolder; 00029 class KMFolderComboBox; 00030 class KMAcctCachedImap; 00031 class NetworkPage; 00032 class KMIdentity; 00033 class KMTransportInfo; 00034 00035 class QLabel; 00036 class QComboBox; 00037 class QLineEdit; 00038 class QCheckBox; 00039 class QButtonGroup; 00040 class QTextBrowser; 00041 class KIntNumInput; 00042 00043 class WizardIdentityPage : public QWidget { 00044 Q_OBJECT 00045 public: 00046 WizardIdentityPage( QWidget *parent, const char *name ); 00047 00048 void apply() const; 00049 00050 KMIdentity &identity() const; 00051 00052 private: 00053 int mIdentity; 00054 00055 QLineEdit *nameEdit, *orgEdit, *emailEdit; 00056 }; 00057 00058 00059 class WizardKolabPage : public QWidget { 00060 Q_OBJECT 00061 public: 00062 WizardKolabPage( QWidget * parent, const char * name ); 00063 00064 void apply(); 00065 void init( const QString &userEmail ); 00066 KMFolder *folder() const { return mFolder; } 00067 00068 QLineEdit *loginEdit; 00069 QLineEdit *passwordEdit; 00070 QLineEdit *hostEdit; 00071 QCheckBox *storePasswordCheck; 00072 QCheckBox *excludeCheck; 00073 QCheckBox *intervalCheck; 00074 QLabel *intervalLabel; 00075 KIntNumInput *intervalSpin; 00076 00077 KMFolder *mFolder; 00078 KMAcctCachedImap *mAccount; 00079 KMTransportInfo *mTransport; 00080 }; 00081 00082 00083 class StartupWizard : public QWizard { 00084 Q_OBJECT 00085 public: 00086 // Call this to execute the thing 00087 static void run(); 00088 00089 private slots: 00090 virtual void back(); 00091 virtual void next(); 00092 00093 void slotGroupwareEnabled( int ); 00094 void slotServerSettings( int i ); 00095 void slotUpdateParentFolderName(); 00096 00097 private: 00098 StartupWizard( QWidget* parent = 0, const char* name = 0, bool modal = FALSE ); 00099 00100 int language() const; 00101 KMFolder* folder() const; 00102 00103 bool groupwareEnabled() const { return mGroupwareEnabled; } 00104 bool useDefaultKolabSettings() const { return mUseDefaultKolabSettings; } 00105 00106 QString name() const; 00107 QString login() const; 00108 QString host() const; 00109 QString email() const; 00110 QString passwd() const; 00111 bool storePasswd() const; 00112 00113 void setAppropriatePages(); 00114 void guessExistingFolderLanguage(); 00115 void setLanguage( int, bool ); 00116 00117 // Write the KOrganizer settings 00118 static void writeKOrganizerConfig( const StartupWizard& ); 00119 00120 // Write the KABC settings 00121 static void writeKAbcConfig(); 00122 00123 // Write the KAddressbook settings 00124 static void writeKAddressbookConfig( const StartupWizard& ); 00125 00126 KMIdentity& userIdentity(); 00127 const KMIdentity& userIdentity() const; 00128 00129 QWidget* createIntroPage(); 00130 QWidget* createIdentityPage(); 00131 QWidget* createKolabPage(); 00132 QWidget* createAccountPage(); 00133 QWidget* createLanguagePage(); 00134 QWidget* createFolderSelectionPage(); 00135 QWidget* createFolderCreationPage(); 00136 QWidget* createOutroPage(); 00137 00138 QWidget *mIntroPage, *mIdentityPage, *mKolabPage, *mAccountPage, *mLanguagePage, 00139 *mFolderSelectionPage, *mFolderCreationPage, *mOutroPage; 00140 00141 QComboBox* mLanguageCombo; 00142 KMFolderComboBox* mFolderCombo; 00143 QTextBrowser* mFolderCreationText; 00144 QLabel* mLanguageLabel; 00145 00146 WizardIdentityPage* mIdentityWidget; 00147 WizardKolabPage* mKolabWidget; 00148 NetworkPage* mAccountWidget; 00149 00150 QButtonGroup *serverSettings; 00151 00152 bool mGroupwareEnabled; 00153 bool mUseDefaultKolabSettings; 00154 00155 KMFolder *mFolder; 00156 }; 00157 00158 00159 #endif // STARTUPWIZARD_H
KDE Logo
This file is part of the documentation for kmail Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:58:04 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003