summaryrefslogtreecommitdiff
path: root/src/plugins/todo/todoplugin.h
diff options
context:
space:
mode:
authorDmitry Savchenko <dmitry.a.sav@gmail.com>2011-10-25 23:14:27 +0300
committerEike Ziller <eike.ziller@nokia.com>2012-02-24 08:00:29 +0100
commit5623e520d8348ee7d0b3c979ab35597b034e38f5 (patch)
treeadbfa911e63ac50b335a5e1a69354e571b453538 /src/plugins/todo/todoplugin.h
parentedb3094fa33a20d2f83e517fffdfa3889c18bc07 (diff)
downloadqt-creator-5623e520d8348ee7d0b3c979ab35597b034e38f5.tar.gz
To-do plugin added.
Change-Id: Ideaf91b2f9ce3d9252ca40b7224a2ab4238341f1 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/todo/todoplugin.h')
-rwxr-xr-xsrc/plugins/todo/todoplugin.h133
1 files changed, 61 insertions, 72 deletions
diff --git a/src/plugins/todo/todoplugin.h b/src/plugins/todo/todoplugin.h
index 1623ac83f3..685b303d03 100755
--- a/src/plugins/todo/todoplugin.h
+++ b/src/plugins/todo/todoplugin.h
@@ -1,47 +1,51 @@
-/*
- *
- * TODO plugin - Add pane with list all TODO, FIXME, etc. comments.
- *
- * Copyright (C) 2010 VasiliySorokin
- *
- * Authors: Vasiliy Sorokin <sorokin.vasiliy@gmail.com>
- *
- * This file is part of TODO plugin for QtCreator.
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- * * Neither the name of the vsorokin nor the names of its contributors may be used to endorse or
- * promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
- * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
-*/
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2012 Dmitry Savchenko.
+** Copyright (c) 2010 Vasiliy Sorokin.
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+**
+** GNU Lesser General Public License Usage
+**
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this file.
+** Please review the following information to ensure the GNU Lesser General
+** Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** Other Usage
+**
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**************************************************************************/
#ifndef TODOPLUGIN_H
#define TODOPLUGIN_H
-#include <QFuture>
-#include <QList>
-#include <extensionsystem/iplugin.h>
-#include <coreplugin/editormanager/editormanager.h>
-#include <projectexplorer/task.h>
-#include <projectexplorer/taskhub.h>
-#include <projectexplorer/projectexplorer.h>
-#include <projectexplorer/project.h>
-#include "todooutputpane.h"
-#include "settingspage.h"
+
+#include "optionspage.h"
#include "keyword.h"
+#include "todooutputpane.h"
+#include "settings.h"
+#include "todoitemsprovider.h"
+
+#include <extensionsystem/iplugin.h>
+
+#include <QStringList>
+namespace Todo {
+namespace Internal {
class TodoPlugin : public ExtensionSystem::IPlugin
{
@@ -49,43 +53,28 @@ class TodoPlugin : public ExtensionSystem::IPlugin
public:
TodoPlugin();
~TodoPlugin();
- void extensionsInitialized();
- bool initialize(const QStringList & arguments, QString * errorString);
- void shutdown();
-public slots:
- void showPane();
- void gotoToRowInFile(QListWidgetItem *);
- void currentEditorChanged(Core::IEditor *editor);
- void fileChanged();
- void projectChanged(ProjectExplorer::Project *);
+ void extensionsInitialized();
+ bool initialize(const QStringList &arguments, QString *errorString);
-signals:
- void updateFutureValue(int value);
- void setFutureRange(int, int);
+private slots:
+ void settingsChanged(const Settings &m_settings);
+ void scanningScopeChanged(ScanningScope scanningScope);
+ void todoItemClicked(const TodoItem &item);
private:
- void readFile(QString);
- static void readCurrentProject(QFutureInterface<void> &future, TodoPlugin* instance);
- void removeFromLocalTasks(QString filename);
- void addLocalTaskToTaskWindow();
-
- static bool taskLessThan(const ProjectExplorer::Task &t1, const ProjectExplorer::Task &t2);
+ void createItemsProvider();
+ void createTodoOutputPane();
+ void createOptionsPage();
- Keyword prepareOutputString(QString &text);
- QString generatePatternString();
- void readSettings();
- TodoOutputPane *outPane;
- ProjectExplorer::TaskHub *taskHub;
- SettingsPage *settingsPage;
- QString patternString;
- KeywordsList keywords;
- int projectOptions;
- int paneOptions;
- ProjectExplorer::Project *currentProject;
- QList<ProjectExplorer::Task> tasks;
- bool inReading;
- QFutureInterface<void> *progressObject;
+ Settings m_settings;
+ TodoOutputPane *m_todoOutputPane;
+ OptionsPage *m_optionsPage;
+ TodoItemsProvider *m_todoItemsProvider;
};
+
+} // namespace Internal
+} // namespace Todo
+
#endif // TODOPLUGIN_H
-
+