1 #ifndef MONITORTAB_H
2 #define MONITORTAB_H
3 
4 class MonitorTab : public QObject {
5  public:
6   MonitorTab(QString tabRefString, QObject* parent = 0)
QObject(parent)7       : QObject(parent), tab(new QWidget), textEdit(new QPlainTextEdit(tab))
8   {
9     QVBoxLayout* vLayout = new QVBoxLayout(tab);
10     textEdit->setObjectName(tabRefString);
11     textEdit->setReadOnly(true);
12     textEdit->setFont(QFont("courier"));
13     vLayout->addWidget(textEdit);
14   }
15 
~MonitorTab()16   ~MonitorTab()
17   {
18     // do not delete widgets since they
19     // all have a parent that does the work
20   }
21 
getTabWidget()22   QWidget* getTabWidget() const { return tab; }
getTextEdit()23   QPlainTextEdit* getTextEdit() const { return textEdit; }
24 
25  private:
26   QWidget* tab;
27   QPlainTextEdit* textEdit;
28 };
29 
30 #endif  // MONITORTAB_H
31