/home/docs/checkouts/readthedocs.org/user_builds/mathvizanimator/checkouts/latest/libs/mva_svg/include/dvisvgm_process.h Source File

MathVizAnimator: /home/docs/checkouts/readthedocs.org/user_builds/mathvizanimator/checkouts/latest/libs/mva_svg/include/dvisvgm_process.h Source File
MathVizAnimator  0.0.1
dvisvgm_process.h
1 /* mathvizanimator
2  * Copyright (C) 2024 codingwithmagga
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef LIBS_MVA_SVG_INCLUDE_DVISVGM_PROCESS_H_
19 #define LIBS_MVA_SVG_INCLUDE_DVISVGM_PROCESS_H_
20 
21 #include <QFileInfo>
22 #include <QProcess>
23 
34 class DvisvgmProcess : public QProcess {
35  Q_OBJECT
36 
37  public:
43  explicit DvisvgmProcess(const QFileInfo& dvi_file, QObject* parent = nullptr);
44 
49  QFileInfo dviFile() const { return m_dvi_file; }
50 
51  signals:
56  void processFailed(const QFileInfo& dvi_file);
57 
62  void processFinished(const QFileInfo& svg_file);
63 
64  private:
70  void onFinished(int exitCode, QProcess::ExitStatus exitStatus);
71 
72  QFileInfo m_dvi_file;
73 };
74 
75 #endif // LIBS_MVA_SVG_INCLUDE_DVISVGM_PROCESS_H_
The DvisvgmProcess class handles the conversion of DVI files to SVG format using the dvisvgm utility.
Definition: dvisvgm_process.h:34
DvisvgmProcess(const QFileInfo &dvi_file, QObject *parent=nullptr)
Constructs a DvisvgmProcess object.
Definition: dvisvgm_process.cpp:22
void processFailed(const QFileInfo &dvi_file)
Signal emitted when the conversion process fails.
QFileInfo dviFile() const
Returns the QFileInfo object representing the DVI file.
Definition: dvisvgm_process.h:49
void processFinished(const QFileInfo &svg_file)
Signal emitted when the conversion process successfully finishes.