File indexing completed on 2024-04-21 15:42:50
0001 /*************************************************************************** 0002 Private helper class(es) for the profile manager. 0003 ------------------- 0004 begin : Mi Aug 12 2014 0005 copyright : (C) 2014-2019 by Alexander Reinholdt 0006 email : alexander.reinholdt@kdemail.net 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * This program is free software; you can redistribute it and/or modify * 0011 * it under the terms of the GNU General Public License as published by * 0012 * the Free Software Foundation; either version 2 of the License, or * 0013 * (at your option) any later version. * 0014 * * 0015 * This program is distributed in the hope that it will be useful, but * 0016 * WITHOUT ANY WARRANTY; without even the implied warranty of * 0017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 0018 * General Public License for more details. * 0019 * * 0020 * You should have received a copy of the GNU General Public License * 0021 * along with this program; if not, write to the * 0022 * Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,* 0023 * MA 02110-1335, USA * 0024 ***************************************************************************/ 0025 0026 #ifndef SMB4KPROFILEMANAGER_P_H 0027 #define SMB4KPROFILEMANAGER_P_H 0028 0029 // Application specific includes 0030 #include "smb4kprofilemanager.h" 0031 0032 // Qt includes 0033 #include <QString> 0034 #include <QStringList> 0035 #include <QWidget> 0036 #include <QDialog> 0037 #include <QPushButton> 0038 0039 // KDE includes 0040 #include <KCompletion/KComboBox> 0041 0042 0043 class Smb4KProfileMigrationDialog : public QDialog 0044 { 0045 Q_OBJECT 0046 0047 public: 0048 /** 0049 * Constructor 0050 */ 0051 explicit Smb4KProfileMigrationDialog(const QStringList &from, 0052 const QStringList &to, 0053 QWidget* parent = 0); 0054 0055 /** 0056 * Destructor 0057 */ 0058 virtual ~Smb4KProfileMigrationDialog(); 0059 0060 /** 0061 * Returns the name of the profile of which the entries 0062 * should be migrated. 0063 * 0064 * @returns the name of the profile. 0065 */ 0066 QString from() const; 0067 0068 /** 0069 * Returns the name of the profile where the entries should 0070 * be migrated to. 0071 * 0072 * @returns the name of the new profile. 0073 */ 0074 QString to() const; 0075 0076 protected Q_SLOTS: 0077 void slotOkClicked(); 0078 0079 private: 0080 void setupView(); 0081 QPushButton *m_ok_button; 0082 QPushButton *m_cancel_button; 0083 QStringList m_from_list; 0084 QStringList m_to_list; 0085 KComboBox *m_from_box; 0086 KComboBox *m_to_box; 0087 }; 0088 0089 0090 class Smb4KProfileManagerPrivate 0091 { 0092 public: 0093 QString activeProfile; 0094 QStringList profiles; 0095 bool useProfiles; 0096 }; 0097 0098 0099 class Smb4KProfileManagerStatic 0100 { 0101 public: 0102 Smb4KProfileManager instance; 0103 }; 0104 0105 0106 #endif