Move the plugin examples to subdir of pluginhowto.

This commit is contained in:
con
2010-06-21 16:12:49 +02:00
parent abcb9358c2
commit 08c8ce32e9
87 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
<plugin name="CustomProject" version="0.0.1">
<vendor>FooCompanyInc</vendor>
<copyright></copyright>
<license></license>
<description>{{PLUGIN_DESCRIPTION}}</description>
<url>http://www.FooCompanyInc.com</url>
<dependencyList>
<dependency name="Core"/>
</dependencyList>
</plugin>

View File

@@ -0,0 +1,37 @@
#include "customprojectplugin.h"
#include "customprojectwizard.h"
#include <QtPlugin>
#include <QStringList>
CustomProjectPlugin::CustomProjectPlugin()
{
// Do nothing
}
CustomProjectPlugin::~CustomProjectPlugin()
{
// Do notning
}
void CustomProjectPlugin::extensionsInitialized()
{
// Do nothing
}
bool CustomProjectPlugin::initialize(const QStringList& args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
addAutoReleasedObject(new CustomProjectWizard);
return true;
}
void CustomProjectPlugin::shutdown()
{
// Do nothing
}
Q_EXPORT_PLUGIN(CustomProjectPlugin)

View File

@@ -0,0 +1,18 @@
#ifndef CUSTOMPROJECT_PLUGIN_H
#define CUSTOMPROJECT_PLUGIN_H
#include <extensionsystem/iplugin.h>
class CustomProjectPlugin : public ExtensionSystem::IPlugin
{
public:
CustomProjectPlugin();
~CustomProjectPlugin();
void extensionsInitialized();
bool initialize(const QStringList & arguments, QString * errorString);
void shutdown();
};
#endif // CUSTOMPROJECT_PLUGIN_H

View File

@@ -0,0 +1,18 @@
QTC_SOURCE = C:/Work/QtCreator
QTC_BUILD = C:/Work/QtCreator/build
TEMPLATE = lib
TARGET = CustomProject
IDE_SOURCE_TREE = $$QTC_SOURCE
IDE_BUILD_TREE = $$QTC_BUILD
PROVIDER = FooCompanyInc
include($$QTC_SOURCE/src/qtcreatorplugin.pri)
include($$QTC_SOURCE/src/plugins/coreplugin/coreplugin.pri)
LIBS += -L$$IDE_PLUGIN_PATH/Nokia
HEADERS = customprojectplugin.h \
customprojectwizard.h
SOURCES = customprojectplugin.cpp \
customprojectwizard.cpp
OTHER_FILES = CustomProject.pluginspec

View File

@@ -0,0 +1,51 @@
#include "customprojectwizard.h"
#include <QMessageBox>
#include <QApplication>
#include <QIcon>
CustomProjectWizard::CustomProjectWizard()
{
}
CustomProjectWizard::~CustomProjectWizard()
{
}
Core::IWizard::Kind CustomProjectWizard::kind() const
{
return IWizard::ProjectWizard;
}
QIcon CustomProjectWizard::icon() const
{
return qApp->windowIcon();
}
QString CustomProjectWizard::description() const
{
return "A custom project";
}
QString CustomProjectWizard::name() const
{
return "CustomProject";
}
QString CustomProjectWizard::category() const
{
return "FooCompanyInc";
}
QString CustomProjectWizard::trCategory() const
{
return tr("FooCompanyInc");
}
QStringList CustomProjectWizard::runWizard(const QString &path, QWidget *parent)
{
Q_UNUSED(path);
Q_UNUSED(parent);
QMessageBox::information(parent, "Custom Wizard Dialog", "Hi there!");
return QStringList();
}

View File

@@ -0,0 +1,21 @@
#ifndef CUSTOMPROJECTWIZARD_H
#define CUSTOMPROJECTWIZARD_H
#include <coreplugin/dialogs/iwizard.h>
class CustomProjectWizard : public Core::IWizard
{
public:
CustomProjectWizard();
~CustomProjectWizard();
Core::IWizard::Kind kind() const;
QIcon icon() const;
QString description() const;
QString name() const;
QString category() const;
QString trCategory() const;
QStringList runWizard(const QString &path, QWidget *parent);
};
#endif // CUSTOMPROJECTWIZARD_H