KompareDiff2

kompareprocess.h
1/*
2 SPDX-FileCopyrightText: 2001-2003 Otto Bruggeman <otto.bruggeman@home.nl>
3 SPDX-FileCopyrightText: 2001-2003 John Firebaugh <jfirebaugh@kde.org>
4 SPDX-FileCopyrightText: 2008 Kevin Kofler <kevin.kofler@chello.at>
5
6 SPDX-License-Identifier: GPL-2.0-or-later
7*/
8
9#ifndef KOMPAREPROCESS_H
10#define KOMPAREPROCESS_H
11
12// lib
13#include "global.h"
14// KF
15#include <KProcess>
16// Qt
17#include <QStringDecoder>
18#include <QStringEncoder>
19// Std
20#include <memory>
21
22namespace KompareDiff2
23{
24class DiffSettings;
25}
26
27class KompareProcess : public KProcess
28{
30
31public:
32 KompareProcess(KompareDiff2::DiffSettings *diffSettings,
34 const QString &source,
35 const QString &destination,
36 const QString &directory = QString(),
38 ~KompareProcess() override;
39
40public:
41 void start();
42
43 QString diffOutput() const
44 {
45 return m_stdout;
46 }
47 QString stdOut() const
48 {
49 return m_stdout;
50 }
51 QString stdErr() const
52 {
53 return m_stderr;
54 }
55
56 void setEncoding(const QString &encoding);
57
59 void diffHasFinished(bool finishedNormally);
60
61private:
62 void writeDefaultCommandLine();
63 void writeCommandLine();
64
65private Q_SLOTS:
66 void slotFinished(int, QProcess::ExitStatus);
67
68private:
69 KompareDiff2::DiffSettings *m_diffSettings;
70 const KompareDiff2::DiffMode m_diffMode;
71 const KompareDiff2::Mode m_mode;
72 QString m_customString; // Used when a comparison between a file and a string is requested
73 QString m_stdout;
74 QString m_stderr;
75 QStringDecoder m_textDecoder;
76 QStringEncoder m_textEncoder;
77};
78
79#endif
The settings for a diff.
KompareDiff2 namespace.
DiffMode
DiffMode.
Definition global.h:60
Mode
Mode.
Definition global.h:46
@ UnknownMode
Used to initialize the Infoi struct.
Definition global.h:54
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:54:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.