File indexing completed on 2024-05-19 04:36:37
0001 /* This file is part of the TikZKit project. 0002 * 0003 * Copyright (C) 2013-2014 Dominik Haumann <dhaumann@kde.org> 0004 * 0005 * This library is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU Library General Public License as published 0007 * by the Free Software Foundation, either version 2 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, see 0017 * <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef TIKZ_TEX_GENERATOR_H 0021 #define TIKZ_TEX_GENERATOR_H 0022 0023 #include <QObject> 0024 #include <QPixmap> 0025 #include <QProcess> 0026 0027 namespace tex { 0028 0029 class TexGeneratorPrivate; 0030 0031 class TexGenerator : public QObject 0032 { 0033 Q_OBJECT 0034 0035 public: 0036 /** 0037 * Constructor. 0038 */ 0039 TexGenerator(QObject * parent); 0040 0041 /** 0042 * Destructor 0043 */ 0044 virtual ~TexGenerator(); 0045 0046 QPixmap image(); 0047 0048 QString pdfFile(); 0049 QString svgFile(); 0050 0051 public Q_SLOTS: 0052 void generateImage(const QString& texCode); 0053 0054 protected Q_SLOTS: 0055 void processFinished(int exitCode, QProcess::ExitStatus exitStatus); 0056 void processError(QProcess::ProcessError error); 0057 void outputReady(); 0058 0059 Q_SIGNALS: 0060 void svgReady(const QString& path); 0061 0062 private: 0063 TexGeneratorPrivate * const d; 0064 }; 0065 0066 } 0067 0068 #endif // TIKZ_TEX_GENERATOR_H 0069 0070 // kate: indent-width 4; replace-tabs on;