1 #include "ChecklistGuidePage.h"
2 #include "ChecklistLineEdit.h"
7 #include <QRadioButton>
10 const int MAX_LAYOUT_WIDTH = 300;
14 m_checklineLineEditContainer (0),
15 m_checklineLineEditLayout (0)
19 m_layout =
new QGridLayout;
20 m_layout->setColumnStretch (0, 0);
21 m_layout->setColumnStretch (1, 1);
27 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePage::addHtml";
29 QLabel *label =
new QLabel (html);
30 label->setMaximumWidth(MAX_LAYOUT_WIDTH);
31 label->setWordWrap (
true);
33 m_layout->addWidget (label, m_row++, 0, 1, 2, Qt::AlignTop);
38 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePage::addLabelAndRadioButton";
40 QRadioButton *button =
new QRadioButton;
41 m_layout->addWidget (button, m_row, 0, 1, 1, Qt::AlignTop);
43 QLabel *lbl =
new QLabel (label);
44 lbl->setWordWrap(
true);
45 lbl->setMaximumWidth(MAX_LAYOUT_WIDTH);
46 m_layout->addWidget (lbl, m_row++, 1, 1, 1, Qt::AlignTop);
53 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuidePage::addLineEdit";
55 if (m_checklineLineEditContainer == 0) {
58 m_checklineLineEditLayout =
new QVBoxLayout;
59 m_checklineLineEditLayout->setSpacing (0);
61 m_checklineLineEditContainer =
new QWidget;
62 m_checklineLineEditContainer->setLayout (m_checklineLineEditLayout);
63 m_layout->addWidget (m_checklineLineEditContainer, m_row++, 0, 1, 2, Qt::AlignTop);
66 m_checklineLineEditLayout->addWidget (edit);
void addLineEdit(ChecklistLineEdit *edit)
Insert line edit.
ChecklistGuidePage(const QString &title)
Single constructor.
void addHtml(const QString &html)
Insert html for display.
QRadioButton * addLabelAndRadioButton(const QString &label)
Insert radio button and corresponding label.
Adds key event handling to QLineEdit.