File indexing completed on 2024-04-28 13:47:01

0001 /*
0002     SPDX-FileCopyrightText: 2006-2007 Tom Albers <toma@kde.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef SETUPTIMING_H
0008 #define SETUPTIMING_H
0009 
0010 #include <qwidget.h>
0011 
0012 class SetupTimingPriv;
0013 
0014 /**
0015  * @class SetupTiming
0016  * These contain the timings settings of RSIBreak, currently
0017  * that means settings for tiny and big breaks
0018  * @author Tom Albers <toma.org>
0019  */
0020 
0021 class SetupTiming : public QWidget
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     /**
0027      * Constructor
0028      * @param parent Parent Widget
0029      */
0030     explicit SetupTiming(QWidget *parent = nullptr);
0031 
0032     /**
0033      * Destructor
0034      */
0035     ~SetupTiming();
0036 
0037     /**
0038      * Call this if you want the settings saved from this page.
0039      */
0040     void applySettings();
0041 
0042 public slots:
0043     void slotSetUseIdleTimer(const bool useIdleTimer);
0044 
0045 private slots:
0046     void slotTinyValueEnabled(bool enabled);
0047     void slotTinyValueChanged(const int tinyIntervalValue);
0048     void slotTinyDurationValueChanged(const int tinyDurationValue);
0049     void slotBigDurationValueChanged(const int bigDurationValue);
0050 
0051 private:
0052     void readSettings();
0053     SetupTimingPriv *d;
0054 };
0055 
0056 #endif /* SETUPTIMING_H */