~ubuntu-branches/ubuntu/trusty/kvirc/trusty

« back to all changes in this revision

Viewing changes to src/modules/addon/packaddondialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Kai Wasserbäch, Kai Wasserbäch, Raúl Sánchez Siles
  • Date: 2011-02-12 10:40:21 UTC
  • mfrom: (14.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110212104021-5mh4f75jlku20mnt
The combined "Twisted Experiment" and "Nocturnal Raid" release.

[ Kai Wasserbäch ]
* Synced to upstream's SVN revision 5467.
* debian/rules:
  - Added .PHONY line.
  - Resurrect -DMANUAL_REVISION, got lost somewhere and we build SVN
    revisions again.
  - Replace "-DWITH_NO_EMBEDDED_CODE=YES" with "-DWANT_CRYPTOPP=YES".
  - Change the remaining -DWITH/-DWITHOUT to the new -DWANT syntax.
* debian/control:
  - Removed DMUA, I'm a DD now.
  - Changed my e-mail address.
  - Removed unneeded relationships (no upgrades over two releases are
    supported).
  - Fix Suggests for kvirc-dbg.
  - kvirc-data: Make the "Suggests: kvirc" a Recommends, doesn't make much
    sense to install the -data package without the program.
* debian/source/local-options: Added with "unapply-patches".
* debian/kvirc.lintian-overrides: Updated to work for 4.1.1.
* debian/patches/21_make_shared-mime-info_B-D_superfluous.patch: Updated.
* debian/kvirc-data.install: Added .notifyrc.

[ Raúl Sánchez Siles ]
* Stating the right version where kvirc-data break and replace should happen.
* Fixing link to license file.
* Added French and Portuguese man pages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 opinion) 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
 
/**
28
 
* \file packaddondialog.h
29
 
* \author Elvio Basello
30
 
* \brief Addon package creator
31
 
*
32
 
* This set of classes allow users to create addon for KVIrc in a standard
33
 
* distributable *.kva packages.
34
 
*/
35
 
 
36
 
#include "kvi_settings.h"
37
 
#include "kvi_pointerlist.h"
38
 
#include "kvi_selectors.h"
39
 
 
40
 
#include <QWizard>
41
 
#include <QWizardPage>
42
 
 
43
 
class QTextEdit;
44
 
class QLineEdit;
45
 
class QLabel;
46
 
 
47
 
class KviPackageWriter;
48
 
 
49
 
class KviPackAddonInfoPackageWidget;
50
 
class KviPackAddonFileSelectionWidget;
51
 
class KviPackAddonSaveSelectionWidget;
52
 
class KviPackAddonSummaryInfoWidget;
53
 
class KviPackAddonSummaryFilesWidget;
54
 
 
55
 
/**
56
 
* \class KviPackAddonDialog
57
 
* \brief Wizard for addon creation
58
 
*/
59
 
class KviPackAddonDialog : public QWizard
60
 
{
61
 
        Q_OBJECT
62
 
public:
63
 
        /**
64
 
        * \brief Create the wizard object
65
 
        * \param pParent The parent widget
66
 
        * \return KviPackAddonDialog
67
 
        */
68
 
        KviPackAddonDialog(QWidget * pParent);
69
 
 
70
 
        /**
71
 
        * \brief Destroys the wizard object
72
 
        */
73
 
        ~KviPackAddonDialog();
74
 
protected:
75
 
        KviPackAddonInfoPackageWidget   * m_pPackAddonInfoPackageWidget;
76
 
        KviPackAddonFileSelectionWidget * m_pPackAddonFileSelectionWidget;
77
 
        KviPackAddonSaveSelectionWidget * m_pPackAddonSaveSelectionWidget;
78
 
        KviPackAddonSummaryInfoWidget   * m_pPackAddonSummaryInfoWidget;
79
 
        KviPackAddonSummaryFilesWidget  * m_pPackAddonSummaryFilesWidget;
80
 
        QString                           m_szAuthor;
81
 
        QString                           m_szName;
82
 
        QString                           m_szVersion;
83
 
        QString                           m_szDescription;
84
 
        QString                           m_szMinVersion;
85
 
        QString                           m_szIcon;
86
 
        QString                           m_szDirPath;
87
 
        QString                           m_szSavePath;
88
 
protected:
89
 
        /**
90
 
        * \brief Runs the packAddon() function and closes the wizard
91
 
        * \return void
92
 
        */
93
 
        virtual void accept();
94
 
 
95
 
        /**
96
 
        * \brief Creates the addon package
97
 
        * \return bool
98
 
        */
99
 
        bool packAddon();
100
 
 
101
 
        /**
102
 
        * \brief Ensures the sources directory is complete
103
 
        * \param pszError The buffer containing errors
104
 
        * \param pszWarning The buffer containing warnings
105
 
        * \return bool
106
 
        */
107
 
        bool checkDirTree(QString * pszError, QString * pszWarning);
108
 
 
109
 
        /**
110
 
        * \brief Creates the installer file
111
 
        * \param pszError The buffer containing errors
112
 
        * \return bool
113
 
        */
114
 
        bool createInstaller(QString * pszError);
115
 
};
116
 
 
117
 
