BibleTime
btplainorhtmlpage.cpp
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
13 #include "btplainorhtmlpage.h"
14 
15 #include <QGroupBox>
16 #include <QRadioButton>
17 #include <QSizePolicy>
18 #include <QSpacerItem>
19 #include <QVBoxLayout>
20 
21 
23  : QWizardPage(parent)
24 {
25  m_verticalLayout = new QVBoxLayout(this);
26  m_verticalLayout->addItem(
27  new QSpacerItem(20, 40, QSizePolicy::Minimum,
28  QSizePolicy::Expanding));
29 
30  m_groupBox = new QGroupBox(this);
31 
32  // Setup radio buttons:
33  QVBoxLayout * const vLayout = new QVBoxLayout(m_groupBox);
34  m_plainTextRadioButton = new QRadioButton(m_groupBox);
35  vLayout->addWidget(m_plainTextRadioButton);
36  m_htmlRadioButton = new QRadioButton(m_groupBox);
37  m_htmlRadioButton->setChecked(true);
38  vLayout->addWidget(m_htmlRadioButton);
39 
40  m_verticalLayout->addWidget(m_groupBox);
41  m_verticalLayout->addItem(
42  new QSpacerItem(20, 40, QSizePolicy::Minimum,
43  QSizePolicy::Expanding));
44  retranslateUi();
45 }
46 
48  return m_htmlRadioButton->isChecked();
49 }
50 
52  m_plainTextRadioButton->setChecked(!html);
53  m_htmlRadioButton->setChecked(html);
54 }
55 
57  m_plainTextRadioButton->setText(
58  tr("Personal Commentary Editor", "Edit Plain text"));
59  m_htmlRadioButton->setText(
60  tr("Personal Commentary Editor", "Edit HTML text"));
61 }
QRadioButton * m_htmlRadioButton
BtPlainOrHtmlPage(QWidget *parent=nullptr)
QVBoxLayout * m_verticalLayout
void setHtmlMode(bool html)
QRadioButton * m_plainTextRadioButton
QGroupBox * m_groupBox