00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef ACCOUNTSETUPDIALOGCONTEXT_H
00019 #define ACCOUNTSETUPDIALOGCONTEXT_H
00020
00021
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
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 #include <KConfig>
00042
00043
00044 #include "constants.h"
00045 #include "encryption.h"
00046 #include "kwalletaccess.h"
00047
00048
00049 #define ID_BUTTON_PASSWORD_DONT_SAVE 1
00050 #define ID_BUTTON_PASSWORD_SAVE_FILE 2
00051 #define ID_BUTTON_PASSWORD_SAVE_KWALLET 3
00052 #define ID_BUTTON_SECLOGIN_NONE 1
00053 #define ID_BUTTON_SECLOGIN_APOP 2
00054 #define ID_BUTTON_SECLOGIN_SASL 3
00055 #define ID_BUTTON_SECTRANSFER_NONE 1
00056 #define ID_BUTTON_SECTRANSFER_SSL 2
00057 #define ID_BUTTON_SECTRANSFER_TLS 3
00058
00059 using namespace Encryption;
00060
00061
00067 class AccountSetupDialogContext : public KDialog
00068 {
00069 Q_OBJECT
00070
00071 public:
00072
00078 AccountSetupDialogContext( QWidget* parent, QString accountName );
00079
00083 ~AccountSetupDialogContext();
00084
00085 private:
00086
00090 QString accName;
00091
00095 KLineEdit* txtAccount;
00096
00100 KLineEdit* txtServer;
00101
00105 KComboBox* cboProtocol;
00106
00110 QSpinBox* spbPort;
00111
00115 KLineEdit* txtUser;
00116
00120 KLineEdit* txtPassword;
00121
00125 QCheckBox* chkActive;
00126
00130 QButtonGroup* grpPasswordStorage;
00131
00135 QButtonGroup* grpSecureTransfer;
00136
00140 QCheckBox* chkAllowUnsecureLogin;
00141
00142
00143
00144 protected slots:
00145
00152 void slotPasswordStorageChanged( int id );
00153
00160 void slotSecureTransferChanged( int id );
00161
00162 protected Q_SLOTS:
00163
00172 virtual void slotButtonClicked( int button );
00173
00174 protected:
00175
00179 void load();
00180
00184 void save();
00185
00190 void enableLoginCheckbox();
00191
00192
00193 };
00194
00195 #endif