File indexing completed on 2024-04-28 16:26:22
0001 /********************************************************************************** 0002 Copyright (C) 2005-2007 by Holger Danielsson (holger.danielsson@versanet.de) 0003 **********************************************************************************/ 0004 0005 /*************************************************************************** 0006 * * 0007 * This program is free software; you can redistribute it and/or modify * 0008 * it under the terms of the GNU General Public License as published by * 0009 * the Free Software Foundation; either version 2 of the License, or * 0010 * (at your option) any later version. * 0011 * * 0012 ***************************************************************************/ 0013 0014 #ifndef POSTSCRIPTDIALOG_H 0015 #define POSTSCRIPTDIALOG_H 0016 0017 #include <QDialog> 0018 0019 #include <QProcess> 0020 0021 #include "widgets/outputview.h" 0022 0023 #include "ui_postscriptdialog_base.h" 0024 0025 #define PS_A5_EMPTY 0 0026 #define PS_A5_DUPLICATE 1 0027 #define PS_2xA5 2 0028 #define PS_2xA5L 3 0029 #define PS_4xA5 4 0030 #define PS_A4_EMPTY 5 0031 #define PS_A4_DUPLICATE 6 0032 #define PS_2xA4 7 0033 #define PS_2xA4L 8 0034 #define PS_EVEN 9 0035 #define PS_ODD 10 0036 #define PS_EVEN_REV 11 0037 #define PS_ODD_REV 12 0038 #define PS_REVERSE 13 0039 #define PS_COPY_SORTED 14 0040 #define PS_COPY_UNSORTED 15 0041 #define PS_PSTOPS_FREE 16 0042 #define PS_PSSELECT_FREE 17 0043 0044 class KProcess; 0045 0046 class KileErrorHandler; 0047 0048 namespace KileDialog 0049 { 0050 0051 class PostscriptDialog : public QDialog 0052 { 0053 Q_OBJECT 0054 0055 public: 0056 PostscriptDialog(QWidget *parent, 0057 const QString &texfilename, const QString &startdir, 0058 const QString &latexextensions, 0059 KileErrorHandler *errorHandler, KileWidget::OutputView *output); 0060 ~PostscriptDialog(); 0061 0062 Q_SIGNALS: 0063 void output(const QString &); 0064 0065 private Q_SLOTS: 0066 void comboboxChanged(int index); 0067 void slotExecuteClicked(); 0068 void slotProcessOutput(); 0069 void slotProcessExited(int exitCode, QProcess::ExitStatus exitStatus); 0070 0071 private: 0072 bool checkParameter(); 0073 QString buildTempfile(); 0074 QString duplicateParameter(const QString ¶m); 0075 void showError(const QString &text); 0076 void execute(); 0077 0078 QString m_startdir; 0079 KileErrorHandler *m_errorHandler; 0080 KileWidget::OutputView *m_output; 0081 0082 QString m_tempfile; 0083 QString m_program; 0084 QString m_param; 0085 0086 KProcess* m_proc; 0087 0088 Ui::PostscriptDialog m_PostscriptDialog; 0089 }; 0090 0091 } 0092 0093 #endif