Line data Source code
1 :
2 : #include "ErrorHandler/MsgBox.h"
3 :
4 : using namespace novadaq::errorhandler;
5 :
6 0 : MsgBox::MsgBox(QString const& title, NodeInfo const& info, QDialog* parent)
7 0 : : QDialog(parent), node(info)
8 : {
9 0 : setupUi(this);
10 :
11 0 : connect(btnRefresh, SIGNAL(clicked()), this, SLOT(refreshMsgs()));
12 :
13 : // write node name
14 0 : labelNodeName->setText(title);
15 :
16 : // print messages
17 0 : txtMessages->setHtml(node.msgs_to_string());
18 0 : txtMessages->moveCursor(QTextCursor::End);
19 0 : }
20 :
21 0 : void MsgBox::refreshMsgs()
22 : {
23 0 : txtMessages->clear();
24 0 : txtMessages->setHtml(node.msgs_to_string());
25 0 : txtMessages->moveCursor(QTextCursor::End);
26 0 : }
|