00001 /* 00002 Copyright 2010 Ulrich Weigelt <ulrich.weigelt@gmx.de> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License as 00006 published by the Free Software Foundation; either version 2 of 00007 the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef ACCOUNTSETUPDIALOG_H 00019 #define ACCOUNTSETUPDIALOG_H 00020 00021 //Qt headers 00022 #include <qlayout.h> 00023 #include <qlabel.h> 00024 #include <qtooltip.h> 00025 #include <qspinbox.h> 00026 #include <qgroupbox.h> 00027 #include <qbuttongroup.h> 00028 #include <qradiobutton.h> 00029 #include <qcheckbox.h> 00030 #include <QTreeWidget> 00031 00032 //KDE headers 00033 #include <KDialog> 00034 #include <klocale.h> 00035 #include <klineedit.h> 00036 #include <kcombobox.h> 00037 #include <kdebug.h> 00038 #include <kmessagebox.h> 00039 #include <KPasswordDialog> 00040 #include <ktabwidget.h> 00041 00042 //KShowmail headers 00043 #include "accountsetupitem.h" 00044 #include "constants.h" 00045 00046 //radio button IDs 00047 #define ID_BUTTON_PASSWORD_DONT_SAVE 1 00048 #define ID_BUTTON_PASSWORD_SAVE_FILE 2 00049 #define ID_BUTTON_PASSWORD_SAVE_KWALLET 3 00050 #define ID_BUTTON_SECLOGIN_NONE 1 00051 #define ID_BUTTON_SECLOGIN_APOP 2 00052 #define ID_BUTTON_SECLOGIN_SASL 3 00053 #define ID_BUTTON_SECTRANSFER_NONE 1 00054 #define ID_BUTTON_SECTRANSFER_SSL 2 00055 #define ID_BUTTON_SECTRANSFER_TLS 3 00056 00062 class AccountSetupDialog : public KDialog 00063 { 00064 Q_OBJECT 00065 00066 public: 00067 00074 AccountSetupDialog( QWidget* parent, QTreeWidget* view, AccountSetupItem* item = NULL ); 00075 00079 ~AccountSetupDialog(); 00080 00081 private: 00082 00086 AccountSetupItem* account; 00087 00091 QTreeWidget* listView; 00092 00096 KLineEdit* txtAccount; 00097 00101 KLineEdit* txtServer; 00102 00106 KComboBox* cboProtocol; 00107 00111 QSpinBox* spbPort; 00112 00116 KLineEdit* txtUser; 00117 00121 KLineEdit* txtPassword; 00122 00126 QCheckBox* chkActive; 00127 00131 QButtonGroup* grpPasswordStorage; 00132 00136 QButtonGroup* grpSecureTransfer; 00137 00141 QCheckBox* chkAllowUnsecureLogin; 00142 00143 00144 00145 protected slots: 00146 00153 void slotPasswordStorageChanged( int id ); 00154 00161 void slotSecureTransferChanged( int id ); 00162 00163 protected Q_SLOTS: 00172 virtual void slotButtonClicked( int button ); 00173 00174 protected: 00175 00179 void fillDialog(); 00180 00185 void enableLoginCheckbox(); 00186 00187 }; 00188 00189 #endif