Commit e764db5b authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

project plugin: Use more forward decls

parent 9536ad5b
......@@ -7,15 +7,15 @@
#include "kateprojectpluginview.h"
#include "kateprojectworker.h"
#include <KColorScheme>
#include <QDir>
#include <QPainter>
#include <QProcess>
#include <QStyledItemDelegate>
#include <QVBoxLayout>
#include <KColorScheme>
#include <KLocalizedString>
#include <QDebug>
class DiffStyleDelegate : public QStyledItemDelegate
{
public:
......
......@@ -11,6 +11,7 @@
#include "gitcommitdialog.h"
#include "gitstatusmodel.h"
#include "kateproject.h"
#include "kateprojectplugin.h"
#include "kateprojectpluginview.h"
#include "pushpulldialog.h"
#include "stashdialog.h"
......
......@@ -11,8 +11,6 @@
#include <QProcess>
#include <QWidget>
#include <memory>
#include "git/gitstatus.h"
class QTreeView;
......
......@@ -107,7 +107,7 @@ Simple example, get files via globbing recursively in doc/, no build plugin:
}
A project for a custom language named Swine, of wich source files have a suffix .swn:
A project for a custom language named Swine whose source files have a suffix .swn:
{
"name": "Custom",
......
......@@ -8,11 +8,11 @@
#ifndef KATE_PROJECT_CODE_ANALYSIS_TOOL_H
#define KATE_PROJECT_CODE_ANALYSIS_TOOL_H
#include <QObject>
#include <QString>
#include <QStringList>
#include "kateproject.h"
class KateProject;
namespace KTextEditor
{
class MainWindow;
......
......@@ -7,6 +7,7 @@
*/
#include "kateprojectcompletion.h"
#include "kateproject.h"
#include "kateprojectplugin.h"
#include <KLocalizedString>
......
......@@ -6,6 +6,7 @@
*/
#include "kateprojectinfoview.h"
#include "kateproject.h"
#include "kateprojectinfoviewcodeanalysis.h"
#include "kateprojectinfoviewindex.h"
#include "kateprojectinfoviewnotes.h"
......
......@@ -8,11 +8,10 @@
#ifndef KATE_PROJECT_INFO_VIEW_H
#define KATE_PROJECT_INFO_VIEW_H
#include "kateproject.h"
#include <QTabWidget>
class KateProjectPluginView;
class KateProject;
/**
* Class representing a view of a project.
......
......@@ -6,6 +6,7 @@
*/
#include "kateprojectinfoviewcodeanalysis.h"
#include "kateproject.h"
#include "kateprojectcodeanalysistool.h"
#include "kateprojectpluginview.h"
#include "tools/kateprojectcodeanalysisselector.h"
......@@ -19,6 +20,8 @@
#include <KMessageWidget>
#include <QTimer>
#include <KTextEditor/MainWindow>
KateProjectInfoViewCodeAnalysis::KateProjectInfoViewCodeAnalysis(KateProjectPluginView *pluginView, KateProject *project)
: m_pluginView(pluginView)
, m_project(project)
......
......@@ -8,18 +8,19 @@
#ifndef KATE_PROJECT_INFO_VIEW_CODE_ANALYSIS_H
#define KATE_PROJECT_INFO_VIEW_CODE_ANALYSIS_H
#include "kateproject.h"
#include <QComboBox>
#include <QLabel>
#include <QPointer>
#include <QProcess>
#include <QPushButton>
#include <QTreeView>
#include <QWidget>
class KateProjectPluginView;
class KateProjectCodeAnalysisTool;
class KMessageWidget;
class KateProject;
class QStandardItemModel;
/**
* View for Code Analysis.
......
......@@ -6,6 +6,8 @@
*/
#include "kateprojectinfoviewindex.h"
#include "kateproject.h"
#include "kateprojectplugin.h"
#include "kateprojectpluginview.h"
#include <KLocalizedString>
......@@ -13,6 +15,8 @@
#include <QAction>
#include <QVBoxLayout>
#include <KTextEditor/MainWindow>
KateProjectInfoViewIndex::KateProjectInfoViewIndex(KateProjectPluginView *pluginView, KateProject *project, QWidget *parent)
: QWidget(parent)
, m_pluginView(pluginView)
......
......@@ -8,13 +8,14 @@
#ifndef KATE_PROJECT_INFO_VIEW_INDEX_H
#define KATE_PROJECT_INFO_VIEW_INDEX_H
#include "kateproject.h"
#include <QLineEdit>
#include <QTreeView>
#include <QWidget>
class KateProjectPluginView;
class KMessageWidget;
class KateProject;
class QStandardItemModel;
/**
* Class representing a view of a project.
......
......@@ -6,6 +6,7 @@
*/
#include "kateprojectinfoviewnotes.h"
#include "kateproject.h"
#include "kateprojectpluginview.h"
#include <QVBoxLayout>
......@@ -25,7 +26,3 @@ KateProjectInfoViewNotes::KateProjectInfoViewNotes(KateProjectPluginView *plugin
m_edit->setDocument(project->notesDocument());
setFocusProxy(m_edit);
}
KateProjectInfoViewNotes::~KateProjectInfoViewNotes()
{
}
......@@ -8,11 +8,10 @@
#ifndef KATE_PROJECT_INFO_VIEW_NOTES_H
#define KATE_PROJECT_INFO_VIEW_NOTES_H
#include "kateproject.h"
#include <QPlainTextEdit>
class KateProjectPluginView;
class KateProject;
/**
* Class representing a view of a project.
......@@ -30,11 +29,6 @@ public:
*/
KateProjectInfoViewNotes(KateProjectPluginView *pluginView, KateProject *project);
/**
* deconstruct info view
*/
~KateProjectInfoViewNotes() override;
/**
* our project.
* @return project
......
......@@ -10,6 +10,7 @@
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KPluginLoader>
#include <KSharedConfig>
#include <kde_terminal_interface.h>
......
......@@ -8,15 +8,15 @@
#ifndef KATE_PROJECT_INFO_VIEW_TERMINAL_H
#define KATE_PROJECT_INFO_VIEW_TERMINAL_H
#include "kateproject.h"
#include <QKeyEvent>
#include <QVBoxLayout>
#include <KPluginFactory>
#include <kparts/part.h>
#include <kparts/readonlypart.h>
#include <QWidget>
class KateProjectPluginView;
class KPluginFactory;
/**
* Class representing a view of a project.
......
......@@ -7,6 +7,7 @@
#include "kateprojectplugin.h"
#include "kateproject.h"
#include "kateprojectconfigpage.h"
#include "kateprojectpluginview.h"
......
......@@ -18,9 +18,10 @@
#include <KXMLGUIClient>
#include "kateproject.h"
#include "kateprojectcompletion.h"
class KateProject;
enum class ClickAction : uint8_t {
NoAction = 0,
ShowDiff,
......
......@@ -8,7 +8,11 @@
#include "kateprojectpluginview.h"
#include "fileutil.h"
#include "gitwidget.h"
#include "kateproject.h"
#include "kateprojectinfoview.h"
#include "kateprojectinfoviewindex.h"
#include "kateprojectplugin.h"
#include "kateprojectview.h"
#include <KTextEditor/Command>
#include <ktexteditor/application.h>
......@@ -713,4 +717,21 @@ void KateProjectPluginView::showProjectTodos()
pgrep->exec(nullptr, QStringLiteral("preg (TODO|FIXME)\\b"), msg);
}
void KateProjectPluginView::showDiffInFixedView(const QByteArray &contents)
{
if (!m_fixedView.view) {
m_fixedView.view = mainWindow()->openUrl(QUrl());
m_fixedView.defaultMenu = m_fixedView.view->contextMenu();
}
m_fixedView.view->document()->setText(QString::fromUtf8(contents));
m_fixedView.view->document()->setHighlightingMode(QStringLiteral("Diff"));
/** We don't want save dialog on close */
m_fixedView.view->document()->setModified(false);
m_fixedView.view->setCursorPosition({0, 0});
m_fixedView.restoreMenu();
/** Activate this view */
m_mainWindow->activateView(m_fixedView.view->document());
}
#include "kateprojectpluginview.moc"
......@@ -8,22 +8,23 @@
#ifndef _KATE_PROJECT_PLUGIN_VIEW_H_
#define _KATE_PROJECT_PLUGIN_VIEW_H_
#include "kateproject.h"
#include "kateprojectinfoview.h"
#include "kateprojectplugin.h"
#include "kateprojectview.h"
#include <QComboBox>
#include <QMenu>
#include <QPointer>
#include <QStackedWidget>
#include <QToolButton>
#include <KTextEditor/View>
#include <KXMLGUIClient>
#include <memory>
class QAction;
class QDir;
class KateProject;
class KateProjectView;
class KateProjectPlugin;
class KateProjectInfoView;
class KateProjectPluginView : public QObject, public KXMLGUIClient
{
......@@ -106,22 +107,7 @@ public:
* of creating new view every time
* @param contents diff contents
*/
void showDiffInFixedView(const QByteArray &contents)
{
if (!m_fixedView.view) {
m_fixedView.view = mainWindow()->openUrl(QUrl());
m_fixedView.defaultMenu = m_fixedView.view->contextMenu();
}
m_fixedView.view->document()->setText(QString::fromUtf8(contents));
m_fixedView.view->document()->setHighlightingMode(QStringLiteral("Diff"));
/** We don't want save dialog on close */
m_fixedView.view->document()->setModified(false);
m_fixedView.view->setCursorPosition({0, 0});
m_fixedView.restoreMenu();
/** Activate this view */
m_mainWindow->activateView(m_fixedView.view->document());
}
void showDiffInFixedView(const QByteArray &contents);
/**
* Same as above with call back for setting a context menu
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment