File indexing completed on 2023-12-10 12:16:17

0001 /*
0002     The configuration page for the synchronization options
0003 
0004     SPDX-FileCopyrightText: 2005-2022 Alexander Reinholdt <alexander.reinholdt@kdemail.net>
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef SMB4KCONFIGPAGESYNCHRONIZATION_H
0009 #define SMB4KCONFIGPAGESYNCHRONIZATION_H
0010 
0011 // Qt includes
0012 #include <QTabWidget>
0013 
0014 /**
0015  * This class belongs to the configuration dialog and takes
0016  * care of the options that can be defined for rsync.
0017  *
0018  * @author Alexander Reinholdt <alexander.reinholdt@kdemail.net>
0019  */
0020 
0021 class Smb4KConfigPageSynchronization : public QTabWidget
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     /**
0027      * The constructor.
0028      *
0029      * @param parent        The parent widget
0030      */
0031     explicit Smb4KConfigPageSynchronization(QWidget *parent = nullptr);
0032 
0033     /**
0034      * The destructor
0035      */
0036     ~Smb4KConfigPageSynchronization();
0037 
0038     /**
0039      * Check the settings for problems. Returns TRUE if none were
0040      * found and FALSE otherwise.
0041      *
0042      * @returns TRUE if all settings are okay.
0043      */
0044     bool checkSettings();
0045 
0046 protected Q_SLOTS:
0047     /**
0048      * This slot is called, when the backup checkbox has been toggled.
0049      * It enables/disables all other backup options according to the
0050      * state the backup button is in.
0051      *
0052      * @param checked       Is TRUE if the m_backup check box has been
0053      *                      checked and FALSE otherwise.
0054      */
0055     void slotBackupToggled(bool checked);
0056 
0057     /**
0058      * This slot is called when the compression checkbox has been toggled.
0059      * It enables/disables all other compression settings according to the
0060      * state of the compression button.
0061      *
0062      * @param checked       TRUE if checked and FALSE otherwise
0063      */
0064     void slotCompressToggled(bool checked);
0065 
0066     /**
0067      * This slot is called when the 'keep partially transferred files' checkbox
0068      * has been toggled. It enables/disables the dependent settings according
0069      * to the state of the checkbox.
0070      *
0071      * @param checked       TRUE if checked and FALSE otherwise
0072      */
0073     void slotKeepPartialToggled(bool checked);
0074 
0075     /**
0076      * This slot is called if the '-F' shortcut has been toggled.
0077      * It unchecks the '-F -F' shortcut.
0078      *
0079      * @param checked       Is TRUE is m_f_filter is checked and FALSE otherwise.
0080      */
0081     void slotFFilterRuleToggled(bool checked);
0082 
0083     /**
0084      * This slot is called if the '-F -F' shortcut has been toggled.
0085      * It unchecks the '-F' shortcut.
0086      *
0087      * @param checked       Is TRUE is m_ff_filter is checked and FALSE otherwise.
0088      */
0089     void slotFFFilterRuleToggled(bool checked);
0090 };
0091 
0092 #endif