Warning, file /network/smb4k/smb4k/smb4kconfigpagesynchronization.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     The configuration page for the synchronization options
0003 
0004     SPDX-FileCopyrightText: 2005-2023 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 <QCheckBox>
0013 #include <QSpinBox>
0014 #include <QTabWidget>
0015 
0016 // KDE includes
0017 #include <KLineEdit>
0018 #include <KUrlRequester>
0019 
0020 /**
0021  * This class belongs to the configuration dialog and takes
0022  * care of the options that can be defined for rsync.
0023  *
0024  * @author Alexander Reinholdt <alexander.reinholdt@kdemail.net>
0025  */
0026 
0027 class Smb4KConfigPageSynchronization : public QTabWidget
0028 {
0029     Q_OBJECT
0030 
0031 public:
0032     /**
0033      * The constructor.
0034      *
0035      * @param parent        The parent widget
0036      */
0037     explicit Smb4KConfigPageSynchronization(QWidget *parent = nullptr);
0038 
0039     /**
0040      * The destructor
0041      */
0042     ~Smb4KConfigPageSynchronization();
0043 
0044     /**
0045      * Check the settings for problems. Returns TRUE if none were
0046      * found and FALSE otherwise.
0047      *
0048      * @returns TRUE if all settings are okay.
0049      */
0050     bool checkSettings();
0051 
0052 protected Q_SLOTS:
0053     /**
0054      * This slot is called, when the backup checkbox has been toggled.
0055      * It enables/disables all other backup options according to the
0056      * state the backup button is in.
0057      *
0058      * @param checked       Is TRUE if the m_backup check box has been
0059      *                      checked and FALSE otherwise.
0060      */
0061     void slotBackupToggled(bool checked);
0062 
0063     /**
0064      * This slot is called when the compression checkbox has been toggled.
0065      * It enables/disables all other compression settings according to the
0066      * state of the compression button.
0067      *
0068      * @param checked       TRUE if checked and FALSE otherwise
0069      */
0070     void slotCompressToggled(bool checked);
0071 
0072     /**
0073      * This slot is called when the 'keep partially transferred files' checkbox
0074      * has been toggled. It enables/disables the dependent settings according
0075      * to the state of the checkbox.
0076      *
0077      * @param checked       TRUE if checked and FALSE otherwise
0078      */
0079     void slotKeepPartialToggled(bool checked);
0080 
0081     /**
0082      * This slot is called if the '-F' shortcut has been toggled.
0083      * It unchecks the '-F -F' shortcut.
0084      *
0085      * @param checked       Is TRUE is m_f_filter is checked and FALSE otherwise.
0086      */
0087     void slotFFilterRuleToggled(bool checked);
0088 
0089     /**
0090      * This slot is called if the '-F -F' shortcut has been toggled.
0091      * It unchecks the '-F' shortcut.
0092      *
0093      * @param checked       Is TRUE is m_ff_filter is checked and FALSE otherwise.
0094      */
0095     void slotFFFilterRuleToggled(bool checked);
0096 
0097 private:
0098     KUrlRequester *m_synchronizationPrefix;
0099     QCheckBox *m_makeBackups;
0100     QWidget *m_backupSettingsWidget;
0101     QCheckBox *m_useBackupSuffix;
0102     KLineEdit *m_backupSuffix;
0103     QCheckBox *m_useBackupDirectory;
0104     KUrlRequester *m_backupDirectory;
0105     QCheckBox *m_useMinimalTransferSize;
0106     QSpinBox *m_minimalTransferSize;
0107     QCheckBox *m_useMaximalTransferSize;
0108     QSpinBox *m_maximalTransferSize;
0109     QCheckBox *m_usePartialDirectory;
0110     KUrlRequester *m_partialDirectory;
0111     QCheckBox *m_useExcludePattern;
0112     KLineEdit *m_excludePattern;
0113     QCheckBox *m_useExcludeFrom;
0114     KUrlRequester *m_excludeFrom;
0115     QCheckBox *m_useIncludePattern;
0116     KLineEdit *m_includePattern;
0117     QCheckBox *m_useIncludeFrom;
0118     KUrlRequester *m_includeFrom;
0119     QCheckBox *m_useBlockSize;
0120     QSpinBox *m_blockSize;
0121     QWidget *m_compressionSettingsWidget;
0122     QCheckBox *m_useFFilterRule;
0123     QCheckBox *m_useFFFilterRule;
0124 };
0125 
0126 #endif