File indexing completed on 2024-04-21 05:01:42
0001 /* 0002 This class derives from QObject and encapsulates a profile item/name. 0003 It is for use with QtQuick. 0004 0005 SPDX-FileCopyrightText: 2014-2021 Alexander Reinholdt <alexander.reinholdt@kdemail.net> 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 // application specific includes 0010 #include "smb4kprofileobject.h" 0011 0012 class Smb4KProfileObjectPrivate 0013 { 0014 public: 0015 QString profileName; 0016 bool activeProfile; 0017 }; 0018 0019 Smb4KProfileObject::Smb4KProfileObject(QObject *parent) 0020 : QObject(parent) 0021 , d(new Smb4KProfileObjectPrivate) 0022 { 0023 d->profileName = QString(); 0024 d->activeProfile = false; 0025 } 0026 0027 Smb4KProfileObject::~Smb4KProfileObject() 0028 { 0029 } 0030 0031 QString Smb4KProfileObject::profileName() const 0032 { 0033 return d->profileName; 0034 } 0035 0036 void Smb4KProfileObject::setProfileName(const QString &profileName) 0037 { 0038 if (d->profileName != profileName) { 0039 d->profileName = profileName; 0040 Q_EMIT changed(); 0041 } 0042 } 0043 0044 bool Smb4KProfileObject::isActiveProfile() const 0045 { 0046 return d->activeProfile; 0047 } 0048 0049 void Smb4KProfileObject::setActiveProfile(bool active) 0050 { 0051 if (d->activeProfile != active) { 0052 d->activeProfile = active; 0053 Q_EMIT changed(); 0054 } 0055 }