File indexing completed on 2025-02-02 04:52:51
0001 /* 0002 The configuration page for the mount options 0003 0004 SPDX-FileCopyrightText: 2015-2023 Alexander Reinholdt <alexander.reinholdt@kdemail.net> 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef SMB4KCONFIGPAGEMOUNTING_H 0009 #define SMB4KCONFIGPAGEMOUNTING_H 0010 0011 // Qt includes 0012 #include <QCheckBox> 0013 #include <QTabWidget> 0014 0015 // KDE includes 0016 #include <KLineEdit> 0017 #include <KUrlRequester> 0018 0019 /** 0020 * This configuration page contains the mount options 0021 * 0022 * @author Alexander Reinholdt <alexander.reinholdt@kdemail.net> 0023 * @since 2.0.0 0024 */ 0025 0026 class Smb4KConfigPageMounting : public QTabWidget 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 /** 0032 * The constructor 0033 */ 0034 explicit Smb4KConfigPageMounting(QWidget *parent = nullptr); 0035 0036 /** 0037 * The destructor 0038 */ 0039 virtual ~Smb4KConfigPageMounting(); 0040 0041 /** 0042 * Check the settings for problems. Returns TRUE if none were 0043 * found and FALSE otherwise. 0044 * 0045 * @returns TRUE if all settings are okay. 0046 */ 0047 bool checkSettings(); 0048 0049 protected Q_SLOTS: 0050 /** 0051 * Sets the new general user ID. 0052 * 0053 * @param action The action that represents the new user. 0054 */ 0055 void slotNewUserTriggered(QAction *action); 0056 0057 /** 0058 * Sets the new general group ID. 0059 * 0060 * @param action The action that represents the new group. 0061 */ 0062 void slotNewGroupTriggered(QAction *action); 0063 0064 #if defined(Q_OS_LINUX) 0065 /** 0066 * Enable / disable the options that are only necessary when the servers 0067 * do not support the CIFS Unix extensions. 0068 * 0069 * @param checked TRUE if the button is checked 0070 */ 0071 void slotCIFSUnixExtensionsSupport(bool checked); 0072 0073 /** 0074 * This slot is activated when the additional CIFS options are to be 0075 * edited (Linux only). 0076 */ 0077 void slotAdditionalCIFSOptions(); 0078 #endif 0079 0080 #if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) 0081 /** 0082 * This slot is activated when the setting of the character set usage is changed 0083 * (BSD only). 0084 */ 0085 void slotCharacterSets(bool on); 0086 #endif 0087 0088 /** 0089 * This slot is activated when the "Remount shares" check box is toggled 0090 */ 0091 void slotRemountSharesToggled(bool on); 0092 0093 private: 0094 void setupWidget(); 0095 KUrlRequester *m_mountPrefix; 0096 QWidget *m_remountSettingsWidget; 0097 QCheckBox *m_useFileMode; 0098 KLineEdit *m_fileMode; 0099 QCheckBox *m_useDirectoryMode; 0100 KLineEdit *m_directoryMode; 0101 KLineEdit *m_userId; 0102 KLineEdit *m_groupId; 0103 #if defined(Q_OS_LINUX) 0104 QWidget *m_singleCifsExtensionsSettingsWidget; 0105 KLineEdit *m_additionalCifsOptions; 0106 #endif 0107 0108 #if defined(Q_OS_FREEBSD) || defined(Q_OS_NETBSD) 0109 QWidget *m_characterSetSettingsWidget; 0110 #endif 0111 }; 0112 0113 #endif