Documentation of MARTY
A Modern ARtificial Theoretical phYsicist
latexcompiler.h
1 // This file is part of MARTY.
2 //
3 // MARTY is free software: you can redistribute it and/or modify
4 // it under the terms of the GNU General Public License as published by
5 // the Free Software Foundation, either version 3 of the License, or
6 // (at your option) any later version.
7 //
8 // MARTY is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with MARTY. If not, see <https://www.gnu.org/licenses/>.
15 
16  #ifndef LATEXCOMPILER_H
17 #define LATEXCOMPILER_H
18 
19 #include <QPixmap>
20 #include <string>
21 #include <map>
22 #include <optional>
23 #include "resourcehandler.h"
24 
25 class latexcompiler: public QObject
26 {
27 
28  Q_OBJECT
29 
30 public:
31  latexcompiler(QObject *_parent);
32  ~latexcompiler() override {}
33  QPixmap getLabel(QString const &texCode);
34  std::optional<QPixmap> getLabel(std::string const &texCode);
35 
36  void sendLabel(QString const &texCode);
37  void sendLabel(std::string const &texCode);
38  bool isReady() const {
39  return pixmaps->isReady();
40  }
41 
42 public slots:
43 
44  void labelReady_slot(std::string const &);
45 signals:
46 
47  void labelReady(std::string const &);
48 
49 private:
50  static
51  std::string getGrafedDir();
52  static
53  QPixmap generateLabel(std::string const &equation);
54 
55 private:
56 
57  ResourceHandler *pixmaps;
58 };
59 
60 #endif // LATEXCOMPILER_H
Definition: latexcompiler.h:25
Definition: resourcehandler.h:39