summaryrefslogtreecommitdiff
path: root/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2010-06-21 16:12:49 +0200
committercon <qtc-committer@nokia.com>2010-06-21 17:32:15 +0200
commit08c8ce32e917619f49ea019914b1c981044a04d8 (patch)
tree19be2b931a4d4c58feb1fbb1056960171717c975 /doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp
parentabcb9358c26c240c409df15300507a90aef37f48 (diff)
downloadqt-creator-08c8ce32e917619f49ea019914b1c981044a04d8.tar.gz
Move the plugin examples to subdir of pluginhowto.
Diffstat (limited to 'doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp')
-rw-r--r--doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp
new file mode 100644
index 0000000000..22f491c211
--- /dev/null
+++ b/doc/pluginhowto/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp
@@ -0,0 +1,43 @@
+#include "itemmodelwizardplugin.h"
+#include "modelclasswizard.h"
+#include <QApplication>
+#include <QtPlugin>
+#include <QStringList>
+
+ItemModelWizardPlugin::ItemModelWizardPlugin()
+{
+ // Do nothing
+}
+
+ItemModelWizardPlugin::~ItemModelWizardPlugin()
+{
+ // Do notning
+}
+
+void ItemModelWizardPlugin::extensionsInitialized()
+{
+ // Do nothing
+}
+
+bool ItemModelWizardPlugin::initialize(const QStringList& args, QString *errMsg)
+{
+ Q_UNUSED(args);
+ Q_UNUSED(errMsg);
+ Core::BaseFileWizardParameters params;
+ params.setKind(Core::IWizard::ClassWizard);
+ params.setIcon(qApp->windowIcon());
+ params.setDescription("Generates an item-model class");
+ params.setName("Item Model");
+ params.setCategory("FooCompany");
+ params.setTrCategory(tr("FooCompany"));
+ addAutoReleasedObject(new ModelClassWizard(params, this));
+ return true;
+
+}
+
+void ItemModelWizardPlugin::shutdown()
+{
+ // Do nothing
+}
+
+Q_EXPORT_PLUGIN(ItemModelWizardPlugin)