File indexing completed on 2023-12-03 11:58:23
0001 /* 0002 The configuration page for the profiles 0003 0004 SPDX-FileCopyrightText: 2014-2022 Alexander Reinholdt <alexander.reinholdt@kdemail.net> 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef SMB4KCONFIGPAGEPROFILES_H 0009 #define SMB4KCONFIGPAGEPROFILES_H 0010 0011 // Qt includes 0012 #include <QList> 0013 #include <QPair> 0014 #include <QWidget> 0015 0016 // KDE includes 0017 #include <KEditListWidget> 0018 0019 class Smb4KConfigPageProfiles : public QWidget 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 /** 0025 * Constructor 0026 */ 0027 explicit Smb4KConfigPageProfiles(QWidget *parent = nullptr); 0028 0029 /** 0030 * Destructor 0031 */ 0032 virtual ~Smb4KConfigPageProfiles(); 0033 0034 /** 0035 * Apply the changes made to the list of profiles 0036 */ 0037 void applyChanges(); 0038 0039 /** 0040 * Returns TRUE if the list of profiles changed and FALSE otherwise. 0041 */ 0042 bool profilesChanged() const; 0043 0044 protected Q_SLOTS: 0045 void slotEnableWidget(int state); 0046 void slotProfileAdded(const QString &text); 0047 void slotProfileRemoved(const QString &text); 0048 void slotProfileChanged(); 0049 0050 private: 0051 KEditListWidget *m_profiles; 0052 QList<QPair<QString, QString>> m_renamed; 0053 QStringList m_removed; 0054 bool m_profilesChanged; 0055 }; 0056 0057 #endif