Warning, file /utilities/kronometer/src/gui/generalsettings.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     Copyright (C) 2015 by Elvis Angelaccio <elvis.angelaccio@kde.org>
0003 
0004     This file is part of Kronometer.
0005 
0006     Kronometer is free software: you can redistribute it and/or modify
0007     it under the terms of the GNU General Public License as published by
0008     the Free Software Foundation, either version 2 of the License, or
0009     (at your option) any later version.
0010 
0011     Kronometer is distributed in the hope that it will be useful,
0012     but WITHOUT ANY WARRANTY; without even the implied warranty of
0013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014     GNU General Public License for more details.
0015 
0016     You should have received a copy of the GNU General Public License
0017     along with Kronometer.  If not, see <http://www.gnu.org/licenses/>.
0018 */
0019 
0020 #include "generalsettings.h"
0021 
0022 #include <QCheckBox>
0023 #include <QComboBox>
0024 #include <QGroupBox>
0025 
0026 GeneralSettings::GeneralSettings(QWidget *parent) : QWidget(parent)
0027 {
0028     setupUi(this);
0029 
0030     connect(kcfg_showSecondFractions, &QCheckBox::toggled, this, &GeneralSettings::showFractionsToggled);
0031     connect(kcfg_showLapSecondFractions, &QCheckBox::toggled, this, &GeneralSettings::showLapFractionsToggled);
0032     connect(kcfg_isLapsRecordingEnabled, &QCheckBox::toggled, this, &GeneralSettings::enableLapsToggled);
0033 }
0034 
0035 void GeneralSettings::showFractionsToggled(bool toggled)
0036 {
0037     kcfg_fractionsType->setEnabled(toggled);
0038 }
0039 
0040 void GeneralSettings::showLapFractionsToggled(bool toggled)
0041 {
0042     kcfg_lapFractionsType->setEnabled(toggled);
0043 }
0044 
0045 void GeneralSettings::enableLapsToggled(bool toggled)
0046 {
0047     lapSettings->setVisible(toggled);
0048 }