KVIrc 5.2.6
Developer APIs
KviPackageIOEngine.h
Go to the documentation of this file.
1#ifndef _KviPackageIOEngine_h_
2#define _KviPackageIOEngine_h_
3//=============================================================================
4//
5// File : KviPackageIOEngine.h
6// Creation date : Tue 26 Dec 2006 05:33:33 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC Client distribution
9// Copyright (C) 2006-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
33#include "kvi_settings.h"
34
35#include "KviPointerHashTable.h"
36
37#include <QString>
38
39class QByteArray;
40class QProgressDialog;
41class QLabel;
42
43#define KVI_PACKAGE_INFOFIELD_TYPE_STRING 1
44#define KVI_PACKAGE_INFOFIELD_TYPE_BINARYBUFFER 2
45#define KVI_PACKAGE_DATAFIELD_TYPE_FILE 1
46#define KVI_PACKAGE_DATAFIELD_FLAG_FILE_DEFLATE 1
47
53{
54public:
60
64 virtual ~KviPackageIOEngine();
65
66private:
70 QProgressDialog * m_pProgressDialog;
71 QLabel * m_pProgressDialogLabel = nullptr;
72
73public:
78 const QString & lastError() { return m_szLastError; };
79
84 KviPointerHashTable<QString, QString> * stringInfoFields() { return m_pStringInfoFields; };
85
91protected:
97 void setLastError(const QString & szLastError) { m_szLastError = szLastError; };
98
105 void showProgressDialog(const QString & szCaption, int iTotalSteps);
106
111 void hideProgressDialog();
112
119 bool updateProgress(int iProgress, const QString & szLabel);
120
127 bool writeError();
128
135 bool readError();
136};
137
138#endif //_KviPackageIOEngine_h_
Pointer Hash Table.
This class is the base class engine to work with KVIrc package files.
Definition KviPackageIOEngine.h:53
void setLastError(const QString &szLastError)
Sets the last error.
Definition KviPackageIOEngine.h:97
KviPointerHashTable< QString, QByteArray > * m_pBinaryInfoFields
Definition KviPackageIOEngine.h:69
QProgressDialog * m_pProgressDialog
Definition KviPackageIOEngine.h:70
KviPointerHashTable< QString, QString > * stringInfoFields()
Returns the string info fields.
Definition KviPackageIOEngine.h:84
KviPointerHashTable< QString, QString > * m_pStringInfoFields
Definition KviPackageIOEngine.h:68
QString m_szLastError
Definition KviPackageIOEngine.h:67
const QString & lastError()
Returns the last error.
Definition KviPackageIOEngine.h:78
KviPointerHashTable< QString, QByteArray > * binaryInfoFields()
Returns the binary info fields.
Definition KviPackageIOEngine.h:90
A fast pointer hash table implementation.
Definition KviPointerHashTable.h:450
This file contains compile time settings.
#define KVILIB_API
Definition kvi_settings.h:124