1
#ifndef _PACKADDONDIALOG_H_
2
#define _PACKADDONDIALOG_H_
3
//=============================================================================
5
// File : packaddondialog.h
6
// Creation date : Sat 03 May 2008 01:40:44 by Elvio Basello
8
// This file is part of the KVIrc IRC Client distribution
9
// Copyright (C) 2008-2009 Elvio Basello <hellvis69 at netsons dot org>
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 opinion) any later version.
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.
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.
25
//=============================================================================
28
* \file packaddondialog.h
29
* \author Elvio Basello
30
* \brief Addon package creator
32
* This set of classes allow users to create addon for KVIrc in a standard
33
* distributable *.kva packages.
36
#include "kvi_settings.h"
37
#include "kvi_pointerlist.h"
38
#include "kvi_selectors.h"
41
#include <QWizardPage>
47
class KviPackageWriter;
49
class KviPackAddonInfoPackageWidget;
50
class KviPackAddonFileSelectionWidget;
51
class KviPackAddonSaveSelectionWidget;
52
class KviPackAddonSummaryInfoWidget;
53
class KviPackAddonSummaryFilesWidget;
56
* \class KviPackAddonDialog
57
* \brief Wizard for addon creation
59
class KviPackAddonDialog : public QWizard
64
* \brief Create the wizard object
65
* \param pParent The parent widget
66
* \return KviPackAddonDialog
68
KviPackAddonDialog(QWidget * pParent);
71
* \brief Destroys the wizard object
73
~KviPackAddonDialog();
75
KviPackAddonInfoPackageWidget * m_pPackAddonInfoPackageWidget;
76
KviPackAddonFileSelectionWidget * m_pPackAddonFileSelectionWidget;
77
KviPackAddonSaveSelectionWidget * m_pPackAddonSaveSelectionWidget;
78
KviPackAddonSummaryInfoWidget * m_pPackAddonSummaryInfoWidget;
79
KviPackAddonSummaryFilesWidget * m_pPackAddonSummaryFilesWidget;
83
QString m_szDescription;
84
QString m_szMinVersion;
90
* \brief Runs the packAddon() function and closes the wizard
93
virtual void accept();
96
* \brief Creates the addon package
102
* \brief Ensures the sources directory is complete
103
* \param pszError The buffer containing errors
104
* \param pszWarning The buffer containing warnings
107
bool checkDirTree(QString * pszError, QString * pszWarning);
110
* \brief Creates the installer file
111
* \param pszError The buffer containing errors
114
bool createInstaller(QString * pszError);
118
* \class KviPackAddonInfoPackageWidget
119
* \brief Wizard page for addon information
121
class KviPackAddonInfoPackageWidget : public QWizardPage
126
* \brief Create the wizard package info page object
127
* \param pParent The parent widget
128
* \return KviPackAddonInfoPackageWidget
130
KviPackAddonInfoPackageWidget(KviPackAddonDialog * pParent);
133
* \brief Destroys the wizard package info page object
135
~KviPackAddonInfoPackageWidget();
137
QLineEdit * m_pPackageAuthorEdit;
138
QLineEdit * m_pPackageNameEdit;
139
QLineEdit * m_pPackageVersionEdit;
140
QLineEdit * m_pPackageDescriptionEdit;
141
QLineEdit * m_pPackageMinVersionEdit;
145
* \class KviPackAddonFileSelectionWidget
146
* \brief Wizard page for directory source selection
148
class KviPackAddonFileSelectionWidget : public QWizardPage
153
* \brief Create the wizard package source dir object
154
* \param pParent The parent widget
155
* \return KviPackAddonFileSelectionWidget
157
KviPackAddonFileSelectionWidget(KviPackAddonDialog * pParent);
160
* \brief Destroys the wizard package source dir object
162
~KviPackAddonFileSelectionWidget();
164
KviDirectorySelector * m_pDirPathSelector;
165
KviFileSelector * m_pPackageIconEdit;
167
QString m_szPackageIcon;
171
* \class KviPackAddonSaveSelectionWidget
172
* \brief Wizard page for saving package
174
class KviPackAddonSaveSelectionWidget : public QWizardPage
179
* \brief Create the wizard save page object
180
* \param pParent The parent widget
181
* \return KviPackAddonSaveSelectionWidget
183
KviPackAddonSaveSelectionWidget(KviPackAddonDialog * pParent);
186
* \brief Destroys the wizard save page object
188
~KviPackAddonSaveSelectionWidget();
190
KviFileSelector * m_pSavePathSelector;
191
QString m_szFilePath;
194
* \brief Perform initial tasks before showing the widget
197
virtual void initializePage();
201
* \class KviPackAddonSummaryInfoWidget
202
* \brief Wizard page for showing information inserted
204
class KviPackAddonSummaryInfoWidget : public QWizardPage
209
* \brief Create the wizard summary info page object
210
* \param pParent The parent widget
211
* \return KviPackAddonSummaryInfoWidget
213
KviPackAddonSummaryInfoWidget(KviPackAddonDialog * pParent);
216
* \brief Destroys the wizard summary info page object
218
~KviPackAddonSummaryInfoWidget();
220
QLabel * m_pLabelInfo;
221
QLabel * m_pLabelAuthor;
222
QLabel * m_pPackageName;
223
QLabel * m_pPackageVersion;
224
QLabel * m_pPackageDescription;
227
* \brief Perform initial tasks before showing the widget
230
virtual void initializePage();
234
class KviPackAddonSummaryFilesWidget : public QDialog
238
KviPackAddonSummaryFilesWidget(KviPackAddonDialog * pParent);
239
~KviPackAddonSummaryFilesWidget();
241
QTextEdit * m_pFiles;
244
void setPath(QString & szPath){ m_szPath = szPath; };
246
virtual void showEvent(QShowEvent *);
247
virtual void accept();
248
virtual void reject();
251
#endif //!_PACKADDONDIALOG_H_