From 08c8ce32e917619f49ea019914b1c981044a04d8 Mon Sep 17 00:00:00 2001 From: con Date: Mon, 21 Jun 2010 16:12:49 +0200 Subject: Move the plugin examples to subdir of pluginhowto. --- .../dirmodelplugin/DirModelPlugin.pluginspec | 10 -- .../dirmodelplugin/dirmodelpluginplugin.cpp | 35 ---- doc/examples/dirmodelplugin/dirmodelpluginplugin.h | 18 -- .../dirmodelplugin/dirmodelpluginplugin.pro | 25 --- .../dirmodelplugin/dirnavigationfactory.cpp | 35 ---- doc/examples/dirmodelplugin/dirnavigationfactory.h | 15 -- doc/examples/dirmodelplugin/filesystemmodel.cpp | 20 --- doc/examples/dirmodelplugin/filesystemmodel.h | 17 -- doc/examples/donothing/DoNothing.pluginspec | 10 -- doc/examples/donothing/donothingplugin.cpp | 35 ---- doc/examples/donothing/donothingplugin.h | 19 -- doc/examples/donothing/donothingplugin.pro | 21 --- doc/examples/headerfilter/HeaderFilter.pluginspec | 11 -- doc/examples/headerfilter/headerfilter.cpp | 142 --------------- doc/examples/headerfilter/headerfilter.h | 42 ----- doc/examples/headerfilter/headerfilterplugin.cpp | 36 ---- doc/examples/headerfilter/headerfilterplugin.h | 20 --- doc/examples/headerfilter/headerfilterplugin.pro | 26 --- doc/examples/htmleditor/HTMLEditor.pluginspec | 11 -- doc/examples/htmleditor/htmleditor.cpp | 129 -------------- doc/examples/htmleditor/htmleditor.h | 44 ----- doc/examples/htmleditor/htmleditorfactory.cpp | 61 ------- doc/examples/htmleditor/htmleditorfactory.h | 27 --- doc/examples/htmleditor/htmleditorplugin.cpp | 57 ------ doc/examples/htmleditor/htmleditorplugin.h | 21 --- doc/examples/htmleditor/htmleditorplugin.pro | 31 ---- doc/examples/htmleditor/htmleditorwidget.cpp | 82 --------- doc/examples/htmleditor/htmleditorwidget.h | 32 ---- doc/examples/htmleditor/htmlfile.cpp | 130 -------------- doc/examples/htmleditor/htmlfile.h | 38 ---- doc/examples/htmleditor/text-html-mimetype.xml | 8 - doc/examples/loggermode/LoggerMode.pluginspec | 10 -- doc/examples/loggermode/loggermode.cpp | 139 --------------- doc/examples/loggermode/loggermode.h | 35 ---- doc/examples/loggermode/loggermodePlugin.cpp | 36 ---- doc/examples/loggermode/loggermodePlugin.h | 21 --- doc/examples/loggermode/loggermodePlugin.pro | 20 --- doc/examples/loggermode/loggermodewidget.cpp | 192 --------------------- doc/examples/loggermode/loggermodewidget.h | 28 --- doc/examples/menu/addingmenu/DoNothing.pluginspec | 10 -- doc/examples/menu/addingmenu/donothingplugin.cpp | 64 ------- doc/examples/menu/addingmenu/donothingplugin.h | 22 --- doc/examples/menu/addingmenu/donothingplugin.pro | 20 --- doc/examples/menu/placingmenu/DoNothing.pluginspec | 10 -- doc/examples/menu/placingmenu/donothingplugin.cpp | 66 ------- doc/examples/menu/placingmenu/donothingplugin.h | 22 --- doc/examples/menu/placingmenu/donothingplugin.pro | 20 --- .../menu/registeringmenuitem/DoNothing.pluginspec | 10 -- .../menu/registeringmenuitem/donothingplugin.cpp | 48 ------ .../menu/registeringmenuitem/donothingplugin.h | 19 -- .../menu/registeringmenuitem/donothingplugin.pro | 20 --- .../menu/respondtomenuitem/DoNothing.pluginspec | 11 -- .../menu/respondtomenuitem/donothingplugin.cpp | 57 ------ .../menu/respondtomenuitem/donothingplugin.h | 22 --- .../menu/respondtomenuitem/donothingplugin.pro | 20 --- .../preferencepane/PreferencePane.pluginspec | 10 -- doc/examples/preferencepane/modifiedfilelister.cpp | 47 ----- doc/examples/preferencepane/modifiedfilelister.h | 21 --- .../preferencepane/modifiedfilelistwidget.cpp | 20 --- .../preferencepane/modifiedfilelistwidget.h | 14 -- .../preferencepane/preferencepaneplugin.cpp | 36 ---- doc/examples/preferencepane/preferencepaneplugin.h | 18 -- .../preferencepane/preferencepaneplugin.pro | 21 --- doc/examples/progressbar/ProgressBar.pluginspec | 11 -- doc/examples/progressbar/headerfilteprogress.cpp | 188 -------------------- doc/examples/progressbar/headerfilterprogress.h | 45 ----- doc/examples/progressbar/progressbar.pro | 28 --- doc/examples/progressbar/progressbarplugin.cpp | 36 ---- doc/examples/progressbar/progressbarplugin.h | 20 --- .../wizard/customproject/CustomProject.pluginspec | 10 -- .../wizard/customproject/customprojectplugin.cpp | 37 ---- .../wizard/customproject/customprojectplugin.h | 18 -- .../wizard/customproject/customprojectplugin.pro | 18 -- .../wizard/customproject/customprojectwizard.cpp | 51 ------ .../wizard/customproject/customprojectwizard.h | 21 --- .../wizard/itemmodelwizard/ItemModelHeader.txt | 22 --- .../wizard/itemmodelwizard/ItemModelSource.txt | 23 --- .../itemmodelwizard/ItemModelWizard.pluginspec | 10 -- .../itemmodelwizard/itemmodelwizardplugin.cpp | 43 ----- .../wizard/itemmodelwizard/itemmodelwizardplugin.h | 18 -- .../itemmodelwizard/itemmodelwizardplugin.pro | 25 --- .../wizard/itemmodelwizard/modelclasswizard.cpp | 101 ----------- .../wizard/itemmodelwizard/modelclasswizard.h | 26 --- .../wizard/itemmodelwizard/modelnamepage.cpp | 38 ---- .../wizard/itemmodelwizard/modelnamepage.h | 34 ---- .../wizard/itemmodelwizard/modelnamepage.ui | 90 ---------- doc/examples/wizard/itemmodelwizard/template.qrc | 6 - 87 files changed, 3236 deletions(-) delete mode 100644 doc/examples/dirmodelplugin/DirModelPlugin.pluginspec delete mode 100644 doc/examples/dirmodelplugin/dirmodelpluginplugin.cpp delete mode 100644 doc/examples/dirmodelplugin/dirmodelpluginplugin.h delete mode 100644 doc/examples/dirmodelplugin/dirmodelpluginplugin.pro delete mode 100644 doc/examples/dirmodelplugin/dirnavigationfactory.cpp delete mode 100644 doc/examples/dirmodelplugin/dirnavigationfactory.h delete mode 100644 doc/examples/dirmodelplugin/filesystemmodel.cpp delete mode 100644 doc/examples/dirmodelplugin/filesystemmodel.h delete mode 100644 doc/examples/donothing/DoNothing.pluginspec delete mode 100644 doc/examples/donothing/donothingplugin.cpp delete mode 100644 doc/examples/donothing/donothingplugin.h delete mode 100644 doc/examples/donothing/donothingplugin.pro delete mode 100644 doc/examples/headerfilter/HeaderFilter.pluginspec delete mode 100644 doc/examples/headerfilter/headerfilter.cpp delete mode 100644 doc/examples/headerfilter/headerfilter.h delete mode 100644 doc/examples/headerfilter/headerfilterplugin.cpp delete mode 100644 doc/examples/headerfilter/headerfilterplugin.h delete mode 100644 doc/examples/headerfilter/headerfilterplugin.pro delete mode 100644 doc/examples/htmleditor/HTMLEditor.pluginspec delete mode 100644 doc/examples/htmleditor/htmleditor.cpp delete mode 100644 doc/examples/htmleditor/htmleditor.h delete mode 100644 doc/examples/htmleditor/htmleditorfactory.cpp delete mode 100644 doc/examples/htmleditor/htmleditorfactory.h delete mode 100644 doc/examples/htmleditor/htmleditorplugin.cpp delete mode 100644 doc/examples/htmleditor/htmleditorplugin.h delete mode 100644 doc/examples/htmleditor/htmleditorplugin.pro delete mode 100644 doc/examples/htmleditor/htmleditorwidget.cpp delete mode 100644 doc/examples/htmleditor/htmleditorwidget.h delete mode 100644 doc/examples/htmleditor/htmlfile.cpp delete mode 100644 doc/examples/htmleditor/htmlfile.h delete mode 100644 doc/examples/htmleditor/text-html-mimetype.xml delete mode 100644 doc/examples/loggermode/LoggerMode.pluginspec delete mode 100644 doc/examples/loggermode/loggermode.cpp delete mode 100644 doc/examples/loggermode/loggermode.h delete mode 100644 doc/examples/loggermode/loggermodePlugin.cpp delete mode 100644 doc/examples/loggermode/loggermodePlugin.h delete mode 100644 doc/examples/loggermode/loggermodePlugin.pro delete mode 100644 doc/examples/loggermode/loggermodewidget.cpp delete mode 100644 doc/examples/loggermode/loggermodewidget.h delete mode 100644 doc/examples/menu/addingmenu/DoNothing.pluginspec delete mode 100644 doc/examples/menu/addingmenu/donothingplugin.cpp delete mode 100644 doc/examples/menu/addingmenu/donothingplugin.h delete mode 100644 doc/examples/menu/addingmenu/donothingplugin.pro delete mode 100644 doc/examples/menu/placingmenu/DoNothing.pluginspec delete mode 100644 doc/examples/menu/placingmenu/donothingplugin.cpp delete mode 100644 doc/examples/menu/placingmenu/donothingplugin.h delete mode 100644 doc/examples/menu/placingmenu/donothingplugin.pro delete mode 100644 doc/examples/menu/registeringmenuitem/DoNothing.pluginspec delete mode 100644 doc/examples/menu/registeringmenuitem/donothingplugin.cpp delete mode 100644 doc/examples/menu/registeringmenuitem/donothingplugin.h delete mode 100644 doc/examples/menu/registeringmenuitem/donothingplugin.pro delete mode 100644 doc/examples/menu/respondtomenuitem/DoNothing.pluginspec delete mode 100644 doc/examples/menu/respondtomenuitem/donothingplugin.cpp delete mode 100644 doc/examples/menu/respondtomenuitem/donothingplugin.h delete mode 100644 doc/examples/menu/respondtomenuitem/donothingplugin.pro delete mode 100644 doc/examples/preferencepane/PreferencePane.pluginspec delete mode 100644 doc/examples/preferencepane/modifiedfilelister.cpp delete mode 100644 doc/examples/preferencepane/modifiedfilelister.h delete mode 100644 doc/examples/preferencepane/modifiedfilelistwidget.cpp delete mode 100644 doc/examples/preferencepane/modifiedfilelistwidget.h delete mode 100644 doc/examples/preferencepane/preferencepaneplugin.cpp delete mode 100644 doc/examples/preferencepane/preferencepaneplugin.h delete mode 100644 doc/examples/preferencepane/preferencepaneplugin.pro delete mode 100644 doc/examples/progressbar/ProgressBar.pluginspec delete mode 100644 doc/examples/progressbar/headerfilteprogress.cpp delete mode 100644 doc/examples/progressbar/headerfilterprogress.h delete mode 100644 doc/examples/progressbar/progressbar.pro delete mode 100644 doc/examples/progressbar/progressbarplugin.cpp delete mode 100644 doc/examples/progressbar/progressbarplugin.h delete mode 100644 doc/examples/wizard/customproject/CustomProject.pluginspec delete mode 100644 doc/examples/wizard/customproject/customprojectplugin.cpp delete mode 100644 doc/examples/wizard/customproject/customprojectplugin.h delete mode 100644 doc/examples/wizard/customproject/customprojectplugin.pro delete mode 100644 doc/examples/wizard/customproject/customprojectwizard.cpp delete mode 100644 doc/examples/wizard/customproject/customprojectwizard.h delete mode 100644 doc/examples/wizard/itemmodelwizard/ItemModelHeader.txt delete mode 100644 doc/examples/wizard/itemmodelwizard/ItemModelSource.txt delete mode 100644 doc/examples/wizard/itemmodelwizard/ItemModelWizard.pluginspec delete mode 100644 doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp delete mode 100644 doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h delete mode 100644 doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro delete mode 100644 doc/examples/wizard/itemmodelwizard/modelclasswizard.cpp delete mode 100644 doc/examples/wizard/itemmodelwizard/modelclasswizard.h delete mode 100644 doc/examples/wizard/itemmodelwizard/modelnamepage.cpp delete mode 100644 doc/examples/wizard/itemmodelwizard/modelnamepage.h delete mode 100644 doc/examples/wizard/itemmodelwizard/modelnamepage.ui delete mode 100644 doc/examples/wizard/itemmodelwizard/template.qrc (limited to 'doc/examples') diff --git a/doc/examples/dirmodelplugin/DirModelPlugin.pluginspec b/doc/examples/dirmodelplugin/DirModelPlugin.pluginspec deleted file mode 100644 index caa7829b19c..00000000000 --- a/doc/examples/dirmodelplugin/DirModelPlugin.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompany - (C) 2009-2010 FooCompanyInc Pvt. Ltd. - GPL - Dir Model - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/dirmodelplugin/dirmodelpluginplugin.cpp b/doc/examples/dirmodelplugin/dirmodelpluginplugin.cpp deleted file mode 100644 index 70e9cd15a09..00000000000 --- a/doc/examples/dirmodelplugin/dirmodelpluginplugin.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "dirmodelpluginplugin.h" - -#include -#include -#include "DirNavigationFactory.h" - -DirModelPluginPlugin::DirModelPluginPlugin() -{ - // Do nothing -} - -DirModelPluginPlugin::~DirModelPluginPlugin() -{ - // Do notning -} - -void DirModelPluginPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool DirModelPluginPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - addAutoReleasedObject(new DirNavigationFactory); - return true; -} - -void DirModelPluginPlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(DirModelPluginPlugin) diff --git a/doc/examples/dirmodelplugin/dirmodelpluginplugin.h b/doc/examples/dirmodelplugin/dirmodelpluginplugin.h deleted file mode 100644 index 0bced9ffbf1..00000000000 --- a/doc/examples/dirmodelplugin/dirmodelpluginplugin.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef DIRMODELPLUGIN_PLUGIN_H -#define DIRMODELPLUGIN_PLUGIN_H - -#include - -class DirModelPluginPlugin : public ExtensionSystem::IPlugin -{ -public: - DirModelPluginPlugin(); - ~DirModelPluginPlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // DIRMODELPLUGIN_PLUGIN_H - diff --git a/doc/examples/dirmodelplugin/dirmodelpluginplugin.pro b/doc/examples/dirmodelplugin/dirmodelpluginplugin.pro deleted file mode 100644 index ed816f92536..00000000000 --- a/doc/examples/dirmodelplugin/dirmodelpluginplugin.pro +++ /dev/null @@ -1,25 +0,0 @@ -# Uncomment the lines below and set the path - -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build - -TEMPLATE = lib -TARGET = DirModelPlugin -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 = dirmodelpluginplugin.h \ - dirnavigationfactory.h \ - filesystemmodel.h -SOURCES = dirmodelpluginplugin.cpp \ - dirnavigationfactory.cpp \ - filesystemmodel.cpp -OTHER_FILES = DirModelPlugin.pluginspec diff --git a/doc/examples/dirmodelplugin/dirnavigationfactory.cpp b/doc/examples/dirmodelplugin/dirnavigationfactory.cpp deleted file mode 100644 index 49546074d6f..00000000000 --- a/doc/examples/dirmodelplugin/dirnavigationfactory.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "dirnavigationfactory.h" -#include "filesystemmodel.h" - -#include -#include - -#include -/** - \todo -*/ -Core::NavigationView DirNavigationFactory::createWidget() -{ - Core::NavigationView view; - - // Create FileSystemModel and set the defauls path as home path - FileSystemModel* model = new FileSystemModel; - model->setRootPath(QDir::homePath()); - - // Create TreeView and set model - QTreeView* tree = new QTreeView; - tree->setModel(model); - - view.widget = tree; - - return view; -} - -/** - \todo -*/ -QString DirNavigationFactory::displayName() -{ - return "Dir View"; -} - diff --git a/doc/examples/dirmodelplugin/dirnavigationfactory.h b/doc/examples/dirmodelplugin/dirnavigationfactory.h deleted file mode 100644 index 49bf6a25285..00000000000 --- a/doc/examples/dirmodelplugin/dirnavigationfactory.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef DIRNAVIGATIONFACTORY_H -#define DIRNAVIGATIONFACTORY_H - -#include - -class DirNavigationFactory : public Core::INavigationWidgetFactory -{ -public: - DirNavigationFactory(){ } - ~DirNavigationFactory() { } - Core::NavigationView createWidget(); - QString displayName(); -}; - -#endif // DIRNAVIGATIONFACTORY_H diff --git a/doc/examples/dirmodelplugin/filesystemmodel.cpp b/doc/examples/dirmodelplugin/filesystemmodel.cpp deleted file mode 100644 index 34bee9f1bda..00000000000 --- a/doc/examples/dirmodelplugin/filesystemmodel.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "filesystemmodel.h" - -FileSystemModel::FileSystemModel(QObject* parent) - :QFileSystemModel(parent) -{ - -} - -FileSystemModel::~FileSystemModel() -{ - -} - -int FileSystemModel::columnCount(const QModelIndex &parent ) const -{ - Q_UNUSED(parent) - return 1; -} - - diff --git a/doc/examples/dirmodelplugin/filesystemmodel.h b/doc/examples/dirmodelplugin/filesystemmodel.h deleted file mode 100644 index c1a08034409..00000000000 --- a/doc/examples/dirmodelplugin/filesystemmodel.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef FILESYSTEMMODEL_H -#define FILESYSTEMMODEL_H - -#include - -/** - This FileSystemModel is subcalss of QFileSystemModel which just returns only 1 column. -*/ -class FileSystemModel : public QFileSystemModel -{ -public: - FileSystemModel(QObject* parent=0); - ~FileSystemModel(); - int columnCount(const QModelIndex &parent = QModelIndex()) const; -}; - -#endif // FILESYSTEMMODEL_H diff --git a/doc/examples/donothing/DoNothing.pluginspec b/doc/examples/donothing/DoNothing.pluginspec deleted file mode 100644 index 35e922e5af1..00000000000 --- a/doc/examples/donothing/DoNothing.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompanyInc - FooCompanyInc - - DO NOTHING - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/donothing/donothingplugin.cpp b/doc/examples/donothing/donothingplugin.cpp deleted file mode 100644 index 1b651d0fa97..00000000000 --- a/doc/examples/donothing/donothingplugin.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "donothingplugin.h" - -#include -#include - - -DoNothingPlugin::DoNothingPlugin() -{ - // Do nothing -} - -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - -void DoNothingPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool DoNothingPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - return true; -} - -void DoNothingPlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(DoNothingPlugin) diff --git a/doc/examples/donothing/donothingplugin.h b/doc/examples/donothing/donothingplugin.h deleted file mode 100644 index 25356a74433..00000000000 --- a/doc/examples/donothing/donothingplugin.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef DONOTHING_PLUGIN_H -#define DONOTHING_PLUGIN_H - -#include - -class DoNothingPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - DoNothingPlugin(); - ~DoNothingPlugin(); - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // DONOTHING_PLUGIN_H - diff --git a/doc/examples/donothing/donothingplugin.pro b/doc/examples/donothing/donothingplugin.pro deleted file mode 100644 index 5a017f626f4..00000000000 --- a/doc/examples/donothing/donothingplugin.pro +++ /dev/null @@ -1,21 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build - -TEMPLATE = lib -TARGET = DoNothing - -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 = donothingplugin.h -SOURCES = donothingplugin.cpp -OTHER_FILES = DoNothing.pluginspec - - diff --git a/doc/examples/headerfilter/HeaderFilter.pluginspec b/doc/examples/headerfilter/HeaderFilter.pluginspec deleted file mode 100644 index 446eec434d1..00000000000 --- a/doc/examples/headerfilter/HeaderFilter.pluginspec +++ /dev/null @@ -1,11 +0,0 @@ - - FooCompanyInc - - - {{PLUGIN_DESCRIPTION}} - http://www.foocompany.com - - - - - diff --git a/doc/examples/headerfilter/headerfilter.cpp b/doc/examples/headerfilter/headerfilter.cpp deleted file mode 100644 index afe1c8495ac..00000000000 --- a/doc/examples/headerfilter/headerfilter.cpp +++ /dev/null @@ -1,142 +0,0 @@ -#include "headerfilter.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - - -using namespace Core; -using namespace Utils; - - -struct HeaderFilterData - { - HeaderFilterData() : m_projectPlugin(0), m_searchResultWindow(0){} - QFutureWatcher watcher; - - ProjectExplorer::ProjectExplorerPlugin* projectExplorer() - { - if(m_projectPlugin) - return m_projectPlugin; - - ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); - m_projectPlugin = pm->getObject(); - return m_projectPlugin; - } - - // Method to search and return the search window - - Find::SearchResultWindow* searchResultWindow() - { - if(m_searchResultWindow) - return m_searchResultWindow; - - ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); - m_searchResultWindow = pm->getObject(); - return m_searchResultWindow; - } - - private: - ProjectExplorer::ProjectExplorerPlugin* m_projectPlugin; - Find::SearchResultWindow *m_searchResultWindow; - -}; - -HeaderFilter::HeaderFilter() -{ - d = new HeaderFilterData; - d->watcher.setPendingResultsLimit(1); - - // displayResult(int) is called when every a new - // search result is generated - connect(&d->watcher, SIGNAL(resultReadyAt(int)),this, SLOT(displayResult(int))); -} - -HeaderFilter::~HeaderFilter() -{ - delete d; -} - -QString HeaderFilter::id() const -{ - return "HeaderFilter"; -} - -QString HeaderFilter::name() const -{ - return tr("Header Filter"); -} - -bool HeaderFilter::isEnabled() const -{ - QList projects = d->projectExplorer()->session()->projects(); - if(projects.count()) - return true; - - return false; -} - -QKeySequence HeaderFilter::defaultShortcut() const -{ - return QKeySequence(); -} - -QWidget *HeaderFilter::createConfigWidget() -{ - return (new QLabel("This is a header filter")); -} - - -void HeaderFilter::findAll(const QString &text,QTextDocument::FindFlags findFlags) - { - // Fetch a list of all open projects - QList 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); - - // Remove duplicates - files.removeDuplicates(); - - //------------------------------------------------------------ - // Begin searching - QString includeline = "#include <" + text + ">"; - Find::SearchResult *result = d->searchResultWindow()->startNewSearch(); - - d->watcher.setFuture(QFuture()); - - //When result gets activated it invokes the openEditor function - connect(result, SIGNAL(activated(Find::SearchResultItem)), - this, SLOT(openEditor(Find::SearchResultItem))); - - d->searchResultWindow()->popup(true); - - // Let the watcher monitor the search results - d->watcher.setFuture(Utils::findInFiles(includeline, files, findFlags)); -} - -void HeaderFilter::displayResult(int index) -{ - FileSearchResult result = d->watcher.future().resultAt(index); - - d->searchResultWindow()->addResult(result.fileName, - result.lineNumber, - result.matchingLine, - result.matchStart, - result.matchLength); -} - -void HeaderFilter::openEditor(const Find::SearchResultItem &item) -{ - TextEditor::BaseTextEditor::openEditorAt(item.fileName, item.lineNumber, item.index); -} - diff --git a/doc/examples/headerfilter/headerfilter.h b/doc/examples/headerfilter/headerfilter.h deleted file mode 100644 index 018f0849b08..00000000000 --- a/doc/examples/headerfilter/headerfilter.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef HEADERFILTER_H -#define HEADERFILTER_H - - -#include -#include - -namespace Find { -class SearchResultWindow; -struct SearchResultItem; -} - -class QKeySequence; -class QWidget; - - - -struct HeaderFilterData; -class HeaderFilter : public Find::IFindFilter -{ - Q_OBJECT - -public: - HeaderFilter(); - ~HeaderFilter(); - QString id() const; - QString name() const; - bool isEnabled() const; - QKeySequence defaultShortcut() const; - void findAll(const QString &txt,QTextDocument::FindFlags findFlags); - QWidget *createConfigWidget(); - -protected slots: - void displayResult(int index); - void openEditor(const Find::SearchResultItem &item); - -private: - HeaderFilterData *d; -}; - - -#endif // HEADERFILTER_H diff --git a/doc/examples/headerfilter/headerfilterplugin.cpp b/doc/examples/headerfilter/headerfilterplugin.cpp deleted file mode 100644 index 2143069bb20..00000000000 --- a/doc/examples/headerfilter/headerfilterplugin.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "headerfilterplugin.h" -#include "headerfilter.h" - -#include -#include - -HeaderFilterPlugin::HeaderFilterPlugin() -{ - // Do nothing -} - -HeaderFilterPlugin::~HeaderFilterPlugin() -{ - // Do notning -} - -void HeaderFilterPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool HeaderFilterPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - addAutoReleasedObject( new HeaderFilter); - return true; -} - -void HeaderFilterPlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(HeaderFilterPlugin) diff --git a/doc/examples/headerfilter/headerfilterplugin.h b/doc/examples/headerfilter/headerfilterplugin.h deleted file mode 100644 index 15cf4acc08f..00000000000 --- a/doc/examples/headerfilter/headerfilterplugin.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef HEADERFILTER_PLUGIN_H -#define HEADERFILTER_PLUGIN_H - -#include - -class HeaderFilterPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - HeaderFilterPlugin(); - ~HeaderFilterPlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // HEADERFILTER_PLUGIN_H - diff --git a/doc/examples/headerfilter/headerfilterplugin.pro b/doc/examples/headerfilter/headerfilterplugin.pro deleted file mode 100644 index f419d789aec..00000000000 --- a/doc/examples/headerfilter/headerfilterplugin.pro +++ /dev/null @@ -1,26 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build -DEFINES += FIND_LIBRARY - -TEMPLATE = lib -TARGET = HeaderFilter -IDE_SOURCE_TREE = $$QTC_SOURCE -IDE_BUILD_TREE = $$QTC_BUILD - -PROVIDER = FooCompanyInc - -include($$QTC_SOURCE/src/libs/extensionsystem/extensionsystem.pri) -include($$QTC_SOURCE/src/qtcreatorplugin.pri) -include($$QTC_SOURCE/src/plugins/coreplugin/coreplugin.pri) -include($$QTC_SOURCE/src/libs/utils/utils.pri) -include($$QTC_SOURCE/src/plugins/projectexplorer/projectexplorer.pri) -include($$QTC_SOURCE/src/plugins/find/find.pri) - -LIBS += -L$$IDE_PLUGIN_PATH/Nokia - -HEADERS = headerfilterplugin.h \ - headerfilter.h -SOURCES = headerfilterplugin.cpp \ - headerfilter.cpp -OTHER_FILES = HeaderFilter.pluginspec - diff --git a/doc/examples/htmleditor/HTMLEditor.pluginspec b/doc/examples/htmleditor/HTMLEditor.pluginspec deleted file mode 100644 index 180d9a521a7..00000000000 --- a/doc/examples/htmleditor/HTMLEditor.pluginspec +++ /dev/null @@ -1,11 +0,0 @@ - - FooCompanyInc Pvt. Ltd - (C) 2009-2010 FooCompanyInc Pvt. Ltd. - - {{PLUGIN_DESCRIPTION}} - http://www.FooCompanyInc.com - - - - - diff --git a/doc/examples/htmleditor/htmleditor.cpp b/doc/examples/htmleditor/htmleditor.cpp deleted file mode 100644 index 88969686c51..00000000000 --- a/doc/examples/htmleditor/htmleditor.cpp +++ /dev/null @@ -1,129 +0,0 @@ -#include "htmlfile.h" -#include "htmleditor.h" -#include "htmleditorwidget.h" - -#include "coreplugin/uniqueidmanager.h" - -struct HTMLEditorData -{ - HTMLEditorData() : editorWidget(0), file(0) { } - - HTMLEditorWidget* editorWidget; - QString displayName; - HTMLFile* file; - QList context; -}; - -namespace HTMLEditorConstants -{ - const char* const C_HTMLEDITOR_MIMETYPE = "text/html"; - const char* const C_HTMLEDITOR = "HTML Editor"; -} - -HTMLEditor::HTMLEditor(HTMLEditorWidget* editorWidget) - :Core::IEditor(editorWidget) -{ - d = new HTMLEditorData; - d->editorWidget = editorWidget; - d->file = new HTMLFile(this, editorWidget); - - Core::UniqueIDManager* uidm = Core::UniqueIDManager::instance(); - d->context << uidm->uniqueIdentifier(HTMLEditorConstants::C_HTMLEDITOR); - - connect(d->editorWidget, SIGNAL(contentModified()), - d->file, SLOT(modified())); - connect(d->editorWidget, SIGNAL(titleChanged(QString)), - this, SLOT(slotTitleChanged(QString))); - connect(d->editorWidget, SIGNAL(contentModified()), - this, SIGNAL(changed())); -} - -HTMLEditor::~HTMLEditor() -{ - delete d; -} - -QWidget* HTMLEditor::widget() -{ - return d->editorWidget; -} - -QList HTMLEditor::context() const -{ - return d->context; -} - -Core::IFile* HTMLEditor::file() -{ - return d->file; -} - -bool HTMLEditor::createNew(const QString& contents) -{ - Q_UNUSED(contents); - - d->editorWidget->setContent(QByteArray()); - d->file->setFilename(QString()); - - return true; -} - -bool HTMLEditor::open(const QString &fileName) -{ - return d->file->open(fileName); -} - -const char* HTMLEditor::kind() const -{ - return HTMLEditorConstants::C_HTMLEDITOR; -} - -QString HTMLEditor::displayName() const -{ - return d->displayName; -} - -void HTMLEditor::setDisplayName(const QString& title) -{ - if(d->displayName == title) - return; - - d->displayName = title; - emit changed(); -} - -bool HTMLEditor::duplicateSupported() const -{ - return false; -} -Core::IEditor* HTMLEditor::duplicate(QWidget* parent) -{ - Q_UNUSED(parent); - - return 0; -} - -QByteArray HTMLEditor::saveState() const -{ - return QByteArray(); -} - -bool HTMLEditor::restoreState(const QByteArray& state) -{ - Q_UNUSED(state); - - return false; -} - -QToolBar* HTMLEditor::toolBar() -{ - return 0; -} - -bool HTMLEditor::isTemporary() const -{ - return false; -} - - - diff --git a/doc/examples/htmleditor/htmleditor.h b/doc/examples/htmleditor/htmleditor.h deleted file mode 100644 index 8910254e3e7..00000000000 --- a/doc/examples/htmleditor/htmleditor.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef HTMLEDITOR_H -#define HTMLEDITOR_H - -#include "coreplugin/editormanager/ieditor.h" - -#include - -class HTMLEditorWidget; - -struct HTMLEditorData; -class HTMLEditor : public Core::IEditor -{ - Q_OBJECT - -public: - HTMLEditor(HTMLEditorWidget* editorWidget); - ~HTMLEditor(); - - bool createNew(const QString& contents = QString()); - QString displayName() const; - IEditor* duplicate(QWidget* parent); - bool duplicateSupported() const; - Core::IFile* file(); - bool isTemporary() const; - const char* kind() const; - bool open(const QString& fileName = QString()) ; - bool restoreState(const QByteArray& state); - QByteArray saveState() const; - void setDisplayName(const QString &title); - QToolBar* toolBar(); - - // From Core::IContext - QWidget* widget(); - QList context() const; - -protected slots: - void slotTitleChanged(const QString& title) - { setDisplayName(title); } - -private: - HTMLEditorData* d; -}; - -#endif // HTMLEDITOR_H diff --git a/doc/examples/htmleditor/htmleditorfactory.cpp b/doc/examples/htmleditor/htmleditorfactory.cpp deleted file mode 100644 index 798f410c0f7..00000000000 --- a/doc/examples/htmleditor/htmleditorfactory.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "coreplugin/editormanager/editormanager.h" -#include "htmleditorfactory.h" -#include "htmleditorwidget.h" -#include "htmleditorplugin.h" -#include "htmleditor.h" - -namespace HTMLEditorConstants -{ - const char* const C_HTMLEDITOR_MIMETYPE = "text/html"; - const char* const C_HTMLEDITOR = "HTML Editor"; -} - -struct HTMLEditorFactoryData -{ - HTMLEditorFactoryData() : kind(HTMLEditorConstants::C_HTMLEDITOR) - { - mimeTypes << QString(HTMLEditorConstants::C_HTMLEDITOR_MIMETYPE); - } - - QString kind; - QStringList mimeTypes; -}; - - -HTMLEditorFactory::HTMLEditorFactory(HTMLEditorPlugin* owner) - :Core::IEditorFactory(owner) -{ - d = new HTMLEditorFactoryData; -} - -HTMLEditorFactory::~HTMLEditorFactory() -{ - delete d; -} - -QStringList HTMLEditorFactory::mimeTypes() const -{ - return d->mimeTypes; -} - -QString HTMLEditorFactory::kind() const -{ - return d->kind; -} - -Core::IFile* HTMLEditorFactory::open(const QString& fileName) -{ - Core::EditorManager* em = Core::EditorManager::instance(); - Core::IEditor* iface = em->openEditor(fileName, d->kind); - - return iface ? iface->file() : 0; -} - -Core::IEditor* HTMLEditorFactory::createEditor(QWidget* parent) -{ - HTMLEditorWidget* editorWidget = new HTMLEditorWidget(parent); - - return new HTMLEditor(editorWidget); -} - - diff --git a/doc/examples/htmleditor/htmleditorfactory.h b/doc/examples/htmleditor/htmleditorfactory.h deleted file mode 100644 index a863b71cee3..00000000000 --- a/doc/examples/htmleditor/htmleditorfactory.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef HTMLEDITORFACTORY_H -#define HTMLEDITORFACTORY_H - -#include "coreplugin/editormanager/ieditorfactory.h" - -class HTMLEditorPlugin; - -struct HTMLEditorFactoryData; -class HTMLEditorFactory : public Core::IEditorFactory -{ - Q_OBJECT - -public: - HTMLEditorFactory(HTMLEditorPlugin* owner); - ~HTMLEditorFactory(); - - QStringList mimeTypes() const; - QString kind() const; - - Core::IEditor* createEditor(QWidget* parent); - Core::IFile* open(const QString &fileName); - -private: - HTMLEditorFactoryData* d; -}; - -#endif // HTMLEDITORFACTORY_H diff --git a/doc/examples/htmleditor/htmleditorplugin.cpp b/doc/examples/htmleditor/htmleditorplugin.cpp deleted file mode 100644 index 657963f345d..00000000000 --- a/doc/examples/htmleditor/htmleditorplugin.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "htmleditorplugin.h" -#include "htmleditorfactory.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -HTMLEditorPlugin::HTMLEditorPlugin() -{ - // Do nothing -} - -HTMLEditorPlugin::~HTMLEditorPlugin() -{ - // Do notning -} - -void HTMLEditorPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool HTMLEditorPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - - Core::ActionManager* am = Core::ICore::instance()->actionManager(); - Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_EDIT); - QAction* Font = ac->menu()->addAction("Font"); - - // Create a command for "Font". - Core::Command* cmd = am->registerAction(new QAction(this),"HTMLEditorPlugin.Font",QList() << 0); - cmd->action()->setText("Font"); - - Core::ICore* core = Core::ICore::instance(); - Core::MimeDatabase* mdb = core->mimeDatabase(); - - if(!mdb->addMimeTypes("text-html-mimetype.xml", errMsg)) - return false; - - QMessageBox::information(0, "Msg", *errMsg); - - addAutoReleasedObject(new HTMLEditorFactory(this)); - return true; -} - -void HTMLEditorPlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(HTMLEditorPlugin) diff --git a/doc/examples/htmleditor/htmleditorplugin.h b/doc/examples/htmleditor/htmleditorplugin.h deleted file mode 100644 index 2305b31613a..00000000000 --- a/doc/examples/htmleditor/htmleditorplugin.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef HTMLEDITOR_PLUGIN_H -#define HTMLEDITOR_PLUGIN_H - -#include "extensionsystem/iplugin.h" -#include "coreplugin/uniqueidmanager.h" - -class HTMLEditorPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - HTMLEditorPlugin(); - ~HTMLEditorPlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // HTMLEDITOR_PLUGIN_H - diff --git a/doc/examples/htmleditor/htmleditorplugin.pro b/doc/examples/htmleditor/htmleditorplugin.pro deleted file mode 100644 index 930c5f28798..00000000000 --- a/doc/examples/htmleditor/htmleditorplugin.pro +++ /dev/null @@ -1,31 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build - -TEMPLATE = lib -TARGET = HTMLEditor -IDE_SOURCE_TREE = $$QTC_SOURCE -IDE_BUILD_TREE = $$QTC_BUILD -PROVIDER = FooCompanyInc - -QT += webkit - -PROVIDER = FooCompanyInc - -include($$QTC_SOURCE/src/qtcreatorplugin.pri) -include($$QTC_SOURCE/src/plugins/coreplugin/coreplugin.pri) -LIBS += -L$$IDE_PLUGIN_PATH/Nokia - -HEADERS = htmleditorplugin.h \ - htmleditorwidget.h \ - htmlfile.h \ - htmleditor.h \ - htmleditorfactory.h - -SOURCES = htmleditorplugin.cpp \ - htmleditorwidget.cpp \ - htmlfile.cpp \ - htmleditor.cpp \ - htmleditorfactory.cpp - -OTHER_FILES = HTMLEditor.pluginspec \ - text-html-mimetype.xml diff --git a/doc/examples/htmleditor/htmleditorwidget.cpp b/doc/examples/htmleditor/htmleditorwidget.cpp deleted file mode 100644 index 20650e954a6..00000000000 --- a/doc/examples/htmleditor/htmleditorwidget.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "htmleditorwidget.h" - -#include -#include -#include -#include - -struct HTMLEditorWidgetData -{ - QWebView* webView; - QPlainTextEdit* textEdit; - bool modified; - QString path; -}; - -HTMLEditorWidget::HTMLEditorWidget(QWidget* parent):QTabWidget(parent) -{ - d = new HTMLEditorWidgetData; - - d->webView = new QWebView; - d->textEdit = new QPlainTextEdit; - - addTab(d->webView, "Preview"); - addTab(d->textEdit, "Source"); - setTabPosition(QTabWidget::South); - setTabShape(QTabWidget::Triangular); - - d->textEdit->setFont( QFont("Courier", 12) ); - - connect(this, SIGNAL(currentChanged(int)), - this, SLOT(slotCurrentTabChanged(int))); - - connect(d->textEdit, SIGNAL(textChanged()), - this, SLOT(slotContentModified())); - - connect(d->webView, SIGNAL(titleChanged(QString)), - this, SIGNAL(titleChanged(QString))); - - d->modified = false; -} - - -HTMLEditorWidget::~HTMLEditorWidget() -{ - delete d; -} - -void HTMLEditorWidget::setContent(const QByteArray& ba, const QString& path) -{ - if(path.isEmpty()) - d->webView->setHtml(ba); - else - d->webView->setHtml(ba, "file:///" + path); - d->textEdit->setPlainText(ba); - d->modified = false; - d->path = path; -} - -QByteArray HTMLEditorWidget::content() const -{ - QString HTMLText = d->textEdit->toPlainText(); - return HTMLText.toAscii(); -} - -QString HTMLEditorWidget::title() const -{ - return d->webView->title(); -} - -void HTMLEditorWidget::slotCurrentTabChanged(int tab) -{ - if(tab == 0 && d->modified) - setContent( content(), d->path ); -} - -void HTMLEditorWidget::slotContentModified() -{ - d->modified = true; - emit contentModified(); -} - - diff --git a/doc/examples/htmleditor/htmleditorwidget.h b/doc/examples/htmleditor/htmleditorwidget.h deleted file mode 100644 index 133c2715971..00000000000 --- a/doc/examples/htmleditor/htmleditorwidget.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef RTEDITORWIDGET_H -#define RTEDITORWIDGET_H - -#include - -struct HTMLEditorWidgetData; -class HTMLEditorWidget:public QTabWidget -{ - Q_OBJECT - -public: - HTMLEditorWidget(QWidget* parent = 0); - ~HTMLEditorWidget(); - - void setContent(const QByteArray& ba, const QString& path=QString()); - QByteArray content() const; - - QString title() const; - -protected slots: - void slotCurrentTabChanged(int tab); - void slotContentModified(); - -signals: - void contentModified(); - void titleChanged(const QString&); - -private: - HTMLEditorWidgetData* d; -}; - -#endif // RTEDITORWIDGET_H diff --git a/doc/examples/htmleditor/htmlfile.cpp b/doc/examples/htmleditor/htmlfile.cpp deleted file mode 100644 index 28305ee0f4a..00000000000 --- a/doc/examples/htmleditor/htmlfile.cpp +++ /dev/null @@ -1,130 +0,0 @@ -#include "htmlfile.h" -#include -#include - -namespace HTMLEditorConstants -{ - const char* const C_HTMLEDITOR_MIMETYPE = "text/html"; - const char* const C_HTMLEDITOR = "HTML Editor"; -} -struct HTMLFileData -{ - HTMLFileData(): mimeType(HTMLEditorConstants::C_HTMLEDITOR), - editorWidget(0), editor(0), modified(false) { } - const QString mimeType; - HTMLEditorWidget* editorWidget; - HTMLEditor* editor; - QString fileName; - bool modified; -}; - -HTMLFile::HTMLFile(HTMLEditor* editor, HTMLEditorWidget* editorWidget) - : Core::IFile(editor) -{ - d = new HTMLFileData; - d->editor = editor; - d->editorWidget = editorWidget; -} - - -HTMLFile::~HTMLFile() -{ - delete d; -} - -void HTMLFile::setModified(bool val) -{ - if(d->modified == val) - return; - - d->modified = val; - emit changed(); -} - -bool HTMLFile::isModified() const -{ - return d->modified; -} - -QString HTMLFile::mimeType() const -{ - return d->mimeType; -} - -bool HTMLFile::save(const QString &fileName) -{ - QFile file(fileName); - - if(file.open(QFile::WriteOnly)) - { - d->fileName = fileName; - - QByteArray content = d->editorWidget->content(); - file.write(content); - - setModified(false); - - return true; - } - return false; -} - -bool HTMLFile::open(const QString &fileName) -{ - QFile file(fileName); - - if(file.open(QFile::ReadOnly)) - { - d->fileName = fileName; - - QString path = QFileInfo(fileName).absolutePath(); - d->editorWidget->setContent(file.readAll(), path); - d->editor->setDisplayName(d->editorWidget->title()); - - return true; - } - return false; -} - -void HTMLFile::setFilename(const QString& filename) -{ - d->fileName = filename; -} - -QString HTMLFile::fileName() const -{ - return d->fileName; -} -QString HTMLFile::defaultPath() const -{ - return QString(); -} - -QString HTMLFile::suggestedFileName() const -{ - return QString(); -} - -QString HTMLFile::fileFilter() const -{ - return QString(); -} - -QString HTMLFile::fileExtension() const -{ - return QString(); -} - -bool HTMLFile::isReadOnly() const -{ - return false; -} -bool HTMLFile::isSaveAsAllowed() const -{ - return true; -} - -void HTMLFile::modified(ReloadBehavior* behavior) -{ - Q_UNUSED(behavior); -} diff --git a/doc/examples/htmleditor/htmlfile.h b/doc/examples/htmleditor/htmlfile.h deleted file mode 100644 index be3d528d04a..00000000000 --- a/doc/examples/htmleditor/htmlfile.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef HTMLFILE_H -#define HTMLFILE_H -#include "coreplugin/ifile.h" -#include "htmleditorwidget.h" -#include "htmleditor.h" - -struct HTMLFileData; -class HTMLFile : public Core::IFile -{ - Q_OBJECT - -public: - HTMLFile(HTMLEditor* editor, HTMLEditorWidget* editorWidget); - ~HTMLFile(); - - void setModified(bool val=true); - bool isModified() const ; - - bool save(const QString &filename); - bool open(const QString &filename); - void setFilename(const QString &filename); - QString mimiType(void) const ; - QString fileName() const; - QString defaultPath() const ; - QString mimeType() const; - QString suggestedFileName() const; - QString fileFilter() const; - QString fileExtension() const; - bool isReadOnly() const; - bool isSaveAsAllowed() const; - void modified(ReloadBehavior* behavior); - -protected slots: - void modified() { setModified(true); } -private: - HTMLFileData* d; -}; -#endif // HTMLFILE_H diff --git a/doc/examples/htmleditor/text-html-mimetype.xml b/doc/examples/htmleditor/text-html-mimetype.xml deleted file mode 100644 index 8e9f048bee9..00000000000 --- a/doc/examples/htmleditor/text-html-mimetype.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - HTML File - - - \ No newline at end of file diff --git a/doc/examples/loggermode/LoggerMode.pluginspec b/doc/examples/loggermode/LoggerMode.pluginspec deleted file mode 100644 index d9ace5e7678..00000000000 --- a/doc/examples/loggermode/LoggerMode.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FoocompanyInc - - - {{PLUGIN_DESCRIPTION}} - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/loggermode/loggermode.cpp b/doc/examples/loggermode/loggermode.cpp deleted file mode 100644 index 8460c9de64d..00000000000 --- a/doc/examples/loggermode/loggermode.cpp +++ /dev/null @@ -1,139 +0,0 @@ -#include "loggermode.h" -#include "loggermodewidget.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - - - -struct LoggerModeData -{ - QWidget *m_widget; - QLabel *currentProjectsLabel; - QLabel *addProjectLabel; - QComboBox *currentProjectsCombobox; - QComboBox *addProjectComboBox; - QPushButton *addToProjectButton; - QStackedWidget *stackedWidget; -}; - -LoggerMode::LoggerMode() -{ - d = new LoggerModeData; - d->m_widget = new QWidget; - - d->currentProjectsLabel = new QLabel("Current projects :"); - d->currentProjectsLabel->setFixedWidth(90); - d->currentProjectsCombobox = new QComboBox; - d->currentProjectsCombobox->setSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Preferred); - - d->addProjectLabel = new QLabel("Add Project :"); - d->addProjectLabel->setAlignment(Qt::AlignRight); - d->addProjectComboBox = new QComboBox; - d->addProjectComboBox->setSizePolicy(QSizePolicy::Preferred, - QSizePolicy::Preferred); - d->addProjectComboBox->setEditable(true); - - d->addToProjectButton = new QPushButton(tr("Add Project")); - d->addToProjectButton->setFixedWidth(80); - - - QHBoxLayout *hLayout = new QHBoxLayout; - hLayout->addWidget(d->currentProjectsLabel); - hLayout->addWidget(d->currentProjectsCombobox); - hLayout->addWidget(d->addProjectLabel); - hLayout->addWidget(d->addProjectComboBox); - hLayout->addWidget(d->addToProjectButton); - - - - d->stackedWidget = new QStackedWidget; - - QVBoxLayout* layout = new QVBoxLayout; - layout->addLayout(hLayout); - layout->addWidget(d->stackedWidget); - - d->m_widget->setLayout(layout); - - d->addProjectComboBox->addItem("Project 1"); - d->addProjectComboBox->addItem("Project 2"); - d->addProjectComboBox->addItem("Project 3"); - - connect(d->addToProjectButton,SIGNAL(clicked()), - this,SLOT(addItem())); - - connect(d->currentProjectsCombobox, SIGNAL(currentIndexChanged(int)), - d->stackedWidget, SLOT(setCurrentIndex(int))); -} - - -LoggerMode::~LoggerMode() -{ - delete d->m_widget; - delete d; -} - -void LoggerMode::addItem() -{ - d->currentProjectsCombobox->addItem(d->addProjectComboBox->currentText()); - addNewStackWidgetPage(d->currentProjectsCombobox->itemText(0)); - d->addProjectComboBox->removeItem(d->addProjectComboBox->currentIndex()); -} - -QString LoggerMode::name() const -{ - return tr("LoggerMode"); -} - - -QIcon LoggerMode::icon() const -{ - return QIcon(QLatin1String(":/core/images/qtcreator_logo_32.png")); -} - - -int LoggerMode::priority() const -{ - return 0; -} - - -QWidget* LoggerMode::widget() -{ - return d->m_widget; -} - - -const char* LoggerMode::uniqueModeName() const -{ - return "LoggerMode" ; -} - -QList LoggerMode::context() const -{ - return QList(); -} - -void LoggerMode::addNewStackWidgetPage(const QString projectName) -{ - d->stackedWidget->addWidget(new LoggerModeWidget(projectName)); -} - diff --git a/doc/examples/loggermode/loggermode.h b/doc/examples/loggermode/loggermode.h deleted file mode 100644 index cf6ad9da471..00000000000 --- a/doc/examples/loggermode/loggermode.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef LOGGERMODE_H -#define LOGGERMODE_H - -#include -#include -class QWidget; - -struct LoggerModeData; -class LoggerMode :public Core::IMode -{ - Q_OBJECT - -public: - LoggerMode(); - ~LoggerMode(); - - // IMode - QString name() const; - QIcon icon() const; - int priority() const; - QWidget *widget(); - const char *uniqueModeName() const; - QList context() const; - void activated(); - QString contextHelpId() const { return QLatin1String("Qt Creator"); } - -protected slots: - void addNewStackWidgetPage(const QString projectName); - void addItem(); - -private: - LoggerModeData *d; -}; - -#endif // NEWMODE_H diff --git a/doc/examples/loggermode/loggermodePlugin.cpp b/doc/examples/loggermode/loggermodePlugin.cpp deleted file mode 100644 index 87b87ef4a06..00000000000 --- a/doc/examples/loggermode/loggermodePlugin.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "loggermodePlugin.h" - -#include "loggermode.h" - -#include -#include - -LoggerModePlugin::LoggerModePlugin() -{ -} - -LoggerModePlugin::~LoggerModePlugin() -{ -} - -void LoggerModePlugin::extensionsInitialized() -{ -} - -bool LoggerModePlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - loggerMode = new LoggerMode; - addAutoReleasedObject(loggerMode); - - return true; -} - -void LoggerModePlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(LoggerModePlugin) diff --git a/doc/examples/loggermode/loggermodePlugin.h b/doc/examples/loggermode/loggermodePlugin.h deleted file mode 100644 index 106a9761963..00000000000 --- a/doc/examples/loggermode/loggermodePlugin.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef LOGGERMODE_PLUGIN_H -#define LOGGERMODE_PLUGIN_H - -#include - -class LoggerMode; -class LoggerModePlugin : public ExtensionSystem::IPlugin -{ -public: - LoggerModePlugin(); - ~LoggerModePlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -private: - LoggerMode *loggerMode; -}; - -#endif // NEWMODE_PLUGIN_H - diff --git a/doc/examples/loggermode/loggermodePlugin.pro b/doc/examples/loggermode/loggermodePlugin.pro deleted file mode 100644 index f1db2afb8b1..00000000000 --- a/doc/examples/loggermode/loggermodePlugin.pro +++ /dev/null @@ -1,20 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build -TEMPLATE = lib -TARGET = loggermode -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 = loggermodePlugin.h \ - loggermode.h \ - loggermodewidget.h -SOURCES = loggermodePlugin.cpp \ - loggermode.cpp \ - loggermodewidget.cpp -OTHER_FILES = LoggerMode.pluginspec diff --git a/doc/examples/loggermode/loggermodewidget.cpp b/doc/examples/loggermode/loggermodewidget.cpp deleted file mode 100644 index fc5b8e6c914..00000000000 --- a/doc/examples/loggermode/loggermodewidget.cpp +++ /dev/null @@ -1,192 +0,0 @@ -#include "loggermodewidget.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct LoggerModeWidgetData -{ - QLabel *progressLabel; - QLabel *hoursWorkedLabel; - QLabel *dateLabel; - QLabel *descriptionLabel; - QCalendarWidget *calendar; - QComboBox *progressComboBox; - QLineEdit *hoursWorkedLineEdit; - QPushButton *startTimerButton; - QPushButton *stopTimerButton; - QPushButton *saveButton; - QTimer *timer; - QTextEdit *textEdit; - QString projectName; - int totalTime; -}; - -LoggerModeWidget::LoggerModeWidget(const QString projectName, QWidget* parent) - :QWidget(parent) -{ - d = new LoggerModeWidgetData; - d->projectName = projectName; - d->totalTime = 0; - /* - // Catch hold of the plugin-manager - ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); - - // Look for the ProjectExplorerPlugin object - ProjectExplorer::ProjectExplorerPlugin* projectExplorerPlugin - = pm->getObject(); - - // Fetch a list of all open projects - QList projects =projectExplorerPlugin->session()->projects(); - Q_FOREACH(ProjectExplorer::Project* project, projects) - d->projectExplorerCombo->addItem( project->name()); - */ - QStringList percentList; - percentList <<"10%" <<"20%" <<"30%" <<"40%" <<"50%" - <<"60%" <<"70%" <<"80%" <<"90%" <<"100%" ; - d->progressLabel = new QLabel("Progress:"); - d->hoursWorkedLabel = new QLabel("Hours Worked:"); - d->dateLabel = new QLabel("Date:"); - d->descriptionLabel = new QLabel("Description :"); - d->hoursWorkedLineEdit = new QLineEdit; - d->hoursWorkedLineEdit->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - d->progressComboBox = new QComboBox; - d->progressComboBox->addItems(percentList); - d->progressComboBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - d->startTimerButton = new QPushButton(tr("Start Timer")); - d->startTimerButton->setFixedWidth(80); - d->stopTimerButton = new QPushButton(tr("Pause Timer")); - d->stopTimerButton->setFixedWidth(80); - d->stopTimerButton->setCheckable(true); - d->textEdit = new QTextEdit(this); - d->textEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); - d->calendar = new QCalendarWidget; - d->saveButton = new QPushButton(tr("Save To File")); - d->saveButton->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); - - QGroupBox *timeLoggerBox = new QGroupBox(tr("Time Logger")); - - QGridLayout *gLayout = new QGridLayout; - gLayout->addWidget(d->dateLabel, 0, 0, 1, 1); - gLayout->addWidget(d->calendar, 1, 0, 1, 3); - gLayout->addWidget(d->progressLabel, 2, 0, 1, 1); - gLayout->addWidget(d->progressComboBox, 2, 1, 1, 1); - gLayout->addWidget(d->hoursWorkedLabel, 3, 0, 1, 1); - gLayout->addWidget(d->hoursWorkedLineEdit, 3, 1, 1, 1); - gLayout->addWidget(d->startTimerButton, 4, 1, 1, 1); - gLayout->addWidget(d->stopTimerButton, 4, 2, 1, 1); - timeLoggerBox->setLayout(gLayout); - - d->timer = new QTimer(this); - //d->time.setHMS(0,0,0); - - // connection of SIGNALS and SLOTS - - connect(d->timer, SIGNAL(timeout()), this, SLOT(updateTime())); - connect(d->startTimerButton,SIGNAL(clicked()),this,SLOT(startTimeLog())); - connect(d->stopTimerButton,SIGNAL(clicked()),this,SLOT(endTimeLog())); - connect(d->saveButton, SIGNAL(clicked()), this, SLOT(saveToFile())); - - - QVBoxLayout *vLayout = new QVBoxLayout; - vLayout->addWidget(d->descriptionLabel); - vLayout->addWidget(d->textEdit); - - QHBoxLayout * hLayout = new QHBoxLayout; - hLayout->addWidget(timeLoggerBox); - hLayout->addLayout(vLayout); - - QHBoxLayout *bLayout = new QHBoxLayout; - bLayout->addStretch(1); - bLayout->addWidget(d->saveButton); - - QVBoxLayout *mainLayout = new QVBoxLayout(this); - mainLayout->addLayout(hLayout); - mainLayout->addLayout(bLayout); - mainLayout->addStretch(1); - -} - -LoggerModeWidget::~LoggerModeWidget() -{ - delete d; -} - -bool LoggerModeWidget::saveToFile() -{ - QString fileName = QFileDialog::getSaveFileName(this); - if (fileName.isEmpty()) - return false; - - QFile file(fileName); - if (!file.open(QFile::WriteOnly | QFile::Text)) { - QMessageBox::critical(this, tr("Application"), - tr("Unable to open file %1 for writing :\n%2.") - .arg(fileName) - .arg(file.errorString())); - return false; - } - - QTextStream out(&file); - -#ifndef QT_NO_CURSOR - QApplication::setOverrideCursor(Qt::WaitCursor); -#endif - out << "Project name : " << d->projectName << "\n"; - out << "Date : " << d->calendar->selectedDate().toString() << "\n"; - out << "Progress : " << d->progressComboBox->currentText() << "\n"; - out << "Duration : " << d->hoursWorkedLineEdit->text() << "\n\n"; - out << "Description : " << d->textEdit->toPlainText(); -#ifndef QT_NO_CURSOR - QApplication::restoreOverrideCursor(); -#endif - - return true; -} - -void LoggerModeWidget::startTimeLog() -{ - d->totalTime = 0; - d->timer->start(1000); -} - -void LoggerModeWidget::endTimeLog() -{ - if(d->stopTimerButton->isChecked()) - { - d->stopTimerButton->setText("Continue Timer"); - d->timer->stop(); - } - else - { - d->stopTimerButton->setText("Pause Timer"); - d->timer->start(1000); - } -} - -void LoggerModeWidget::updateTime() -{ - d->totalTime++; - QTime time(0,0,0); - time = time.addSecs(d->totalTime); - d->hoursWorkedLineEdit->setText(time.toString()); -} -/* -void LoggerModeWidget::setProjectName(QString name) -{ - d->projectName = name; -} -*/ diff --git a/doc/examples/loggermode/loggermodewidget.h b/doc/examples/loggermode/loggermodewidget.h deleted file mode 100644 index f05263f32fd..00000000000 --- a/doc/examples/loggermode/loggermodewidget.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef LOGGERMODEWIDGET_H -#define LOGGERMODEWIDGET_H - -#include - -struct LoggerModeWidgetData; -class LoggerModeWidget : public QWidget -{ - Q_OBJECT - -public: - LoggerModeWidget(const QString projectName, QWidget* parent = 0); - ~LoggerModeWidget(); - -public slots: - //void setProjectName(QString name); - -protected slots: - bool saveToFile(); - void startTimeLog(); - void endTimeLog(); - void updateTime(); - -private: - LoggerModeWidgetData* d; -}; - -#endif // NEWMODEWIDGET_H diff --git a/doc/examples/menu/addingmenu/DoNothing.pluginspec b/doc/examples/menu/addingmenu/DoNothing.pluginspec deleted file mode 100644 index 35e922e5af1..00000000000 --- a/doc/examples/menu/addingmenu/DoNothing.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompanyInc - FooCompanyInc - - DO NOTHING - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/menu/addingmenu/donothingplugin.cpp b/doc/examples/menu/addingmenu/donothingplugin.cpp deleted file mode 100644 index 7fd1ff5cf65..00000000000 --- a/doc/examples/menu/addingmenu/donothingplugin.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "donothingplugin.h" -#include -#include -#include -#include -#include - -#include -#include -#include - -DoNothingPlugin::DoNothingPlugin() -{ - // Do nothing -} - -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - -void DoNothingPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool DoNothingPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - // Fetch the action manager - Core::ActionManager* am = Core::ICore::instance()->actionManager(); - - // Create a DoNothing menu - Core::ActionContainer* ac = am->createMenu("DoNothingPlugin.DoNothingMenu"); - ac->menu()->setTitle("DoNothing"); - - // Create a command for "About DoNothing". - QAction *action = new QAction(tr("About DoNothing"),this); - Core::Command* cmd = am->registerAction(action,"DoNothingPlugin.AboutDoNothing",QList() << 0); - - // Add DoNothing menu to the menubar - am->actionContainer(Core::Constants::MENU_BAR)->addMenu(ac); - - // Add the "About DoNothing" action to the DoNothing menu - ac->addAction(cmd); - - // Connect the action - connect(action, SIGNAL(triggered(bool)), this, SLOT(about())); - return true; -} - -void DoNothingPlugin::shutdown() -{ - // Do nothing -} -void DoNothingPlugin::about() -{ - QMessageBox::information(0, "About DoNothing Plugin", - "Seriously dude, this plugin does nothing"); -} - -Q_EXPORT_PLUGIN(DoNothingPlugin) diff --git a/doc/examples/menu/addingmenu/donothingplugin.h b/doc/examples/menu/addingmenu/donothingplugin.h deleted file mode 100644 index 2cda18bae1a..00000000000 --- a/doc/examples/menu/addingmenu/donothingplugin.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef DONOTHING_PLUGIN_H -#define DONOTHING_PLUGIN_H - -#include - -class DoNothingPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - DoNothingPlugin(); - ~DoNothingPlugin(); - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -private slots: - void about(); - -}; - -#endif // DONOTHING_PLUGIN_H - diff --git a/doc/examples/menu/addingmenu/donothingplugin.pro b/doc/examples/menu/addingmenu/donothingplugin.pro deleted file mode 100644 index ac69a5398e4..00000000000 --- a/doc/examples/menu/addingmenu/donothingplugin.pro +++ /dev/null @@ -1,20 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build - -TEMPLATE = lib -TARGET = DoNothing - -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 = donothingplugin.h -SOURCES = donothingplugin.cpp -OTHER_FILES = DoNothing.pluginspec - - diff --git a/doc/examples/menu/placingmenu/DoNothing.pluginspec b/doc/examples/menu/placingmenu/DoNothing.pluginspec deleted file mode 100644 index 35e922e5af1..00000000000 --- a/doc/examples/menu/placingmenu/DoNothing.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompanyInc - FooCompanyInc - - DO NOTHING - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/menu/placingmenu/donothingplugin.cpp b/doc/examples/menu/placingmenu/donothingplugin.cpp deleted file mode 100644 index 63cda06978a..00000000000 --- a/doc/examples/menu/placingmenu/donothingplugin.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include "donothingplugin.h" -#include -#include -#include -#include -#include - -#include -#include -#include - -DoNothingPlugin::DoNothingPlugin() -{ - // Do nothing -} - -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - -void DoNothingPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool DoNothingPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - // Fetch the action manager - Core::ActionManager* am = Core::ICore::instance()->actionManager(); - - // Create a DoNothing menu - Core::ActionContainer* ac = am->createMenu("DoNothingPlugin.DoNothingMenu"); - ac->menu()->setTitle("DoNothing"); - - // Create a command for "About DoNothing". - QAction *action = new QAction(tr("About DoNothing"),this); - Core::Command* cmd = am->registerAction(action,"DoNothingPlugin.AboutDoNothing",QList() << 0); - - // Insert the "DoNothing" menu between "Window" and "Help". - QMenu* windowMenu = am->actionContainer(Core::Constants::M_HELP)->menu(); - QMenuBar* menuBar = am->actionContainer(Core::Constants::MENU_BAR)->menuBar(); - menuBar->insertMenu(windowMenu->menuAction(), ac->menu()); - - // Add the "About DoNothing" action to the DoNothing menu - ac->addAction(cmd); - - // Connect the action - connect(action, SIGNAL(triggered(bool)), this, SLOT(about())); - return true; -} - -void DoNothingPlugin::shutdown() -{ - // Do nothing -} -void DoNothingPlugin::about() -{ - QMessageBox::information(0, "About DoNothing Plugin", - "Seriously dude, this plugin does nothing"); -} - -Q_EXPORT_PLUGIN(DoNothingPlugin) diff --git a/doc/examples/menu/placingmenu/donothingplugin.h b/doc/examples/menu/placingmenu/donothingplugin.h deleted file mode 100644 index 2cda18bae1a..00000000000 --- a/doc/examples/menu/placingmenu/donothingplugin.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef DONOTHING_PLUGIN_H -#define DONOTHING_PLUGIN_H - -#include - -class DoNothingPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - DoNothingPlugin(); - ~DoNothingPlugin(); - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -private slots: - void about(); - -}; - -#endif // DONOTHING_PLUGIN_H - diff --git a/doc/examples/menu/placingmenu/donothingplugin.pro b/doc/examples/menu/placingmenu/donothingplugin.pro deleted file mode 100644 index ac69a5398e4..00000000000 --- a/doc/examples/menu/placingmenu/donothingplugin.pro +++ /dev/null @@ -1,20 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build - -TEMPLATE = lib -TARGET = DoNothing - -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 = donothingplugin.h -SOURCES = donothingplugin.cpp -OTHER_FILES = DoNothing.pluginspec - - diff --git a/doc/examples/menu/registeringmenuitem/DoNothing.pluginspec b/doc/examples/menu/registeringmenuitem/DoNothing.pluginspec deleted file mode 100644 index 35e922e5af1..00000000000 --- a/doc/examples/menu/registeringmenuitem/DoNothing.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompanyInc - FooCompanyInc - - DO NOTHING - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/menu/registeringmenuitem/donothingplugin.cpp b/doc/examples/menu/registeringmenuitem/donothingplugin.cpp deleted file mode 100644 index a2e6bd507ce..00000000000 --- a/doc/examples/menu/registeringmenuitem/donothingplugin.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include "donothingplugin.h" -#include -#include -#include -#include -#include - -#include -#include - -DoNothingPlugin::DoNothingPlugin() -{ - // Do nothing -} - -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - -void DoNothingPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool DoNothingPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - // Fetch the action manager - Core::ActionManager* am = Core::ICore::instance()->actionManager(); - - // Create a command for "About DoNothing". - Core::Command* cmd = am->registerAction(new QAction(tr("About DoNothing"),this),"DoNothingPlugin.AboutDoNothing", - QList() <actionContainer(Core::Constants::M_HELP)->addAction(cmd); - return true; -} - -void DoNothingPlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(DoNothingPlugin) diff --git a/doc/examples/menu/registeringmenuitem/donothingplugin.h b/doc/examples/menu/registeringmenuitem/donothingplugin.h deleted file mode 100644 index 25356a74433..00000000000 --- a/doc/examples/menu/registeringmenuitem/donothingplugin.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef DONOTHING_PLUGIN_H -#define DONOTHING_PLUGIN_H - -#include - -class DoNothingPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - DoNothingPlugin(); - ~DoNothingPlugin(); - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // DONOTHING_PLUGIN_H - diff --git a/doc/examples/menu/registeringmenuitem/donothingplugin.pro b/doc/examples/menu/registeringmenuitem/donothingplugin.pro deleted file mode 100644 index ac69a5398e4..00000000000 --- a/doc/examples/menu/registeringmenuitem/donothingplugin.pro +++ /dev/null @@ -1,20 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build - -TEMPLATE = lib -TARGET = DoNothing - -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 = donothingplugin.h -SOURCES = donothingplugin.cpp -OTHER_FILES = DoNothing.pluginspec - - diff --git a/doc/examples/menu/respondtomenuitem/DoNothing.pluginspec b/doc/examples/menu/respondtomenuitem/DoNothing.pluginspec deleted file mode 100644 index 59cf450b9f8..00000000000 --- a/doc/examples/menu/respondtomenuitem/DoNothing.pluginspec +++ /dev/null @@ -1,11 +0,0 @@ - - FooCompanyInc - FooCompanyInc - - GPL - DO NOTHING - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/menu/respondtomenuitem/donothingplugin.cpp b/doc/examples/menu/respondtomenuitem/donothingplugin.cpp deleted file mode 100644 index a093bae2947..00000000000 --- a/doc/examples/menu/respondtomenuitem/donothingplugin.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "donothingplugin.h" -#include -#include -#include -#include -#include - -#include -#include -#include - -DoNothingPlugin::DoNothingPlugin() -{ - // Do nothing -} - -DoNothingPlugin::~DoNothingPlugin() -{ - // Do notning -} - -void DoNothingPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool DoNothingPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - // Fetch the action manager - Core::ActionManager* am = Core::ICore::instance()->actionManager(); - - // Create a command for "About DoNothing". - QAction *action = new QAction(tr("About DoNothing"),this); - Core::Command* cmd = am->registerAction(action,"DoNothingPlugin.AboutDoNothing",QList() << 0); - Core::ActionContainer* ac = am->createMenu("DoNothingPlugin.DoNothingMenu"); - - // Add the command to Help menu - am->actionContainer(Core::Constants::M_HELP)->addAction(cmd); - - connect(action, SIGNAL(triggered(bool)), this, SLOT(about())); - return true; -} - -void DoNothingPlugin::shutdown() -{ - // Do nothing -} -void DoNothingPlugin::about() -{ - QMessageBox::information(0, "About DoNothing Plugin", - "Seriously dude, this plugin does nothing"); -} - -Q_EXPORT_PLUGIN(DoNothingPlugin) diff --git a/doc/examples/menu/respondtomenuitem/donothingplugin.h b/doc/examples/menu/respondtomenuitem/donothingplugin.h deleted file mode 100644 index 2cda18bae1a..00000000000 --- a/doc/examples/menu/respondtomenuitem/donothingplugin.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef DONOTHING_PLUGIN_H -#define DONOTHING_PLUGIN_H - -#include - -class DoNothingPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - DoNothingPlugin(); - ~DoNothingPlugin(); - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -private slots: - void about(); - -}; - -#endif // DONOTHING_PLUGIN_H - diff --git a/doc/examples/menu/respondtomenuitem/donothingplugin.pro b/doc/examples/menu/respondtomenuitem/donothingplugin.pro deleted file mode 100644 index ac69a5398e4..00000000000 --- a/doc/examples/menu/respondtomenuitem/donothingplugin.pro +++ /dev/null @@ -1,20 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build - -TEMPLATE = lib -TARGET = DoNothing - -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 = donothingplugin.h -SOURCES = donothingplugin.cpp -OTHER_FILES = DoNothing.pluginspec - - diff --git a/doc/examples/preferencepane/PreferencePane.pluginspec b/doc/examples/preferencepane/PreferencePane.pluginspec deleted file mode 100644 index 227b4807c8f..00000000000 --- a/doc/examples/preferencepane/PreferencePane.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompanyInc Pvt. Ltd - (C) 2009-2010 FooCompanyInc Pvt. Ltd. - - {{PLUGIN_DESCRIPTION}} - http://www.FooCompany.com - - - - diff --git a/doc/examples/preferencepane/modifiedfilelister.cpp b/doc/examples/preferencepane/modifiedfilelister.cpp deleted file mode 100644 index 12d4c95025e..00000000000 --- a/doc/examples/preferencepane/modifiedfilelister.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "modifiedfilelister.h" -#include "modifiedfilelistwidget.h" - -ModifiedFileLister::ModifiedFileLister(QObject *parent): IOptionsPage(parent) -{ - -} - -ModifiedFileLister::~ModifiedFileLister() -{ - -} - -QString ModifiedFileLister::id() const -{ - return "ModifiedFiles"; -} - -QString ModifiedFileLister::trName() const -{ - return tr("Modified Files"); -} - -QString ModifiedFileLister::category() const -{ - return "Help"; -} - -QString ModifiedFileLister::trCategory() const -{ - return tr("Help"); -} - -QWidget *ModifiedFileLister::createPage(QWidget *parent) -{ - return new ModifiedFileListWidget(parent); -} - -void ModifiedFileLister::apply() -{ - // Do nothing -} - -void ModifiedFileLister::finish() -{ - // Do nothing -} diff --git a/doc/examples/preferencepane/modifiedfilelister.h b/doc/examples/preferencepane/modifiedfilelister.h deleted file mode 100644 index 8b4d41c40ae..00000000000 --- a/doc/examples/preferencepane/modifiedfilelister.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef MODIFIEDFILELISTER_H -#define MODIFIEDFILELISTER_H - -#include -class ModifiedFileLister : public Core::IOptionsPage -{ - Q_OBJECT - -public: - ModifiedFileLister(QObject *parent = 0); - ~ModifiedFileLister(); - // IOptionsPage implementation - QString id() const; - QString trName() const; - QString category() const; - QString trCategory() const; - QWidget *createPage(QWidget *parent); - void apply(); - void finish(); -}; -#endif // MODIFIEDFILELISTER_H diff --git a/doc/examples/preferencepane/modifiedfilelistwidget.cpp b/doc/examples/preferencepane/modifiedfilelistwidget.cpp deleted file mode 100644 index f9030a8a891..00000000000 --- a/doc/examples/preferencepane/modifiedfilelistwidget.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "modifiedfilelistwidget.h" - -#include -#include -#include - -ModifiedFileListWidget::ModifiedFileListWidget(QWidget* parent):QListWidget(parent) -{ - // Show the list of modified pages - Core::FileManager* fm = Core::ICore::instance()->fileManager(); - QList files = fm->modifiedFiles(); - - for(int i=0; iaddItem(files.at(i)->fileName()); -} - -ModifiedFileListWidget::~ModifiedFileListWidget() -{ - //Do Nothing -} diff --git a/doc/examples/preferencepane/modifiedfilelistwidget.h b/doc/examples/preferencepane/modifiedfilelistwidget.h deleted file mode 100644 index 81880163ee4..00000000000 --- a/doc/examples/preferencepane/modifiedfilelistwidget.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef MODIFIEDFILELISTWIDGET_H -#define MODIFIEDFILELISTWIDGET_H - -#include -class ModifiedFileListWidget: public QListWidget -{ - Q_OBJECT - -public: - ModifiedFileListWidget(QWidget* parent=0); - ~ModifiedFileListWidget(); -}; - -#endif // MODIFIEDFILELISTWIDGET_H diff --git a/doc/examples/preferencepane/preferencepaneplugin.cpp b/doc/examples/preferencepane/preferencepaneplugin.cpp deleted file mode 100644 index d1cc8929fb0..00000000000 --- a/doc/examples/preferencepane/preferencepaneplugin.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "preferencepaneplugin.h" -#include "modifiedfilelister.h" - -#include -#include - -PreferencePanePlugin::PreferencePanePlugin() -{ - // Do nothing -} - -PreferencePanePlugin::~PreferencePanePlugin() -{ - // Do notning -} - -void PreferencePanePlugin::extensionsInitialized() -{ - // Do nothing -} - -bool PreferencePanePlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - addAutoReleasedObject(new ModifiedFileLister); - return true; -} - -void PreferencePanePlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(PreferencePanePlugin) diff --git a/doc/examples/preferencepane/preferencepaneplugin.h b/doc/examples/preferencepane/preferencepaneplugin.h deleted file mode 100644 index 808cd04b81d..00000000000 --- a/doc/examples/preferencepane/preferencepaneplugin.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef PREFERENCEPANE_PLUGIN_H -#define PREFERENCEPANE_PLUGIN_H - -#include - -class PreferencePanePlugin : public ExtensionSystem::IPlugin -{ -public: - PreferencePanePlugin(); - ~PreferencePanePlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // PREFERENCEPANE_PLUGIN_H - diff --git a/doc/examples/preferencepane/preferencepaneplugin.pro b/doc/examples/preferencepane/preferencepaneplugin.pro deleted file mode 100644 index 1fd34e184df..00000000000 --- a/doc/examples/preferencepane/preferencepaneplugin.pro +++ /dev/null @@ -1,21 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build -TEMPLATE = lib -TARGET = PreferencePane -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 = preferencepaneplugin.h \ - modifiedfilelistwidget.h \ - modifiedfilelister.h -SOURCES = preferencepaneplugin.cpp \ - modifiedfilelistwidget.cpp \ - modifiedfilelister.cpp -OTHER_FILES = PreferencePane.pluginspec diff --git a/doc/examples/progressbar/ProgressBar.pluginspec b/doc/examples/progressbar/ProgressBar.pluginspec deleted file mode 100644 index 0e021e8efe9..00000000000 --- a/doc/examples/progressbar/ProgressBar.pluginspec +++ /dev/null @@ -1,11 +0,0 @@ - - FooCompanyInc - - - {{PLUGIN_DESCRIPTION}} - http://www.foocompany.com - - - - - diff --git a/doc/examples/progressbar/headerfilteprogress.cpp b/doc/examples/progressbar/headerfilteprogress.cpp deleted file mode 100644 index d436d1b996e..00000000000 --- a/doc/examples/progressbar/headerfilteprogress.cpp +++ /dev/null @@ -1,188 +0,0 @@ -#include "headerfilterprogress.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace Core; -using namespace Utils; -using namespace TextEditor; - - -struct HeaderFilterProgressData - { - HeaderFilterProgressData() : projectPlugin(0), m_searchResultWindow(0){} - QFutureWatcher watcher; - QLabel* resultLabel; - - - ProjectExplorer::ProjectExplorerPlugin* projectExplorer() - { - if(projectPlugin) - return projectPlugin; - - ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); - projectPlugin = pm->getObject(); - return projectPlugin; - } - - // Method to search and return the search window - - Find::SearchResultWindow* searchResultWindow() - { - if(m_searchResultWindow) - return m_searchResultWindow; - - ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); - m_searchResultWindow = pm->getObject(); - return m_searchResultWindow; - } - - - private: - ProjectExplorer::ProjectExplorerPlugin* projectPlugin; - Find::SearchResultWindow* m_searchResultWindow; - -}; - -HeaderFilterProgress::HeaderFilterProgress() -{ - d = new HeaderFilterProgressData; - d->watcher.setPendingResultsLimit(1); - d->resultLabel = 0 ; - - - // displayResult(int) is called when every a new - // search result is generated - connect(&d->watcher, SIGNAL(resultReadyAt(int)),this, SLOT(displayResult(int))); -} - -HeaderFilterProgress::~HeaderFilterProgress() -{ - delete d; -} - -QString HeaderFilterProgress::id() const -{ - return "HeaderFilter"; -} - -QString HeaderFilterProgress::name() const -{ - return tr("Header Filter"); -} - -bool HeaderFilterProgress::isEnabled() const -{ - QList projects = d->projectExplorer()->session()->projects(); - if(projects.count()) - return true; - - return false; -} - -QKeySequence HeaderFilterProgress::defaultShortcut() const -{ - return QKeySequence(); -} - - - -void HeaderFilterProgress::findAll(const QString &text,QTextDocument::FindFlags findFlags) - { - - // Fetch a list of all open projects - QList 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); - - // Remove duplicates - files.removeDuplicates(); - - //------------------------------------------------------------ - // Begin searching - QString includeline = "#include <" + text + ">"; - Find::SearchResult* result = d->searchResultWindow()->startNewSearch(); - - d->watcher.setFuture(QFuture()); - - //When result gets activated it invokes the openEditor function - connect(result, SIGNAL(activated(Find::SearchResultItem)), - this, SLOT(openEditor(Find::SearchResultItem))); - - d->searchResultWindow()->popup(true); - - // Let the watcher monitor the search results - d->watcher.setFuture(Utils::findInFiles(includeline, files, findFlags)); - - //Creates the Progres bar - Core::FutureProgress* progress = - Core::ICore::instance()->progressManager()->addTask(d->watcher.future(), - "MySearch", - Find::Constants::TASK_SEARCH, - Core::ProgressManager::KeepOnFinish - ); - progress->setWidget(createProgressWidget()); - connect(progress, SIGNAL(clicked()), d->searchResultWindow(), SLOT(popup())); -} - - -QWidget* HeaderFilterProgress::createProgressWidget() -{ - d->resultLabel = new QLabel; - d->resultLabel->setAlignment(Qt::AlignCenter); - QFont f = d->resultLabel->font(); - f.setBold(true); - f.setPointSizeF(StyleHelper::sidebarFontSize()); - d->resultLabel->setFont(f); - d->resultLabel->setPalette(StyleHelper::sidebarFontPalette(d->resultLabel->palette())); - d->resultLabel->setText(tr("%1 found").arg(d->searchResultWindow()->numberOfResults())); - return d->resultLabel; -} - -QWidget* HeaderFilterProgress::createConfigWidget() -{ - return (new QLabel("This is a header filter")); -} - -void HeaderFilterProgress::displayResult(int index) -{ - FileSearchResult result = d->watcher.future().resultAt(index); - - d->searchResultWindow()->addResult(result.fileName, - result.lineNumber, - result.matchingLine, - result.matchStart, - result.matchLength); - if (d->resultLabel) - d->resultLabel->setText(tr("%1 found").arg(d->searchResultWindow()->numberOfResults())); -} - - - -void HeaderFilterProgress::openEditor(const Find::SearchResultItem &item) -{ - TextEditor::BaseTextEditor::openEditorAt(item.fileName, item.lineNumber, item.index); -} - - diff --git a/doc/examples/progressbar/headerfilterprogress.h b/doc/examples/progressbar/headerfilterprogress.h deleted file mode 100644 index 2c321ee5218..00000000000 --- a/doc/examples/progressbar/headerfilterprogress.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef HEADERFILTERPROGRESS_H -#define HEADERFILTERPROGRESS_H - - -#include -#include -#include - -namespace Find { -class SearchResultWindow; -struct SearchResultItem; -} - -class QKeySequence; -class QWidget; - - - -struct HeaderFilterProgressData; -class HeaderFilterProgress : public Find::IFindFilter -{ - Q_OBJECT - -public: - HeaderFilterProgress(); - ~HeaderFilterProgress(); - QString id() const; - QString name() const; - bool isEnabled() const; - QKeySequence defaultShortcut() const; - void findAll(const QString &txt,QTextDocument::FindFlags findFlags); - QWidget* createConfigWidget(); - QWidget* createProgressWidget(); - -protected slots: - void displayResult(int index); - void openEditor(const Find::SearchResultItem &item); - -private: - HeaderFilterProgressData* d; - -}; - - -#endif // HEADERFILTERPROGRESS_H diff --git a/doc/examples/progressbar/progressbar.pro b/doc/examples/progressbar/progressbar.pro deleted file mode 100644 index 952f41036c0..00000000000 --- a/doc/examples/progressbar/progressbar.pro +++ /dev/null @@ -1,28 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build -DEFINES += FIND_LIBRARY - -TEMPLATE = lib -TARGET = ProgressBar -IDE_SOURCE_TREE = $$QTC_SOURCE -IDE_BUILD_TREE = $$QTC_BUILD - -PROVIDER = FooCompanyInc - - -include($$QTC_SOURCE/src/libs/extensionsystem/extensionsystem.pri) -include($$QTC_SOURCE/src/qtcreatorplugin.pri) -include($$QTC_SOURCE/src/plugins/coreplugin/coreplugin.pri) -include($$QTC_SOURCE/src/libs/utils/utils.pri) -include($$QTC_SOURCE/src/plugins/projectexplorer/projectexplorer.pri) -include($$QTC_SOURCE/src/plugins/find/find.pri) - -LIBS += -L$$IDE_PLUGIN_PATH/Nokia - -HEADERS = progressbarplugin.h \ - headerfilterprogress.h -SOURCES = progressbarplugin.cpp \ - headerfilteprogress.cpp - -OTHER_FILES = ProgressBar.pluginspec - diff --git a/doc/examples/progressbar/progressbarplugin.cpp b/doc/examples/progressbar/progressbarplugin.cpp deleted file mode 100644 index af06a838cc0..00000000000 --- a/doc/examples/progressbar/progressbarplugin.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "progressbarplugin.h" -#include "headerfilterprogress.h" - -#include -#include - -ProgressBarPlugin::ProgressBarPlugin() -{ - // Do nothing -} - -ProgressBarPlugin::~ProgressBarPlugin() -{ - // Do notning -} - -void ProgressBarPlugin::extensionsInitialized() -{ - // Do nothing -} - -bool ProgressBarPlugin::initialize(const QStringList& args, QString *errMsg) -{ - Q_UNUSED(args); - Q_UNUSED(errMsg); - - addAutoReleasedObject( new HeaderFilterProgress); - return true; -} - -void ProgressBarPlugin::shutdown() -{ - // Do nothing -} - -Q_EXPORT_PLUGIN(ProgressBarPlugin) diff --git a/doc/examples/progressbar/progressbarplugin.h b/doc/examples/progressbar/progressbarplugin.h deleted file mode 100644 index 7ae94153050..00000000000 --- a/doc/examples/progressbar/progressbarplugin.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef PROGRESSBAR_PLUGIN_H -#define PROGRESSBAR_PLUGIN_H - -#include - -class ProgressBarPlugin : public ExtensionSystem::IPlugin -{ - Q_OBJECT - -public: - ProgressBarPlugin(); - ~ProgressBarPlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString* errorString); - void shutdown(); -}; - -#endif // PROGRESSBAR_PLUGIN_H - diff --git a/doc/examples/wizard/customproject/CustomProject.pluginspec b/doc/examples/wizard/customproject/CustomProject.pluginspec deleted file mode 100644 index 755f91acd7b..00000000000 --- a/doc/examples/wizard/customproject/CustomProject.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompanyInc - - - {{PLUGIN_DESCRIPTION}} - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/wizard/customproject/customprojectplugin.cpp b/doc/examples/wizard/customproject/customprojectplugin.cpp deleted file mode 100644 index cbb1ca68e21..00000000000 --- a/doc/examples/wizard/customproject/customprojectplugin.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "customprojectplugin.h" -#include "customprojectwizard.h" - -#include -#include - -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) diff --git a/doc/examples/wizard/customproject/customprojectplugin.h b/doc/examples/wizard/customproject/customprojectplugin.h deleted file mode 100644 index ea06d193b8c..00000000000 --- a/doc/examples/wizard/customproject/customprojectplugin.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef CUSTOMPROJECT_PLUGIN_H -#define CUSTOMPROJECT_PLUGIN_H - -#include - -class CustomProjectPlugin : public ExtensionSystem::IPlugin -{ -public: - CustomProjectPlugin(); - ~CustomProjectPlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // CUSTOMPROJECT_PLUGIN_H - diff --git a/doc/examples/wizard/customproject/customprojectplugin.pro b/doc/examples/wizard/customproject/customprojectplugin.pro deleted file mode 100644 index 7b7fca9f263..00000000000 --- a/doc/examples/wizard/customproject/customprojectplugin.pro +++ /dev/null @@ -1,18 +0,0 @@ -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 diff --git a/doc/examples/wizard/customproject/customprojectwizard.cpp b/doc/examples/wizard/customproject/customprojectwizard.cpp deleted file mode 100644 index 662e8cc0b92..00000000000 --- a/doc/examples/wizard/customproject/customprojectwizard.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "customprojectwizard.h" - -#include -#include -#include - -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(); -} diff --git a/doc/examples/wizard/customproject/customprojectwizard.h b/doc/examples/wizard/customproject/customprojectwizard.h deleted file mode 100644 index d934878813c..00000000000 --- a/doc/examples/wizard/customproject/customprojectwizard.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef CUSTOMPROJECTWIZARD_H -#define CUSTOMPROJECTWIZARD_H - -#include - -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 diff --git a/doc/examples/wizard/itemmodelwizard/ItemModelHeader.txt b/doc/examples/wizard/itemmodelwizard/ItemModelHeader.txt deleted file mode 100644 index 3bca49049be..00000000000 --- a/doc/examples/wizard/itemmodelwizard/ItemModelHeader.txt +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef {{UPPER_CLASS_NAME}}_H -#define {{UPPER_CLASS_NAME}}_H - -#include <{{BASE_CLASS_NAME}}> - -struct {{CLASS_NAME}}Data; - -class {{CLASS_NAME}} : public {{BASE_CLASS_NAME}} -{ - Q_OBJECT - -public: - {{CLASS_NAME}}(QObject* parent=0); - ~{{CLASS_NAME}}(); - int rowCount(const QModelIndex& parent) const; - QVariant data(const QModelIndex& index, int role) const; - -private: - {{CLASS_NAME}}Data* d; -}; - -#endif // {{UPPER_CLASS_NAME}}_H diff --git a/doc/examples/wizard/itemmodelwizard/ItemModelSource.txt b/doc/examples/wizard/itemmodelwizard/ItemModelSource.txt deleted file mode 100644 index 3a5ba8abd44..00000000000 --- a/doc/examples/wizard/itemmodelwizard/ItemModelSource.txt +++ /dev/null @@ -1,23 +0,0 @@ -#include <{{CLASS_HEADER}}> - -struct {{CLASS_NAME}}Data -{ -}; - -{{CLASS_NAME}}::{{CLASS_NAME}}(QObject* parent) - :{{BASE_CLASS_NAME}}(parent) -{ - d = {{CLASS_NAME}}Data; -} - -{{CLASS_NAME}}::~{{CLASS_NAME}}() -{ -} - -int {{CLASS_NAME}}::rowCount(const QModelIndex& parent) const -{ -} - -QVariant {{CLASS_NAME}}::data(const QModelIndex& index, int role) const -{ -} diff --git a/doc/examples/wizard/itemmodelwizard/ItemModelWizard.pluginspec b/doc/examples/wizard/itemmodelwizard/ItemModelWizard.pluginspec deleted file mode 100644 index 1ffcd881093..00000000000 --- a/doc/examples/wizard/itemmodelwizard/ItemModelWizard.pluginspec +++ /dev/null @@ -1,10 +0,0 @@ - - FooCompanyInc - - - {{PLUGIN_DESCRIPTION}} - http://www.FooCompanyInc.com - - - - diff --git a/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp b/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp deleted file mode 100644 index 22f491c211c..00000000000 --- a/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include "itemmodelwizardplugin.h" -#include "modelclasswizard.h" -#include -#include -#include - -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) diff --git a/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h b/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h deleted file mode 100644 index 2e60f64dc45..00000000000 --- a/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef ITEMMODELWIZARD_PLUGIN_H -#define ITEMMODELWIZARD_PLUGIN_H - -#include - -class ItemModelWizardPlugin : public ExtensionSystem::IPlugin -{ -public: - ItemModelWizardPlugin(); - ~ItemModelWizardPlugin(); - - void extensionsInitialized(); - bool initialize(const QStringList & arguments, QString * errorString); - void shutdown(); -}; - -#endif // ITEMMODELWIZARD_PLUGIN_H - diff --git a/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro b/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro deleted file mode 100644 index 3cedbf94d6d..00000000000 --- a/doc/examples/wizard/itemmodelwizard/itemmodelwizardplugin.pro +++ /dev/null @@ -1,25 +0,0 @@ -QTC_SOURCE = C:/Work/QtCreator -QTC_BUILD = C:/Work/QtCreator/build -TEMPLATE = lib -TARGET = ItemModelWizard -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) -include($$QTC_SOURCE/src/plugins/texteditor/texteditor.pri) -include($$QTC_SOURCE/src/plugins/cppeditor/cppeditor.pri) - -LIBS += -L$$IDE_PLUGIN_PATH/Nokia - -HEADERS = itemmodelwizardplugin.h \ - modelnamepage.h \ - modelclasswizard.h -SOURCES = itemmodelwizardplugin.cpp \ - modelnamepage.cpp \ - modelclasswizard.cpp -OTHER_FILES = ItemModelWizard.pluginspec -FORMS += modelnamepage.ui - -RESOURCES += template.qrc diff --git a/doc/examples/wizard/itemmodelwizard/modelclasswizard.cpp b/doc/examples/wizard/itemmodelwizard/modelclasswizard.cpp deleted file mode 100644 index c382e571082..00000000000 --- a/doc/examples/wizard/itemmodelwizard/modelclasswizard.cpp +++ /dev/null @@ -1,101 +0,0 @@ -#include "modelclasswizard.h" -#include "modelnamepage.h" - -#include -#include -#include -#include -#include - -ModelClassWizard::ModelClassWizard(const Core::BaseFileWizardParameters ¶meters,QObject *parent) -: Core::BaseFileWizard(parameters, parent) -{ -} - -ModelClassWizard::~ModelClassWizard() -{ -} - -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"); - - // Make our page as first page - ModelNamePage* page = new ModelNamePage(wizard); - int pageId = wizard->addPage(page); - wizard->setProperty("_PageId_", pageId); - page->setPath(defaultPath); - - // Now add the remaining pages - foreach (QWizardPage *p, extensionPages) - wizard->addPage(p); - return wizard; -} - -QString ModelClassWizard::readFile(const QString& fileName, const QMap& - replacementMap) const -{ - QFile file(fileName); - file.open(QFile::ReadOnly); - QString retStr = file.readAll(); - QMap::const_iterator it = replacementMap.begin(); - QMap::const_iterator end = replacementMap.end(); - - while(it != end) - { - retStr.replace(it.key(), it.value()); - ++it; - } - return retStr; -} - -Core::GeneratedFiles ModelClassWizard::generateFiles( - const QWizard *w,QString *errorMessage) const -{ - Q_UNUSED(errorMessage); - Core::GeneratedFiles ret; - int pageId = w->property("_PageId_").toInt(); - ModelNamePage* page = qobject_cast(w->page(pageId)); - - if(!page) - return ret; - ModelClassParameters params = page->parameters(); - QMap replacementMap; - - replacementMap["{{UPPER_CLASS_NAME}}"] = params.className.toUpper(); - replacementMap["{{BASE_CLASS_NAME}}"] = params.baseClass; - replacementMap["{{CLASS_NAME}}"] = params.className; - replacementMap["{{CLASS_HEADER}}"] = QFileInfo(params.headerFile).fileName(); - - Core::GeneratedFile headerFile(params.path + "/" + params.headerFile); - headerFile.setEditorKind(CppEditor::Constants::CPPEDITOR_KIND); - - 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) ); - } - - 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) ); - } - - ret << headerFile << sourceFile; - return ret; -} diff --git a/doc/examples/wizard/itemmodelwizard/modelclasswizard.h b/doc/examples/wizard/itemmodelwizard/modelclasswizard.h deleted file mode 100644 index 2e02efe356c..00000000000 --- a/doc/examples/wizard/itemmodelwizard/modelclasswizard.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MODELCLASSWIZARD_H -#define MODELCLASSWIZARD_H - -#include - - -class ModelClassWizard : public Core::BaseFileWizard -{ - Q_OBJECT - -public: - ModelClassWizard(const Core::BaseFileWizardParameters ¶meters, QObject *parent = 0); - ~ModelClassWizard(); - - 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& replacementMap) const; -}; - -#endif // MODELCLASSWIZARD_H diff --git a/doc/examples/wizard/itemmodelwizard/modelnamepage.cpp b/doc/examples/wizard/itemmodelwizard/modelnamepage.cpp deleted file mode 100644 index baa0fe818eb..00000000000 --- a/doc/examples/wizard/itemmodelwizard/modelnamepage.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "modelnamepage.h" -#include "ui_modelnamepage.h" - -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) -{ - this->path = path; -} - -void ModelNamePage::on_txtModelClass_textEdited(const QString& txt) -{ - ui.txtHeaderFile->setText(txt + ".h"); - ui.txtImplFile->setText(txt + ".cpp"); -} - -ModelClassParameters ModelNamePage::parameters() const -{ - ModelClassParameters params; - params.className = ui.txtModelClass->text(); - params.headerFile = ui.txtHeaderFile->text(); - - params.sourceFile = ui.txtImplFile->text(); - params.baseClass = ui.cmbBaseClass->currentText(); - params.path = path; - return params; -} diff --git a/doc/examples/wizard/itemmodelwizard/modelnamepage.h b/doc/examples/wizard/itemmodelwizard/modelnamepage.h deleted file mode 100644 index a45bafc2070..00000000000 --- a/doc/examples/wizard/itemmodelwizard/modelnamepage.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef MODELNAMEPAGE_H -#define MODELNAMEPAGE_H - -#include -#include "ui_ModelNamePage.h" -struct ModelClassParameters - { - QString className; - QString headerFile; - QString sourceFile; - QString baseClass; - QString path; - }; - -class ModelNamePage : public QWizardPage -{ - Q_OBJECT - -public: - ModelNamePage(QWidget *parent = 0); - ~ModelNamePage(); - void setPath(const QString& path); - ModelClassParameters parameters() const; - -private slots: - void on_txtModelClass_textEdited(const QString& txt); - - -private: - Ui::ModelNamePage ui; - QString path; -}; - -#endif // MODELNAMEPAGE_H diff --git a/doc/examples/wizard/itemmodelwizard/modelnamepage.ui b/doc/examples/wizard/itemmodelwizard/modelnamepage.ui deleted file mode 100644 index 848969c01c6..00000000000 --- a/doc/examples/wizard/itemmodelwizard/modelnamepage.ui +++ /dev/null @@ -1,90 +0,0 @@ - - - ModelNamePage - - - - 0 - 0 - 346 - 257 - - - - Form - - - - - - Model Class Name: - - - - - - - - - - Base Class Name: - - - - - - - - QAbstractItemModel - - - - - QAbstractListModel - - - - - QAbstractTableModel - - - - - - - - Header: - - - - - - - - - - Implementation: - - - - - - - - - - Qt::Vertical - - - - 20 - 61 - - - - - - - - - diff --git a/doc/examples/wizard/itemmodelwizard/template.qrc b/doc/examples/wizard/itemmodelwizard/template.qrc deleted file mode 100644 index 343a5962c50..00000000000 --- a/doc/examples/wizard/itemmodelwizard/template.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - ItemModelSource.txt - ItemModelHeader.txt - - -- cgit v1.2.3