aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/diffeditor/diffeditor.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-01-30 16:10:04 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-02-23 13:28:08 +0000
commitf9f6f0b2c907e7401c96fb5ec47a32e5d09fbe4f (patch)
treea071b68cf2b14d7837e74c3a0496d5327771ac88 /src/plugins/diffeditor/diffeditor.h
parent7121315a71bddb398c8f628c4343b33c0a1676f5 (diff)
DiffEditor: Introduce a base class for the different views
... of the diff. Currently that is side-by-side and unified, just as before. Change-Id: I62a5462344c4b4ae652899f9d5b2936aa5a692b8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/plugins/diffeditor/diffeditor.h')
-rw-r--r--src/plugins/diffeditor/diffeditor.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/plugins/diffeditor/diffeditor.h b/src/plugins/diffeditor/diffeditor.h
index c4c111d4f4..3a10abdbab 100644
--- a/src/plugins/diffeditor/diffeditor.h
+++ b/src/plugins/diffeditor/diffeditor.h
@@ -51,8 +51,7 @@ namespace Internal {
class DescriptionEditorWidget;
class DiffEditorDocument;
class DiffEditorGuiController;
-class UnifiedDiffEditorWidget;
-class SideBySideDiffEditorWidget;
+class IDiffView;
class DiffEditor : public Core::IEditor
{
@@ -85,22 +84,24 @@ private slots:
void slotDescriptionChanged(const QString &description);
void slotDescriptionVisibilityChanged();
void slotReloaderChanged();
- void slotDiffEditorSwitched();
private:
void updateEntryToolTip();
- void showDiffEditor(QWidget *newEditor);
+ void showDiffView(IDiffView *newEditor);
void updateDiffEditorSwitcher();
- QWidget *readLegacyCurrentDiffEditorSetting();
- QWidget *readCurrentDiffEditorSetting();
- void writeCurrentDiffEditorSetting(QWidget *currentEditor);
+ void addView(IDiffView *view);
+ IDiffView *currentView() const;
+ void setCurrentView(IDiffView *view);
+ IDiffView *nextView();
+ IDiffView *readLegacyCurrentDiffEditorSetting();
+ IDiffView *readCurrentDiffEditorSetting();
+ void writeCurrentDiffEditorSetting(IDiffView *currentEditor);
QSharedPointer<DiffEditorDocument> m_document;
DescriptionEditorWidget *m_descriptionWidget;
QStackedWidget *m_stackedWidget;
- SideBySideDiffEditorWidget *m_sideBySideEditor;
- UnifiedDiffEditorWidget *m_unifiedEditor;
- QWidget *m_currentEditor;
+ QVector<IDiffView *> m_views;
+ int m_currentViewIndex;
DiffEditorGuiController *m_guiController;
QToolBar *m_toolBar;
QComboBox *m_entriesComboBox;