blob: a34c228856728bf784b34739ead8ca2936084a48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
//! [0]
#ifndef WEBPAGEFILEWIZARD_H
#define WEBPAGEFILEWIZARD_H
#include "basefilewizard.h"
#include "utils/filewizarddialog.h"
#include <QtGui/QWizardPage>
QT_BEGIN_NAMESPACE
class QLineEdit;
class QPlainTextEdit;
QT_END_NAMESPACE
namespace MyPlugin {
namespace Internal {
//! [1]
class WebContentPageWizardPage : public QWizardPage
{
Q_OBJECT
public:
explicit WebContentPageWizardPage(QWidget *parent = 0);
QString title() const;
QString contents() const;
virtual bool isComplete() const { return m_complete; }
private slots:
void slotChanged();
private:
QLineEdit *m_titleLineEdit;
QPlainTextEdit *m_textEdit;
bool m_complete;
};
//! [1] //! [2]
class WebContentWizardDialog : public Utils::FileWizardDialog
{
Q_OBJECT
public:
explicit WebContentWizardDialog(QWidget *parent = 0);
QString title() const { return m_contentPage->title(); }
QString contents() const { return m_contentPage->contents(); }
private:
WebContentPageWizardPage *m_contentPage;
};
//! [2] //! [3]
class WebPageWizard : public Core::BaseFileWizard
{
public:
explicit WebPageWizard(const Core::BaseFileWizardParameters ¶meters,
QObject *parent = 0);
protected:
virtual QWizard *createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const;
virtual Core::GeneratedFiles generateFiles(const QWizard *w,
QString *errorMessage) const;
};
//! [3]
} // namespace Internal
} // namespace MyPlugin
#endif // WEBPAGEFILEWIZARD_H
//! [0]
|