KVIrc  4.9.2
DeveloperAPIs
PackAddonDialog.h
Go to the documentation of this file.
1 #ifndef _PACKADDONDIALOG_H_
2 #define _PACKADDONDIALOG_H_
3 //=============================================================================
4 //
5 // File : PackAddonDialog.h
6 // Creation date : Sat 03 May 2008 01:40:44 by Elvio Basello
7 //
8 // This file is part of the KVIrc IRC Client distribution
9 // Copyright (C) 2008-2009 Elvio Basello <hellvis69 at netsons dot org>
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 
36 #include "kvi_settings.h"
37 #include "KviPointerList.h"
38 #include "KviSelectors.h"
39 
40 #include <QWizard>
41 #include <QWizardPage>
42 
43 class QTextEdit;
44 class QLineEdit;
45 class QLabel;
46 
47 class KviPackageWriter;
48 
54 
59 class PackAddonDialog : public QWizard
60 {
61  Q_OBJECT
62 public:
68  PackAddonDialog(QWidget * pParent);
69 
74 
75 protected:
81  QString m_szAuthor;
82  QString m_szName;
83  QString m_szVersion;
84  QString m_szDescription;
85  QString m_szMinVersion;
86  QString m_szIcon;
87  QString m_szDirPath;
88  QString m_szSavePath;
89 
90 protected:
95  virtual void accept();
96 
101  bool packAddon();
102 
103 #if 0
104 
109  bool checkDirTree(QString * pszError);
110 
116  bool createInstaller(QString * pszError);
117 #endif
118 };
119 
124 class PackAddonInfoPackageWidget : public QWizardPage
125 {
126  Q_OBJECT
127 public:
134 
139 
140 protected:
141  QLineEdit * m_pPackageAuthorEdit;
142  QLineEdit * m_pPackageNameEdit;
146 };
147 
152 class PackAddonFileSelectionWidget : public QWizardPage
153 {
154  Q_OBJECT
155 public:
162 
167 
168 protected:
171  QString m_szDirPath;
173 };
174 
179 class PackAddonSaveSelectionWidget : public QWizardPage
180 {
181  Q_OBJECT
182 public:
189 
194 
195 protected:
197  QString m_szFilePath;
198 
199 protected:
204  virtual void initializePage();
205 };
206 
211 class PackAddonSummaryInfoWidget : public QWizardPage
212 {
213  Q_OBJECT
214 public:
221 
226 
227 protected:
228  QLabel * m_pLabelInfo;
229  QLabel * m_pLabelAuthor;
230  QLabel * m_pPackageName;
233 
234 protected:
239  virtual void initializePage();
240 };
241 
242 class PackAddonSummaryFilesWidget : public QDialog
243 {
244  Q_OBJECT
245 public:
248 
249 protected:
250  QTextEdit * m_pFiles;
251  QString m_szPath;
252 
253 public:
254  void setPath(QString & szPath) { m_szPath = szPath; };
255 protected:
256  virtual void showEvent(QShowEvent *);
257 protected slots:
258  virtual void accept();
259  virtual void reject();
260 };
261 
262 #endif
~PackAddonFileSelectionWidget()
Destroys the wizard package source dir object.
Definition: KviSelectors.h:215
virtual void reject()
Definition: PackAddonDialog.cpp:422
QLineEdit * m_pPackageDescriptionEdit
Definition: PackAddonDialog.h:144
PackAddonSummaryFilesWidget * m_pPackAddonSummaryFilesWidget
Definition: PackAddonDialog.h:80
PackAddonDialog(QWidget *pParent)
Creates the wizard object.
Definition: PackAddonDialog.cpp:44
KviFileSelector * m_pPackageImageEdit
Definition: PackAddonDialog.h:170
QString m_szIcon
Definition: PackAddonDialog.h:86
KviFileSelector * m_pSavePathSelector
Definition: PackAddonDialog.h:196
~PackAddonSummaryInfoWidget()
Destroys the wizard summary info page object.
PackAddonSummaryFilesWidget(PackAddonDialog *pParent)
Definition: PackAddonDialog.cpp:385
virtual void accept()
Definition: PackAddonDialog.cpp:417
virtual void initializePage()
Perform initial tasks before showing the widget.
Definition: PackAddonDialog.cpp:305
PackAddonInfoPackageWidget * m_pPackAddonInfoPackageWidget
Definition: PackAddonDialog.h:76
PackAddonSummaryInfoWidget * m_pPackAddonSummaryInfoWidget
Definition: PackAddonDialog.h:79
QLabel * m_pPackageVersion
Definition: PackAddonDialog.h:231
QLineEdit * m_pPackageMinVersionEdit
Definition: PackAddonDialog.h:145
~PackAddonDialog()
Destroys the wizard object.
PackAddonFileSelectionWidget * m_pPackAddonFileSelectionWidget
Definition: PackAddonDialog.h:77
QTextEdit * m_pFiles
Definition: PackAddonDialog.h:250
QString m_szVersion
Definition: PackAddonDialog.h:83
Wizard page for showing information inserted.
Definition: PackAddonDialog.h:211
Wizard for addon creation.
Definition: PackAddonDialog.h:59
bool checkDirTree(const QString &szDirPath, QString *pszError)
Definition: AddonFunctions.cpp:272
QLineEdit * m_pPackageVersionEdit
Definition: PackAddonDialog.h:143
KviDirectorySelector * m_pDirPathSelector
Definition: PackAddonDialog.h:169
Wizard page for saving package.
Definition: PackAddonDialog.h:179
QString m_szPath
Definition: PackAddonDialog.h:251
bool packAddon()
Creates the addon package.
Definition: PackAddonDialog.cpp:131
QLineEdit * m_pPackageAuthorEdit
Definition: PackAddonDialog.h:141
QString m_szName
Definition: PackAddonDialog.h:82
QLabel * m_pPackageDescription
Definition: PackAddonDialog.h:232
QString m_szSavePath
Definition: PackAddonDialog.h:88
~PackAddonSaveSelectionWidget()
Destroys the wizard save page object.
PackAddonSaveSelectionWidget * m_pPackAddonSaveSelectionWidget
Definition: PackAddonDialog.h:78
QLabel * m_pLabelInfo
Definition: PackAddonDialog.h:228
Wizard page for directory source selection.
Definition: PackAddonDialog.h:152
This class is used to create KVIrc package files.
Definition: KviPackageWriter.h:53
Definition: PackAddonDialog.h:242
Definition: KviSelectors.h:256
QString m_szPackageImage
Definition: PackAddonDialog.h:172
QString m_szDescription
Definition: PackAddonDialog.h:84
C++ Template based double linked pointer list class.
QLabel * m_pPackageName
Definition: PackAddonDialog.h:230
PackAddonSaveSelectionWidget(PackAddonDialog *pParent)
Create the wizard save page object.
Definition: PackAddonDialog.cpp:279
~PackAddonInfoPackageWidget()
Destroys the wizard package info page object.
virtual void initializePage()
Perform initial tasks before showing the widget.
Definition: PackAddonDialog.cpp:336
PackAddonSummaryInfoWidget(PackAddonDialog *pParent)
Create the wizard summary info page object.
Definition: PackAddonDialog.cpp:321
void setPath(QString &szPath)
Definition: PackAddonDialog.h:254
virtual void showEvent(QShowEvent *)
Definition: PackAddonDialog.cpp:427
Wizard page for addon information.
Definition: PackAddonDialog.h:124
QString m_szDirPath
Definition: PackAddonDialog.h:87
QString m_szMinVersion
Definition: PackAddonDialog.h:85
QString m_szDirPath
Definition: PackAddonDialog.h:171
QString m_szFilePath
Definition: PackAddonDialog.h:197
QLabel * m_pLabelAuthor
Definition: PackAddonDialog.h:229
QString m_szAuthor
Definition: PackAddonDialog.h:81
This file contains compile time settings.
PackAddonInfoPackageWidget(PackAddonDialog *pParent)
Create the wizard package info page object.
Definition: PackAddonDialog.cpp:190
virtual void accept()
Runs the packAddon() function and closes the wizard.
Definition: PackAddonDialog.cpp:124
PackAddonFileSelectionWidget(PackAddonDialog *pParent)
Create the wizard package source dir object.
Definition: PackAddonDialog.cpp:254
QLineEdit * m_pPackageNameEdit
Definition: PackAddonDialog.h:142