/**
118
 
* \class KviPackAddonInfoPackageWidget
119
 
* \brief Wizard page for addon information
120
 
*/
121
 
class KviPackAddonInfoPackageWidget : public QWizardPage
122
 
{
123
 
        Q_OBJECT
124
 
public:
125
 
        /**
126
 
        * \brief Create the wizard package info page object
127
 
        * \param pParent The parent widget
128
 
        * \return KviPackAddonInfoPackageWidget
129
 
        */
130
 
        KviPackAddonInfoPackageWidget(KviPackAddonDialog * pParent);
131
 
 
132
 
        /**
133
 
        * \brief Destroys the wizard package info page object
134
 
        */
135
 
        ~KviPackAddonInfoPackageWidget();
136
 
protected:
137
 
        QLineEdit * m_pPackageAuthorEdit;
138
 
        QLineEdit * m_pPackageNameEdit;
139
 
        QLineEdit * m_pPackageVersionEdit;
140
 
        QLineEdit * m_pPackageDescriptionEdit;
141
 
        QLineEdit * m_pPackageMinVersionEdit;
142
 
};
143
 
 
144
 
/**
145
 
* \class KviPackAddonFileSelectionWidget
146
 
* \brief Wizard page for directory source selection
147
 
*/
148
 
class KviPackAddonFileSelectionWidget : public QWizardPage
149
 
{
150
 
        Q_OBJECT
151
 
public:
152
 
        /**
153
 
        * \brief Create the wizard package source dir object
154
 
        * \param pParent The parent widget
155
 
        * \return KviPackAddonFileSelectionWidget
156
 
        */
157
 
        KviPackAddonFileSelectionWidget(KviPackAddonDialog * pParent);
158
 
 
159
 
        /**
160
 
        * \brief Destroys the wizard package source dir object
161
 
        */
162
 
        ~KviPackAddonFileSelectionWidget();
163
 
protected:
164
 
        KviDirectorySelector * m_pDirPathSelector;
165
 
        KviFileSelector      * m_pPackageIconEdit;
166
 
        QString                m_szDirPath;
167
 
        QString                m_szPackageIcon;
168
 
};
169
 
 
170
 
/**
171
 
* \class KviPackAddonSaveSelectionWidget
172
 
* \brief Wizard page for saving package
173
 
*/
174
 
class KviPackAddonSaveSelectionWidget : public QWizardPage
175
 
{
176
 
        Q_OBJECT
177
 
public:
178
 
        /**
179
 
        * \brief Create the wizard save page object
180
 
        * \param pParent The parent widget
181
 
        * \return KviPackAddonSaveSelectionWidget
182
 
        */
183
 
        KviPackAddonSaveSelectionWidget(KviPackAddonDialog * pParent);
184
 
 
185
 
        /**
186
 
        * \brief Destroys the wizard save page object
187
 
        */
188
 
        ~KviPackAddonSaveSelectionWidget();
189
 
protected:
190
 
        KviFileSelector * m_pSavePathSelector;
191
 
        QString m_szFilePath;
192
 
protected:
193
 
        /**
194
 
        * \brief Perform initial tasks before showing the widget
195
 
        * \return void
196
 
        */
197
 
        virtual void initializePage();
198
 
};
199
 
 
200
 
/**
201
 
* \class KviPackAddonSummaryInfoWidget
202
 
* \brief Wizard page for showing information inserted
203
 
*/
204
 
class KviPackAddonSummaryInfoWidget : public QWizardPage
205
 
{
206
 
        Q_OBJECT
207
 
public:
208
 
        /**
209
 
        * \brief Create the wizard summary info page object
210
 
        * \param pParent The parent widget
211
 
        * \return KviPackAddonSummaryInfoWidget
212
 
        */
213
 
        KviPackAddonSummaryInfoWidget(KviPackAddonDialog * pParent);
214
 
 
215
 
        /**
216
 
        * \brief Destroys the wizard summary info page object
217
 
        */
218
 
        ~KviPackAddonSummaryInfoWidget();
219
 
protected:
220
 
        QLabel * m_pLabelInfo;
221
 
        QLabel * m_pLabelAuthor;
222
 
        QLabel * m_pPackageName;
223
 
        QLabel * m_pPackageVersion;
224
 
        QLabel * m_pPackageDescription;
225
 
protected:
226
 
        /**
227
 
        * \brief Perform initial tasks before showing the widget
228
 
        * \return void
229
 
        */
230
 
        virtual void initializePage();
231
 
};
232
 
 
233
 
 
234
 
class KviPackAddonSummaryFilesWidget : public QDialog
235
 
{
236
 
        Q_OBJECT
237
 
public:
238
 
        KviPackAddonSummaryFilesWidget(KviPackAddonDialog * pParent);
239
 
        ~KviPackAddonSummaryFilesWidget();
240
 
protected:
241
 
        QTextEdit * m_pFiles;
242
 
        QString     m_szPath;
243
 
public:
244
 
        void setPath(QString & szPath){ m_szPath = szPath; };
245
 
protected:
246
 
        virtual void showEvent(QShowEvent *);
247
 
        virtual void accept();
248
 
        virtual void reject();
249
 
};
250
 
 
251
 
#endif //!_PACKADDONDIALOG_H_