diff --git a/doc/pluginhowto/examples/headerfilter/headerfilter.cpp b/doc/pluginhowto/examples/headerfilter/headerfilter.cpp index 5ce16e53df5668d9a7dfdb53e34cbe55f49d9004..7d7056e6f30e72a052cddf4ddc8af6db2ff9d8b1 100644 --- a/doc/pluginhowto/examples/headerfilter/headerfilter.cpp +++ b/doc/pluginhowto/examples/headerfilter/headerfilter.cpp @@ -37,59 +37,62 @@ ****************************************************************************/ #include "headerfilter.h" -#include <projectexplorer/projectexplorer.h> + +#include <extensionsystem/pluginmanager.h> +#include <find/searchresultwindow.h> #include <projectexplorer/iprojectmanager.h> #include <projectexplorer/project.h> +#include <projectexplorer/projectexplorer.h> #include <projectexplorer/session.h> -#include <extensionsystem/pluginmanager.h> -#include <utils/filesearch.h> -#include<QFutureWatcher> -#include<QLabel> -#include <find/searchresultwindow.h> #include <texteditor/basetexteditor.h> +#include <utils/filesearch.h> +#include <QFutureWatcher> +#include <QLabel> using namespace Core; using namespace Utils; -struct HeaderFilterData - { - HeaderFilterData() : m_projectPlugin(0), m_searchResultWindow(0){} - QFutureWatcher<FileSearchResult> watcher; +class HeaderFilterPrivate +{ +public: + HeaderFilterPrivate() + : m_projectPlugin(0), m_searchResultWindow(0) + {} - ProjectExplorer::ProjectExplorerPlugin* projectExplorer() + ProjectExplorer::ProjectExplorerPlugin *projectExplorer() { - if(m_projectPlugin) + if (m_projectPlugin) return m_projectPlugin; - ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); + ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); m_projectPlugin = pm->getObject<ProjectExplorer::ProjectExplorerPlugin>(); return m_projectPlugin; } // Method to search and return the search window - - Find::SearchResultWindow* searchResultWindow() + Find::SearchResultWindow *searchResultWindow() { - if(m_searchResultWindow) + if (m_searchResultWindow) return m_searchResultWindow; - ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); + ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); m_searchResultWindow = pm->getObject<Find::SearchResultWindow>(); return m_searchResultWindow; } - private: - ProjectExplorer::ProjectExplorerPlugin* m_projectPlugin; - Find::SearchResultWindow *m_searchResultWindow; + QFutureWatcher<FileSearchResult> watcher; +private: + ProjectExplorer::ProjectExplorerPlugin *m_projectPlugin; + Find::SearchResultWindow *m_searchResultWindow; }; HeaderFilter::HeaderFilter() { - d = new HeaderFilterData; + d = new HeaderFilterPrivate; d->watcher.setPendingResultsLimit(1); // displayResult(int) is called when every a new @@ -107,20 +110,26 @@ QString HeaderFilter::id() const return "HeaderFilter"; } -QString HeaderFilter::name() const +QString HeaderFilter::displayName() const { return tr("Header Filter"); } -bool HeaderFilter::isEnabled() const +bool HeaderFilter::canCancel() const { - QList<ProjectExplorer::Project*> projects = d->projectExplorer()->session()->projects(); - if(projects.count()) - return true; - return false; } +void HeaderFilter::cancel() +{ +} + +bool HeaderFilter::isEnabled() const +{ + QList<ProjectExplorer::Project *> projects = d->projectExplorer()->session()->projects(); + return !projects.isEmpty(); +} + QKeySequence HeaderFilter::defaultShortcut() const { return QKeySequence(); @@ -128,31 +137,30 @@ QKeySequence HeaderFilter::defaultShortcut() const QWidget *HeaderFilter::createConfigWidget() { - return (new QLabel("This is a header filter")); + return new QLabel("This is a header filter"); } - -void HeaderFilter::findAll(const QString &text,QTextDocument::FindFlags findFlags) - { +void HeaderFilter::findAll(const QString &text, Find::FindFlags findFlags) +{ // Fetch a list of all open projects - QList<ProjectExplorer::Project*> projects = d->projectExplorer()->session()->projects(); + QList<ProjectExplorer::Project *> projects = d->projectExplorer()->session()->projects(); // Make a list of files in each project QStringList files; - Q_FOREACH(ProjectExplorer::Project* project, projects) - files += project->files(ProjectExplorer::Project::AllFiles); + foreach (ProjectExplorer::Project *project, projects) + files += project->files(ProjectExplorer::Project::AllFiles); // Remove duplicates files.removeDuplicates(); //------------------------------------------------------------ // Begin searching - QString includeline = "#include <" + text + ">"; + QString includeline = "#include <" + text + '>'; Find::SearchResult *result = d->searchResultWindow()->startNewSearch(); d->watcher.setFuture(QFuture<FileSearchResult>()); - //When result gets activated it invokes the openEditor function + // When result gets activated it invokes the openEditor function connect(result, SIGNAL(activated(Find::SearchResultItem)), this, SLOT(openEditor(Find::SearchResultItem))); diff --git a/doc/pluginhowto/examples/headerfilter/headerfilter.h b/doc/pluginhowto/examples/headerfilter/headerfilter.h index ebe3127f040ad465a815bf27b95076237f0bf8df..18f4159bb0cdc6e0b01613c052f549de6518c188 100644 --- a/doc/pluginhowto/examples/headerfilter/headerfilter.h +++ b/doc/pluginhowto/examples/headerfilter/headerfilter.h @@ -48,12 +48,13 @@ class SearchResultWindow; struct SearchResultItem; } +QT_BEGIN_NAMESPACE class QKeySequence; class QWidget; +QT_END_NAMESPACE +class HeaderFilterPrivate; - -struct HeaderFilterData; class HeaderFilter : public Find::IFindFilter { Q_OBJECT @@ -61,19 +62,22 @@ class HeaderFilter : public Find::IFindFilter public: HeaderFilter(); ~HeaderFilter(); + QString id() const; - QString name() const; bool isEnabled() const; QKeySequence defaultShortcut() const; - void findAll(const QString &txt,QTextDocument::FindFlags findFlags); + void findAll(const QString &text, Find::FindFlags findFlags); QWidget *createConfigWidget(); + QString displayName() const; + bool canCancel() const; + void cancel(); protected slots: void displayResult(int index); void openEditor(const Find::SearchResultItem &item); private: - HeaderFilterData *d; + HeaderFilterPrivate *d; }; diff --git a/doc/pluginhowto/examples/headerfilter/headerfilterplugin.pro b/doc/pluginhowto/examples/headerfilter/headerfilterplugin.pro index f419d789aec1b2e4b0662ca5b5cb68f0010c1132..3b9a1852dfb783f17898bfe9cb00269ea5433a04 100644 --- a/doc/pluginhowto/examples/headerfilter/headerfilterplugin.pro +++ b/doc/pluginhowto/examples/headerfilter/headerfilterplugin.pro @@ -1,5 +1,7 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build +#QTC_SOURCE = C:/Work/QtCreator +#QTC_BUILD = C:/Work/QtCreator/build +QTC_SOURCE = ../../../.. +QTC_BUILD = ../../../.. DEFINES += FIND_LIBRARY TEMPLATE = lib diff --git a/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.cpp b/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.cpp index 0a513ad85468ec5bbd564928d44c8c6906aabdb7..ba190d9311123e5c64802e66413c1b831f5a0061 100644 --- a/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.cpp +++ b/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.cpp @@ -47,20 +47,15 @@ CustomProjectPlugin::CustomProjectPlugin() // Do nothing } -CustomProjectPlugin::~CustomProjectPlugin() -{ - // Do notning -} - void CustomProjectPlugin::extensionsInitialized() { // Do nothing } -bool CustomProjectPlugin::initialize(const QStringList& args, QString *errMsg) +bool CustomProjectPlugin::initialize(const QStringList &args, QString *errorMessage) { Q_UNUSED(args); - Q_UNUSED(errMsg); + Q_UNUSED(errorMessage); addAutoReleasedObject(new CustomProjectWizard); diff --git a/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.h b/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.h index bed7f782138898ffabcd1a62ecdba59bea945d0e..c227f04d726187708f5fb7f7a84ad8dd509f6bd4 100644 --- a/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.h +++ b/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.h @@ -45,10 +45,9 @@ class CustomProjectPlugin : public ExtensionSystem::IPlugin { public: CustomProjectPlugin(); - ~CustomProjectPlugin(); void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); + bool initialize(const QStringList &arguments, QString *errorString); void shutdown(); }; diff --git a/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.pro b/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.pro index 7b7fca9f2636e1c090846c92ab4ef02cc48a8c53..07a5239be46c218229b9e5e38ae883c874425c52 100644 --- a/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.pro +++ b/doc/pluginhowto/examples/wizard/customproject/customprojectplugin.pro @@ -1,5 +1,7 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build +#QTC_SOURCE = C:/Work/QtCreator +#QTC_BUILD = C:/Work/QtCreator/build +QTC_SOURCE = ../../../../.. +QTC_BUILD = ../../../../.. TEMPLATE = lib TARGET = CustomProject IDE_SOURCE_TREE = $$QTC_SOURCE diff --git a/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.cpp b/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.cpp index f8ff70cee4ada2412a93375357e6afc11834d9c9..6a8626c06cc56f0b6a392621a261e2d985e5d470 100644 --- a/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.cpp +++ b/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.cpp @@ -46,10 +46,6 @@ CustomProjectWizard::CustomProjectWizard() { } -CustomProjectWizard::~CustomProjectWizard() -{ -} - Core::IWizard::Kind CustomProjectWizard::kind() const { return IWizard::ProjectWizard; @@ -65,9 +61,9 @@ QString CustomProjectWizard::description() const return "A custom project"; } -QString CustomProjectWizard::name() const +QString CustomProjectWizard::displayName() const { - return "CustomProject"; + return tr("CustomProject"); } QString CustomProjectWizard::category() const @@ -80,10 +76,9 @@ QString CustomProjectWizard::trCategory() const return tr("FooCompanyInc"); } -QStringList CustomProjectWizard::runWizard(const QString &path, QWidget *parent) +void CustomProjectWizard::runWizard(const QString &path, QWidget *parent) { Q_UNUSED(path); Q_UNUSED(parent); QMessageBox::information(parent, "Custom Wizard Dialog", "Hi there!"); - return QStringList(); } diff --git a/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.h b/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.h index cc2c9862ce7ab1a141fa1517c7f87871c3a6281d..ea522c2665e9566109cb58bd605fda272572e6c5 100644 --- a/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.h +++ b/doc/pluginhowto/examples/wizard/customproject/customprojectwizard.h @@ -45,15 +45,14 @@ class CustomProjectWizard : public Core::IWizard { public: CustomProjectWizard(); - ~CustomProjectWizard(); Core::IWizard::Kind kind() const; QIcon icon() const; QString description() const; - QString name() const; + QString displayName() const; QString category() const; QString trCategory() const; - QStringList runWizard(const QString &path, QWidget *parent); + void runWizard(const QString &path, QWidget *parent); }; #endif // CUSTOMPROJECTWIZARD_H diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp index 287ab8427d27627e444df663d1acb24c37629d91..70aae6a1d76d3426ad9bc598fff49f6531ff9c44 100644 --- a/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp +++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp @@ -38,7 +38,9 @@ #include "itemmodelwizardplugin.h" #include "modelclasswizard.h" + #include <QApplication> +#include <QIcon> #include <QtPlugin> #include <QStringList> @@ -57,10 +59,10 @@ void ItemModelWizardPlugin::extensionsInitialized() // Do nothing } -bool ItemModelWizardPlugin::initialize(const QStringList& args, QString *errMsg) +bool ItemModelWizardPlugin::initialize(const QStringList &args, QString *errorMessage) { Q_UNUSED(args); - Q_UNUSED(errMsg); + Q_UNUSED(errorMessage); Core::BaseFileWizardParameters params; params.setKind(Core::IWizard::ClassWizard); params.setIcon(qApp->windowIcon()); diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h index b61f275d5c2aee604b948500eed1ab9e2415af09..c17ebf3c3cac20eb962fb4458297403e793d2ba5 100644 --- a/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h +++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h @@ -48,7 +48,7 @@ public: ~ItemModelWizardPlugin(); void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); + bool initialize(const QStringList &arguments, QString *errorString); void shutdown(); }; diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro index 3cedbf94d6dbe9db0928b046b01ef12ee8cc2cc0..ce0bb00b15a35de65dfc58d67827210393678157 100644 --- a/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro +++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro @@ -1,5 +1,7 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build +#QTC_SOURCE = C:/Work/QtCreator +#QTC_BUILD = C:/Work/QtCreator/build +QTC_SOURCE = ../../../../.. +QTC_BUILD = ../../../../.. TEMPLATE = lib TARGET = ItemModelWizard IDE_SOURCE_TREE = $$QTC_SOURCE diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.cpp b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.cpp index fc10d70a33adabf6a59e862ed438c98fed1dbf2e..d235881558b62e69d804cada318d015aef6fec02 100644 --- a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.cpp +++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.cpp @@ -39,32 +39,27 @@ #include "modelclasswizard.h" #include "modelnamepage.h" -#include <QFile> -#include <QFileInfo> #include <cppeditor/cppeditor.h> #include <cppeditor/cppeditorconstants.h> #include <coreplugin/basefilewizard.h> -ModelClassWizard::ModelClassWizard(const Core::BaseFileWizardParameters ¶meters,QObject *parent) -: Core::BaseFileWizard(parameters, parent) -{ -} +#include <QFile> +#include <QFileInfo> -ModelClassWizard::~ModelClassWizard() +ModelClassWizard::ModelClassWizard(const Core::BaseFileWizardParameters ¶meters, QObject *parent) + : Core::BaseFileWizard(parameters, parent) { } -QWizard * ModelClassWizard::createWizardDialog( - QWidget *parent, - const QString &defaultPath, - const WizardPageList &extensionPages) const +QWizard *ModelClassWizard::createWizardDialog(QWidget *parent, + const QString &defaultPath, const WizardPageList &extensionPages) const { // Create a wizard - QWizard* wizard = new QWizard(parent); - wizard->setWindowTitle("Model Class Wizard"); + QWizard *wizard = new QWizard(parent); + wizard->setWindowTitle(tr("Model Class Wizard")); // Make our page as first page - ModelNamePage* page = new ModelNamePage(wizard); + ModelNamePage *page = new ModelNamePage(wizard); int pageId = wizard->addPage(page); wizard->setProperty("_PageId_", pageId); page->setPath(defaultPath); @@ -75,32 +70,29 @@ QWizard * ModelClassWizard::createWizardDialog( return wizard; } -QString ModelClassWizard::readFile(const QString& fileName, const QMap<QString,QString>& - replacementMap) const +QString ModelClassWizard::readFile(const QString& fileName, + const QMap<QString,QString> & replacementMap) const { QFile file(fileName); file.open(QFile::ReadOnly); - QString retStr = file.readAll(); + QString result = file.readAll(); QMap<QString,QString>::const_iterator it = replacementMap.begin(); QMap<QString,QString>::const_iterator end = replacementMap.end(); - while(it != end) - { - retStr.replace(it.key(), it.value()); - ++it; - } - return retStr; + for (; it != end; ++it) + result.replace(it.key(), it.value()); + return result; } -Core::GeneratedFiles ModelClassWizard::generateFiles( - const QWizard *w,QString *errorMessage) const +Core::GeneratedFiles ModelClassWizard::generateFiles + (const QWizard *wizard, QString *errorMessage) const { Q_UNUSED(errorMessage); Core::GeneratedFiles ret; - int pageId = w->property("_PageId_").toInt(); - ModelNamePage* page = qobject_cast<ModelNamePage*>(w->page(pageId)); + int pageId = wizard->property("_PageId_").toInt(); + ModelNamePage *page = qobject_cast<ModelNamePage*>(wizard->page(pageId)); - if(!page) + if (!page) return ret; ModelClassParameters params = page->parameters(); QMap<QString,QString> replacementMap; @@ -110,28 +102,25 @@ Core::GeneratedFiles ModelClassWizard::generateFiles( replacementMap["{{CLASS_NAME}}"] = params.className; replacementMap["{{CLASS_HEADER}}"] = QFileInfo(params.headerFile).fileName(); - Core::GeneratedFile headerFile(params.path + "/" + params.headerFile); + Core::GeneratedFile headerFile(params.path + '/' + params.headerFile); headerFile.setEditorKind(CppEditor::Constants::CPPEDITOR_KIND); - Core::GeneratedFile sourceFile(params.path + "/" + params.sourceFile); + Core::GeneratedFile sourceFile(params.path + '/' + params.sourceFile); sourceFile.setEditorKind(CppEditor::Constants::CPPEDITOR_KIND); - if(params.baseClass == "QAbstractItemModel") - { - headerFile.setContents(readFile(":/CustomProject/ItemModelHeader", replacementMap) ); - sourceFile.setContents(readFile(":/CustomProject/ItemModelSource", replacementMap) ); + if (params.baseClass == "QAbstractItemModel") { + headerFile.setContents(readFile(":/CustomProject/ItemModelHeader", replacementMap)); + sourceFile.setContents(readFile(":/CustomProject/ItemModelSource", replacementMap)); } - else if(params.baseClass == "QAbstractTableModel") - { - headerFile.setContents(readFile(":/CustomProject/TableModelHeader", replacementMap) ); - sourceFile.setContents(readFile(":/CustomProject/TableModelSource", replacementMap) ); + else if (params.baseClass == "QAbstractTableModel") { + headerFile.setContents(readFile(":/CustomProject/TableModelHeader", replacementMap)); + sourceFile.setContents(readFile(":/CustomProject/TableModelSource", replacementMap)); } - else if(params.baseClass == "QAbstractListModel") - { - headerFile.setContents(readFile(":/CustomProject/ListModelHeader", replacementMap) ); - sourceFile.setContents(readFile(":/CustomProject/ListModelSource", replacementMap) ); + else if (params.baseClass == "QAbstractListModel") { + headerFile.setContents(readFile(":/CustomProject/ListModelHeader", replacementMap)); + sourceFile.setContents(readFile(":/CustomProject/ListModelSource", replacementMap)); } ret << headerFile << sourceFile; diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.h b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.h index 20ee81e710722840e3a92632466289b7b7404aeb..e92d66ec6b7f259c6331625bf92cdf796935ec26 100644 --- a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.h +++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelclasswizard.h @@ -41,6 +41,7 @@ #include <coreplugin/basefilewizard.h> +#include <QMap> class ModelClassWizard : public Core::BaseFileWizard { @@ -48,17 +49,15 @@ class ModelClassWizard : public Core::BaseFileWizard public: explicit ModelClassWizard(const Core::BaseFileWizardParameters ¶meters, QObject *parent = 0); - ~ModelClassWizard(); - QWizard *createWizardDialog(QWidget *parent, - const QString &defaultPath, - const WizardPageList &extensionPages) const; + QWizard *createWizardDialog(QWidget *parent, const QString &defaultPath, + const WizardPageList &extensionPages) const; Core::GeneratedFiles generateFiles(const QWizard *w, QString *errorMessage) const; private: - QString readFile(const QString& fileName, - const QMap<QString,QString>& replacementMap) const; + QString readFile(const QString &fileName, + const QMap<QString, QString> &replacementMap) const; }; #endif // MODELCLASSWIZARD_H diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.cpp b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.cpp index 7ea0391de95161d8e4af73b70223c205a70fb54f..4f4ea20cb3d276f863567ec04335e52720394692 100644 --- a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.cpp +++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.cpp @@ -37,30 +37,24 @@ ****************************************************************************/ #include "modelnamepage.h" -#include "ui_modelnamepage.h" -ModelNamePage::ModelNamePage(QWidget *parent) : -QWizardPage(parent) +ModelNamePage::ModelNamePage(QWidget *parent) + : QWizardPage(parent) { setTitle("Enter model class information"); setSubTitle("The header and source file names will be derived from the class name"); ui.setupUi(this); } -ModelNamePage::~ModelNamePage() -{ - -} - -void ModelNamePage::setPath(const QString& path) +void ModelNamePage::setPath(const QString &path) { this->path = path; } -void ModelNamePage::on_txtModelClass_textEdited(const QString& txt) +void ModelNamePage::on_txtModelClass_textEdited(const QString &text) { - ui.txtHeaderFile->setText(txt + ".h"); - ui.txtImplFile->setText(txt + ".cpp"); + ui.txtHeaderFile->setText(text + ".h"); + ui.txtImplFile->setText(text + ".cpp"); } ModelClassParameters ModelNamePage::parameters() const diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.h b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.h index 8ba3d70da20e3fd42e120a703949ed7c295bf798..7191ad14396cef3b4594a5d0cff1c987337cb856 100644 --- a/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.h +++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/modelnamepage.h @@ -39,30 +39,31 @@ #ifndef MODELNAMEPAGE_H #define MODELNAMEPAGE_H +#include "ui_modelnamepage.h" + #include <QWizardPage> -#include "ui_ModelNamePage.h" + struct ModelClassParameters - { - QString className; - QString headerFile; - QString sourceFile; - QString baseClass; - QString path; - }; +{ + QString className; + QString headerFile; + QString sourceFile; + QString baseClass; + QString path; +}; -class ModelNamePage : public QWizardPage +class ModelNamePage : public QWizardPage { Q_OBJECT public: ModelNamePage(QWidget *parent = 0); - ~ModelNamePage(); - void setPath(const QString& path); + + void setPath(const QString &path); ModelClassParameters parameters() const; private slots: - void on_txtModelClass_textEdited(const QString& txt); - + void on_txtModelClass_textEdited(const QString &text); private: Ui::ModelNamePage ui;