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

MathVizAnimator: /home/docs/checkouts/readthedocs.org/user_builds/mathvizanimator/checkouts/latest/libs/mva_svg/include/latex_process.h Source File
MathVizAnimator  0.0.1
latex_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_LATEX_PROCESS_H_
19 #define LIBS_MVA_SVG_INCLUDE_LATEX_PROCESS_H_
20 
21 #include <QFileInfo>
22 #include <QProcess>
23 
35 class LaTeXProcess : public QProcess {
36  Q_OBJECT
37 
38  public:
44  explicit LaTeXProcess(const QFileInfo& latex_file, QObject* parent = nullptr);
45 
49  void cleanup() const;
50 
55  QFileInfo latexFile() const { return m_latex_file; }
56 
57  signals:
62  void processFailed(const QFileInfo& latex_file);
63 
68  void processFinished(const QFileInfo& dvi_file);
69 
70  private:
76  void onFinished(int exitCode, QProcess::ExitStatus exitStatus);
77 
78  QFileInfo m_latex_file;
79 };
80 
81 #endif // LIBS_MVA_SVG_INCLUDE_LATEX_PROCESS_H_
The LaTeXProcess class handles the execution of LaTeX typesetting process to a DVI file.
Definition: latex_process.h:35
void processFailed(const QFileInfo &latex_file)
Signal emitted when the LaTeX compilation process fails.
QFileInfo latexFile() const
Returns the QFileInfo object representing the LaTeX file.
Definition: latex_process.h:55
void processFinished(const QFileInfo &dvi_file)
Signal emitted when the LaTeX compilation process successfully finishes.
void cleanup() const
Performs cleanup by removing auxiliary files generated during the LaTeX compilation process.
Definition: latex_process.cpp:35
LaTeXProcess(const QFileInfo &latex_file, QObject *parent=nullptr)
Constructs a LaTeXProcess object.
Definition: latex_process.cpp:22