From f76b42f192a82f777cf77f3eecfab9ca7e31e396 Mon Sep 17 00:00:00 2001 From: Arno Date: Tue, 8 Jul 2014 08:13:30 +0200 Subject: Display unpack output in Dialog This was a difficult one. Got lost in the Semantics of QThread once again, but just 2 days later it works :) --- smdialog.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'smdialog.h') diff --git a/smdialog.h b/smdialog.h index 4b2e935..144502f 100644 --- a/smdialog.h +++ b/smdialog.h @@ -13,6 +13,9 @@ class QLineEdit; class QSpinBox; class QPushButton; +class QLabel; +class QTextEdit; +class Unpacker; class SmDialog : public QDialog { Q_OBJECT @@ -40,4 +43,31 @@ class SeriesPartsDialog : public SmDialog { }; +class UnpackDialog : public SmDialog { + Q_OBJECT + public: + explicit UnpackDialog(QWidget *parent = 0, Qt::WindowFlags f = 0); + void setCurrentLabel(const QString &cur); + void clearOutput(); + void setCloseEnabled(bool enabled); + + signals: + void workFinished(); + + public slots: + void addOutput(const QString &msg, const QString &prepend); + void addProcOutput(const QByteArray &data); + void appendCommand(const QStringList &cmd); + void doIt(); + void newPackage(const QString &package); + void unpackDone(); + + private: + QLabel *mCurrentL; + QTextEdit *mOutput; + QPushButton *mClose; + QList mCommandQueue; + Unpacker *mUnpacker; +}; + #endif // SMDIALOG_H -- cgit v1.2.3-70-g09d2