BibleTime
cswordsettings.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 "cswordsettings.h"
14 
15 #include <QTabWidget>
16 #include <QVBoxLayout>
17 #include "../../util/cresmgr.h"
18 #include "btstandardworkstab.h"
19 #include "bttextfilterstab.h"
20 #include "cconfigurationdialog.h"
21 
22 
24  : BtConfigDialog::Page(CResMgr::settings::sword::icon(), parent)
25 {
26  static const QString nullString;
27 
28  m_tabWidget = new QTabWidget(this);
29  m_worksTab = new BtStandardWorksTab(this);
30  m_tabWidget->addTab(m_worksTab, nullString);
31 
32  m_filtersTab = new BtTextFiltersTab(this);
33  m_tabWidget->addTab(m_filtersTab, nullString);
34 
35 
36  QVBoxLayout * mainLayout = new QVBoxLayout(this);
37  mainLayout->addWidget(m_tabWidget);
38 
39  retranslateUi();
40 }
41 
43  setHeaderText(tr("Desk"));
44 
45  m_tabWidget->setTabText(m_tabWidget->indexOf(m_worksTab), tr("Standard works"));
46  m_tabWidget->setTabText(m_tabWidget->indexOf(m_filtersTab), tr("Text filters"));
47 }
48 
50  m_worksTab->save();
51  m_filtersTab->save();
52 }
void setHeaderText(QString const &headerText)
CSwordSettingsPage(CConfigurationDialog *parent=nullptr)
QTabWidget * m_tabWidget
BtStandardWorksTab * m_worksTab
void save() const final override
BtTextFiltersTab * m_filtersTab