KompareDiff2
10#ifndef KOMPAREDIFF2_KOMPAREMODELLIST_H
11#define KOMPAREDIFF2_KOMPAREMODELLIST_H
16#include "diffmodellist.h"
18#include "komparediff2_export.h"
40#if KOMPAREDIFF2_ENABLE_DEPRECATED_SINCE(5, 4)
42 KOMPAREDIFF2_DEPRECATED_VERSION(5, 4,
"Use KompareModelList constructor without widgetForKIO arg instead")
59 bool openDiff(
const QString& diff);
61 bool openFileAndDiff();
62 bool openDirAndDiff();
69 void setEncoding(
const QString& encoding);
71 void setReadWrite(
bool isReadWrite);
72 bool isReadWrite()
const;
77 int parseDiffOutput(
const QString& diff);
80 bool parseAndOpenDiff(
const QString& diff);
87 bool blendOriginalIntoModelList(
const QString& localURL);
94 int modelCount()
const;
95 int differenceCount()
const;
96 int appliedCount()
const;
98 const DiffModel* modelAt(
int i)
const {
return m_models->at(i); };
99 DiffModel* modelAt(
int i) {
return m_models->at(i); };
100 int findModel(
DiffModel* model)
const {
return m_models->indexOf(model); };
102 bool hasUnsavedChanges()
const;
104 int currentModel()
const {
return m_models->indexOf(m_selectedModel); };
105 int currentDifference()
const {
return m_selectedModel ? m_selectedModel->findDifference(m_selectedDifference) : -1; };
107 const DiffModel* selectedModel()
const {
return m_selectedModel; };
108 const Difference* selectedDifference()
const {
return m_selectedDifference; };
120 void updateModelListActions();
127 void setStatusBarModelInfo(
int modelIndex,
int differenceIndex,
int modelCount,
int differenceCount,
int appliedCount);
132 void applyDifference(
bool apply);
133 void applyAllDifferences(
bool apply);
135 void diffString(
const QString&);
136 void updateActions();
142 void slotApplyDifference(
bool apply);
143 void slotApplyAllDifferences(
bool apply);
144 void slotPreviousModel();
145 void slotNextModel();
146 void slotPreviousDifference();
147 void slotNextDifference();
152 void slotDiffProcessFinished(
bool success);
153 void slotWriteDiffOutput(
bool success);
155 void slotActionApplyDifference();
156 void slotActionUnApplyDifference();
157 void slotActionApplyAllDifferences();
158 void slotActionUnapplyAllDifferences();
162 void slotSaveDestination();
165 void slotDirectoryChanged(
const QString&);
166 void slotFileChanged(
const QString&);
169 bool isDirectory(
const QString& url)
const;
170 bool isDiff(
const QString& mimetype)
const;
173 bool hasPrevModel()
const;
174 bool hasNextModel()
const;
175 bool hasPrevDiff()
const;
176 bool hasNextDiff()
const;
179 void setDepthAndApplied();
185 KompareProcess* m_diffProcess;
211 QTextCodec* m_textCodec;
213#if KOMPAREDIFF2_BUILD_DEPRECATED_SINCE(5, 4)
215 QT_WARNING_DISABLE_CLANG(
"-Wunused-private-field")
A model describing the differences between two files.
Q_SCRIPTABLE CaptureState status()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Apr 27 2024 22:10:24 by
doxygen 1.10.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.