File indexing completed on 2024-12-22 04:17:35

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2010 C. Barth Netterfield                             *
0004  *                   netterfield@astro.utoronto.ca                         *
0005  *                                                                         *
0006  *   This program is free software; you can redistribute it and/or modify  *
0007  *   it under the terms of the GNU General Public License as published by  *
0008  *   the Free Software Foundation; either version 2 of the License, or     *
0009  *   (at your option) any later version.                                   *
0010  *                                                                         *
0011  ***************************************************************************/
0012 
0013 #include "ui_logdialog.h"
0014 
0015 #ifndef LOGDIALOG_H
0016 #define LOGDIALOG_H
0017 
0018 #include <time.h>
0019 
0020 #include <QDialog>
0021 #include <QProcess>
0022 
0023 #include "kst_export.h"
0024 
0025 
0026 namespace Kst {
0027 
0028 class MainWindow;
0029 
0030 class LogDialog : public QDialog, Ui::LogDialog
0031 {
0032   Q_OBJECT
0033   public:
0034     explicit LogDialog(MainWindow *parent);
0035     virtual ~LogDialog();
0036 
0037   public slots:
0038     void changed();
0039     void enableApply();
0040     void apply();
0041     void ok();
0042     void doIt();
0043     void enableWidthHeight();
0044     void runScript();
0045     void scriptStdErr();
0046     void scriptStdOut();
0047     void scriptStarted();
0048     void scriptFinished(int);
0049     void scriptError(QProcess::ProcessError);
0050   Q_SIGNALS:
0051     void exportLog(const QString &_logdir, time_t _logtime, const QString &_format, int x_size, int y_size,
0052               int size_option_index, const QString &message);
0053 
0054   private:
0055     time_t _logtime;
0056     QString _format;
0057     QString _logdir;
0058     QProcess *_proc;
0059     MainWindow *_parent;
0060     QString _imagename;
0061     QString _msgfilename;
0062     QString _username;
0063     bool _closeIfFinished;
0064 
0065 };
0066 
0067 }
0068 #endif // LOGDIALOG_H