trying to provide a log along with progress

This commit is contained in:
Matthias Koefferlein 2021-02-07 19:14:20 +01:00
parent 9d349239b5
commit b97413234a
2 changed files with 8 additions and 1 deletions

View File

@ -26,6 +26,7 @@
#include <QFrame>
#include <QGridLayout>
#include <QLabel>
#include <QListView>
#include <math.h>
@ -136,7 +137,7 @@ ProgressBarWidget::resizeEvent (QResizeEvent *)
ProgressWidget::ProgressWidget (ProgressReporter *pr, QWidget *parent, bool full_width)
: QFrame (parent),
mp_widget (0), mp_pr (pr)
mp_widget (0), mp_pr (pr), m_log_file (6, true)
{
QVBoxLayout *top_layout = new QVBoxLayout (this);
top_layout->addStretch (1);
@ -144,6 +145,10 @@ ProgressWidget::ProgressWidget (ProgressReporter *pr, QWidget *parent, bool full
QFrame *bar_frame = new QFrame (this);
top_layout->addWidget (bar_frame);
QListView *log_list = new QListView (this);
log_list->setModel (&m_log_file);
top_layout->addWidget (log_list);
top_layout->addStretch (1);
// this does not allow the label to control the overall size, so a long string does not hurt:

View File

@ -31,6 +31,7 @@
#include <QHBoxLayout>
#include "layProgress.h"
#include "layLogViewerDialog.h"
class QToolButton;
class QLabel;
@ -73,6 +74,7 @@ private:
QGridLayout *mp_layout;
QToolButton *mp_cancel_button;
ProgressReporter *mp_pr;
lay::LogFile m_log_file;
};
}