Use QProcess::errorString instead
[nomnom.git] / src / feed / nfeedprogressdialog.h
blobbc4658fc8a8a453767729deec5a7f92534eb38fd
1 /* NomNom
2 * Copyright (C) 2011 Toni Gundogdu <legatvs@gmail.com>
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.
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.
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/>.
18 #ifndef nfeedprogressdialog_h
19 #define nfeedprogressdialog_h
21 #include <QProgressDialog>
22 #include <QProcess>
24 #include <NFeed>
26 class QStringList;
28 namespace nn
31 class NFeedProgressDialog : public QProgressDialog
33 Q_OBJECT
34 public:
35 NFeedProgressDialog(QWidget *parent=NULL);
36 public:
37 bool results(feed::NFeedList&, QString&);
38 bool open(QStringList&);
39 QString errmsg() const;
40 bool cancelled() const;
41 private slots:
42 void finished(int, QProcess::ExitStatus);
43 void error(QProcess::ProcessError);
44 void cleanup();
45 void read();
46 private:
47 QStringList _args;
48 QString _buffer;
49 QString _errmsg;
50 QProcess *_proc;
51 bool _cancelled;
54 } // namespace nn
56 #endif
58 /* vim: set ts=2 sw=2 tw=72 expandtab: */