1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
/*
SPDX-FileCopyrightText: 2002 Falk Brettschneider <falkbr@kdevelop.org>
SPDX-FileCopyrightText: 2003 John Firebaugh <jfirebaugh@kde.org>
SPDX-FileCopyrightText: 2006 Adam Treat <treat@kde.org>
SPDX-FileCopyrightText: 2006, 2007 Alexander Dymo <adymo@kdevelop.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef KDEVPLATFORM_MAINWINDOW_PRIVATE_H
#define KDEVPLATFORM_MAINWINDOW_PRIVATE_H
#include <QObject>
#include <QPointer>
#include <QWidget>
#include <QMap>
#include <KXMLGUIClient>
#include <language/util/navigationtooltip.h>
class KActionCollection;
class QMenu;
namespace Sublime {
class View;
class Container;
}
namespace KParts {
class Part;
}
namespace KTextEditor {
class View;
}
namespace KTextEditorIntegration {
class MainWindow;
}
namespace KDevelop {
class IPlugin;
class MainWindow;
class StatusBar;
class MainWindowPrivate: public QObject {
Q_OBJECT
public:
explicit MainWindowPrivate(MainWindow *mainWindow);
~MainWindowPrivate() override;
QPointer<QWidget> centralPlugin;
QMetaObject::Connection activeDocumentReadWriteConnection;
void setupActions();
void setupGui();
void setupStatusBar();
void registerStatus(QObject*);
void tabContextMenuRequested(Sublime::View *view, QMenu* menu);
void tabToolTipRequested(Sublime::View* view, Sublime::Container* container, int tab);
void dockBarContextMenuRequested(Qt::DockWidgetArea area, const QPoint& position);
public Q_SLOTS:
void addPlugin( KDevelop::IPlugin *plugin );
void removePlugin( KDevelop::IPlugin *plugin );
void updateSourceFormatterGuiClient(bool hasFormatters);
void activePartChanged(KParts::Part *part);
void mergeView(Sublime::View *view);
void changeActiveView(Sublime::View *view);
void xmlguiclientDestroyed(QObject* obj);
//actions
void fileNew();
void gotoNextWindow();
void gotoPreviousWindow();
void selectPrevItem();
void selectNextItem();
void viewAddNewToolView();
void newWindow();
void splitHorizontal();
void splitVertical();
void split(Qt::Orientation orientation);
void toggleFullScreen(bool fullScreen);
void gotoNextSplit();
void gotoPreviousSplit();
void newToolbarConfig();
void settingsDialog();
void quitAll();
// void fixToolbar();
///Returns true if we're currently changing the active view through changeActiveView()
bool changingActiveView() const ;
void configureNotifications();
void showLoadedPlugins();
void toggleArea(bool b);
void showErrorMessage(const QString& message, int timeout);
void pluginDestroyed(QObject*);
/// the following slots always activate the m_tabView before calling the normal slot above
/// @see m_tabView
/// @see tabContextMenuRequested
void contextMenuFileNew();
void contextMenuSplitHorizontal();
void contextMenuSplitVertical();
/// reload all open documents
void reloadAll();
KTextEditorIntegration::MainWindow *kateWrapper() const;
private:
KActionCollection *actionCollection();
MainWindow* const m_mainWindow;
StatusBar* m_statusBar;
QWidget* lastXMLGUIClientView;
QPointer<QWidget> m_workingSetCornerWidget;
QMap<IPlugin*, KXMLGUIClient*> m_pluginCustomClients;
bool m_changingActiveView;
/// the view of the tab that got it's context menu connected
Sublime::View* m_tabView;
QPair<Sublime::View*, QPointer<NavigationToolTip> > m_tabTooltip;
KTextEditorIntegration::MainWindow* m_kateWrapper;
};
}
#endif
|