Files
qt-creator/src/plugins/genericprojectmanager/genericprojectwizard.h

84 lines
2.0 KiB
C
Raw Normal View History

2009-03-12 17:53:25 +01:00
#ifndef GENERICPROJECTWIZARD_H
#define GENERICPROJECTWIZARD_H
#include <coreplugin/basefilewizard.h>
2009-03-13 15:12:54 +01:00
#include <utils/pathchooser.h>
#include <QWizard>
QT_BEGIN_NAMESPACE
class QListView;
class QTreeView;
class QDirModel;
class QModelIndex;
class QDir;
class QStringList;
class QFileInfo;
QT_END_NAMESPACE
2009-03-12 17:53:25 +01:00
namespace GenericProjectManager {
namespace Internal {
2009-03-13 15:12:54 +01:00
class GenericProjectWizardDialog: public QWizard
{
Q_OBJECT
public:
GenericProjectWizardDialog(QWidget *parent = 0);
virtual ~GenericProjectWizardDialog();
QString path() const;
private Q_SLOTS:
void updateFilesView(const QModelIndex &current,
const QModelIndex &previous);
protected:
virtual void initializePage(int id);
virtual bool validateCurrentPage();
private:
int m_firstPageId;
int m_secondPageId;
2009-03-13 15:12:54 +01:00
Core::Utils::PathChooser *m_pathChooser;
2009-03-13 15:12:54 +01:00
QTreeView *m_dirView;
QDirModel *m_dirModel;
2009-03-13 15:12:54 +01:00
QListView *m_filesView;
QDirModel *m_filesModel;
2009-03-13 15:12:54 +01:00
};
2009-03-12 17:53:25 +01:00
class GenericProjectWizard : public Core::BaseFileWizard
{
Q_OBJECT
public:
GenericProjectWizard();
virtual ~GenericProjectWizard();
static Core::BaseFileWizardParameters parameters();
protected:
virtual QWizard *createWizardDialog(QWidget *parent,
const QString &defaultPath,
const WizardPageList &extensionPages) const;
virtual Core::GeneratedFiles generateFiles(const QWizard *w,
QString *errorMessage) const;
2009-03-12 18:31:50 +01:00
virtual bool postGenerateFiles(const Core::GeneratedFiles &l, QString *errorMessage);
2009-03-13 15:12:54 +01:00
bool isValidDir(const QFileInfo &fileInfo) const;
void getFileList(const QDir &dir, const QString &projectRoot,
const QStringList &suffixes,
QStringList *files,
QStringList *paths) const;
2009-03-12 17:53:25 +01:00
};
} // end of namespace Internal
} // end of namespace GenericProjectManager
#endif // GENERICPROJECTWIZARD_H