kmail Library API Documentation

startupwizard.h

00001 /* 00002 This file is part of KMail. 00003 00004 Copyright (c) 2003 - 2004 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 In addition, as a special exception, the copyright holders give 00023 permission to link the code of this program with any edition of 00024 the Qt library by Trolltech AS, Norway (or with modified versions 00025 of Qt that use the same license as Qt), and distribute linked 00026 combinations including the two. You must obey the GNU General 00027 Public License in all respects for all of the code used other than 00028 Qt. If you modify this file, you may extend this exception to 00029 your version of the file, but you are not obligated to do so. If 00030 you do not wish to do so, delete this exception statement from 00031 your version. 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 // Call this to execute the thing 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 // Write the KOrganizer settings 00129 static void writeKOrganizerConfig( const StartupWizard& ); 00130 00131 // Write the KABC settings 00132 static void writeKAbcConfig(); 00133 00134 // Write the KAddressbook settings 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 // STARTUPWIZARD_H
KDE Logo
This file is part of the documentation for kmail Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:51 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003