KVIrc 5.2.4
Developer APIs
KviCryptController.h
Go to the documentation of this file.
1#ifndef _KVI_CRYPTCONTROLLER_H_
2#define _KVI_CRYPTCONTROLLER_H_
3//=============================================================================
4//
5// File : KviCryptController.h
6// Creation date : Fri Nov 03 2000 14:11:03 CEST by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
10//
11// This program is FREE software. You can redistribute it and/or
12// modify it under the terms of the GNU General Public License
13// as published by the Free Software Foundation; either version 2
14// of the License, or (at your option) any later version.
15//
16// This program is distributed in the HOPE that it will be USEFUL,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19// See the GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program. If not, write to the Free Software Foundation,
23// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24//
25//=============================================================================
26
27#include "kvi_settings.h"
28
29#if defined(COMPILE_CRYPT_SUPPORT)
32#include "KviHeapObject.h"
33#include "KviTalListWidget.h"
34#include "KviWindowToolWidget.h"
35
36#include <QString>
37
38class KviCryptEngine;
39class KviWindow;
40class QCheckBox;
41class QLabel;
42class QLineEdit;
43class QPushButton;
44class QTextEdit;
45class QWidget;
46
47class KVIRC_API KviCryptSessionInfo : public KviHeapObject
48{
49public:
50 KviCryptEngine * m_pEngine;
51 QString m_szEngineName;
52 bool m_bDoEncrypt;
53 bool m_bDoDecrypt;
54};
55
56class KVIRC_API KviEngineListBoxItem : public KviTalListWidgetText
57{
58 friend class KviCryptController;
59
60public:
61 KviEngineListBoxItem(KviTalListWidget * lb, KviCryptEngineDescription * d, const char * modName);
62 ~KviEngineListBoxItem();
63
64public:
65 QString m_szName;
66 QString m_szAuthor;
67 QString m_szDescription;
68 QString m_szModuleName;
69 int m_iFlags;
70};
71
72class KVIRC_API KviCryptController : public KviWindowToolWidget
73{
74 Q_OBJECT
75public:
76 KviCryptController(QWidget * pParent, KviWindowToolPageButton * pButton, KviWindow * pWnd, KviCryptSessionInfo * pInfo);
77 ~KviCryptController();
78
79protected:
80 KviWindow * m_pWindow;
81 KviTalListWidget * m_pListBox;
82 QPushButton * m_pOkButton;
83 QCheckBox * m_pEnableCheck;
84 QTextEdit * m_pDescriptionText;
85 QLabel * m_pAuthorLabel;
86 QCheckBox * m_pEnableEncrypt;
87 QLabel * m_pEncryptKeyLabel;
88 QLineEdit * m_pEncryptKeyEdit;
89 QCheckBox * m_pEncryptHexKeyCheck;
90 QCheckBox * m_pEnableDecrypt;
91 QLabel * m_pDecryptKeyLabel;
92 QLineEdit * m_pDecryptKeyEdit;
93 QCheckBox * m_pDecryptHexKeyCheck;
94 KviEngineListBoxItem * m_pLastItem;
95 KviCryptSessionInfo * m_pSessionInfo;
96private slots:
97 void enableCheckToggled(bool bChecked);
98 void engineHighlighted(QListWidgetItem * pItem, QListWidgetItem *);
99 void okClicked();
100
101public:
102 KviCryptSessionInfo * getNewSessionInfo();
103 static KviCryptSessionInfo * allocateCryptSessionInfo();
104 static void destroyCryptSessionInfo(KviCryptSessionInfo ** ppInfo);
105
106private:
107 void fillEngineList();
108 void noEnginesAvailable();
109 void enableWidgets(bool bEnabled);
110 bool initializeEngine(KviCryptEngine * pEngine);
111signals:
112 void done();
113};
114#endif //COMPILE_CRYPT_SUPPORT
115
116#endif
Heap Object.
Definition KviCryptEngine.h:54
Definition KviHeapObject.h:119
Definition KviTalListWidget.h:64
Definition KviTalListWidget.h:35
Definition KviWindowToolWidget.h:47
Definition KviWindowToolWidget.h:36
Base class for all windows in KVIrc.
Definition KviWindow.h:75
#define d
Definition detector.cpp:69
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127
void done()
Definition KviKvs.cpp:50