Imrpvoed the importer.

This commit is contained in:
Roberto Raggi
2009-03-13 15:12:54 +01:00
parent 78210a5cc2
commit d690a844b4
5 changed files with 343 additions and 36 deletions

View File

@@ -2,10 +2,53 @@
#define GENERICPROJECTWIZARD_H
#include <coreplugin/basefilewizard.h>
#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
namespace GenericProjectManager {
namespace Internal {
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 _firstPageId;
int _secondPageId;
Core::Utils::PathChooser *_pathChooser;
QTreeView *_dirView;
QDirModel *_dirModel;
QListView *_filesView;
QDirModel *_filesModel;
};
class GenericProjectWizard : public Core::BaseFileWizard
{
Q_OBJECT
@@ -25,6 +68,13 @@ protected:
QString *errorMessage) const;
virtual bool postGenerateFiles(const Core::GeneratedFiles &l, QString *errorMessage);
bool isValidDir(const QFileInfo &fileInfo) const;
void getFileList(const QDir &dir, const QString &projectRoot,
const QStringList &suffixes,
QStringList *files,
QStringList *paths) const;
};
} // end of namespace Internal