• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

kmail

accountdialog.h

Go to the documentation of this file.
00001 /*   -*- c++ -*-
00002  *   accountdialog.h
00003  *
00004  *   kmail: KDE mail client
00005  *   Copyright (C) 2000 Espen Sand, espen@kde.org
00006  *
00007  *   This program is free software; you can redistribute it and/or modify
00008  *   it under the terms of the GNU General Public License as published by
00009  *   the Free Software Foundation; either version 2 of the License, or
00010  *   (at your option) any later version.
00011  *
00012  *   This program 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
00015  *   GNU General Public License for more details.
00016  *
00017  *   You should have received a copy of the GNU General Public License
00018  *   along with this program; if not, write to the Free Software
00019  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef _ACCOUNT_DIALOG_H_
00024 #define _ACCOUNT_DIALOG_H_
00025 
00026 #include <config-kmail.h>
00027 #include "imapaccountbase.h"
00028 #include "ui_imapsettings.h"
00029 #include "ui_localsettings.h"
00030 #include "ui_maildirsettings.h"
00031 #include "ui_popsettings.h"
00032 
00033 #include <kdialog.h>
00034 #include <klineedit.h>
00035 
00036 #include <QPointer>
00037 #include <QLabel>
00038 #include <QList>
00039 
00040 class QRegExpValidator;
00041 class QCheckBox;
00042 class QComboBox;
00043 class QPushButton;
00044 class QLabel;
00045 class QLineEdit;
00046 class QRadioButton;
00047 class QToolButton;
00048 class KIntNumInput;
00049 class KMAccount;
00050 class KMFolder;
00051 class QButtonGroup;
00052 class QGroupBox;
00053 
00054 namespace MailTransport {
00055 class ServerTest;
00056 }
00057 
00058 namespace KPIMIdentities {
00059 class IdentityCombo;
00060 }
00061 
00062 namespace KMail {
00063 
00064 class SieveConfigEditor;
00065 class FolderRequester;
00066 
00067 class AccountDialog : public KDialog
00068 {
00069   Q_OBJECT
00070 
00071   public:
00072     AccountDialog( const QString & caption, KMAccount *account,
00073                    QWidget *parent=0 );
00074     virtual ~AccountDialog();
00075   private:
00076     struct LocalWidgets
00077     {
00078       Ui::LocalPage ui;
00079     };
00080 
00081     struct MaildirWidgets
00082     {
00083       Ui::MaildirPage ui;
00084     };
00085 
00086     struct PopWidgets
00087     {
00088       Ui::PopPage ui;
00089       QButtonGroup *encryptionButtonGroup;
00090       QButtonGroup *authButtonGroup;
00091     };
00092 
00093     struct ImapWidgets
00094     {
00095       Ui::ImapPage ui;
00096       QButtonGroup *encryptionButtonGroup;
00097       QButtonGroup *authButtonGroup;
00098       FolderRequester *trashCombo;
00099       ImapAccountBase::nsDelimMap nsMap;
00100       KPIMIdentities::IdentityCombo    *identityCombo;
00101     };
00102 
00103   private slots:
00104     virtual void slotOk();
00105     void slotLocationChooser();
00106     void slotMaildirChooser();
00107     void slotEnablePopInterval( bool state );
00108     void slotEnableImapInterval( bool state );
00109     void slotEnableLocalInterval( bool state );
00110     void slotEnableMaildirInterval( bool state );
00111     void slotFontChanged();
00112     void slotLeaveOnServerClicked();
00113     void slotEnableLeaveOnServerDays( bool state );
00114     void slotEnableLeaveOnServerCount( bool state );
00115     void slotEnableLeaveOnServerSize( bool state );
00116     void slotFilterOnServerClicked();
00117     void slotPipeliningClicked();
00118     void slotPopEncryptionChanged(int);
00119     void slotPopPasswordChanged(const QString& text);
00120     void slotImapEncryptionChanged(int);
00121     void slotCheckPopCapabilities();
00122     void slotCheckImapCapabilities();
00123     void slotPopCapabilities( QList<int> );
00124     void slotImapCapabilities( QList<int> );
00125     void slotReloadNamespaces();
00126     void slotSetupNamespaces( const ImapAccountBase::nsDelimMap& map );
00127     void slotEditPersonalNamespace();
00128     void slotEditOtherUsersNamespace();
00129     void slotEditSharedNamespace();
00130     void slotConnectionResult( int errorCode, const QString& );
00131     void slotLeaveOnServerDaysChanged( int value );
00132     void slotLeaveOnServerCountChanged( int value );
00133     void slotFilterOnServerSizeChanged( int value );
00134     void slotIdentityCheckboxChanged();
00135 
00136   private:
00137     void makeLocalAccountPage();
00138     void makeMaildirAccountPage();
00139     void makePopAccountPage();
00140     void makeImapAccountPage( bool disconnected = false );
00141     void setupSettings();
00142     void saveSettings();
00143     void checkHighest( QButtonGroup * );
00144     void enablePopFeatures();
00145     void enableImapAuthMethods();
00146     void initAccountForConnect();
00147     const QString namespaceListToString( const QStringList& list );
00148 
00149   private:
00150     LocalWidgets mLocal;
00151     MaildirWidgets mMaildir;
00152     PopWidgets   mPop;
00153     ImapWidgets  mImap;
00154     KMAccount    *mAccount;
00155     QList<QPointer<KMFolder> > mFolderList;
00156     QStringList  mFolderNames;
00157     MailTransport::ServerTest *mServerTest;
00158     KMail::SieveConfigEditor *mSieveConfigEditor;
00159     QRegExpValidator *mValidator;
00160     bool mServerTestFailed;
00161 };
00162 
00163 class NamespaceLineEdit: public KLineEdit
00164 {
00165   Q_OBJECT
00166 
00167   public:
00168     NamespaceLineEdit( QWidget* parent );
00169 
00170     const QString& lastText() { return mLastText; }
00171 
00172   public slots:
00173     virtual void setText ( const QString & );
00174 
00175   private:
00176     QString mLastText;
00177 };
00178 
00179 class NamespaceEditDialog: public KDialog
00180 {
00181   Q_OBJECT
00182 
00183   public:
00184     NamespaceEditDialog( QWidget* parent, ImapAccountBase::imapNamespace type,
00185         ImapAccountBase::nsDelimMap* map );
00186 
00187   protected slots:
00188     void slotOk();
00189     void slotRemoveEntry( int );
00190 
00191   private:
00192     ImapAccountBase::imapNamespace mType;
00193     ImapAccountBase::nsDelimMap* mNamespaceMap;
00194     ImapAccountBase::namespaceDelim mDelimMap;
00195     QMap<int, NamespaceLineEdit*> mLineEditMap;
00196     QButtonGroup* mBg;
00197 };
00198 
00199 } // namespace KMail
00200 
00201 #endif

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal