File indexing completed on 2024-05-05 17:01:33

0001 /***************************************************************************
0002     This class derives from QObject and encapsulates a profile item/name. 
0003     It is for use with QtQuick.
0004                              -------------------
0005     begin                : So 23 Nov 2014
0006     copyright            : (C) 2014-2019 by Alexander Reinholdt
0007     email                : alexander.reinholdt@kdemail.net
0008  ***************************************************************************/
0009 
0010 /***************************************************************************
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either version 2 of the License, or     *
0014  *   (at your option) any later version.                                   *
0015  *                                                                         *
0016  *   This program is distributed in the hope that it will be useful, but   *
0017  *   WITHOUT ANY WARRANTY; without even the implied warranty of            *
0018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
0019  *   General Public License for more details.                              *
0020  *                                                                         *
0021  *   You should have received a copy of the GNU General Public License     *
0022  *   along with this program; if not, write to the                         *
0023  *   Free Software Foundation, Inc., 51 Franklin Street, Suite 500, Boston,*
0024  *   MA 02110-1335, USA                                                    *
0025  ***************************************************************************/
0026 
0027 #ifdef HAVE_CONFIG_H
0028 #include <config.h>
0029 #endif
0030 
0031 // application specific includes
0032 #include "smb4kprofileobject.h"
0033 
0034 
0035 class Smb4KProfileObjectPrivate
0036 {
0037   public:
0038     QString profileName;
0039     bool activeProfile;
0040 };
0041 
0042 
0043 Smb4KProfileObject::Smb4KProfileObject(QObject* parent)
0044 : QObject(parent), d(new Smb4KProfileObjectPrivate)
0045 {
0046   d->profileName = QString();
0047   d->activeProfile = false;
0048 }
0049 
0050 
0051 Smb4KProfileObject::~Smb4KProfileObject()
0052 {
0053 }
0054 
0055 
0056 QString Smb4KProfileObject::profileName() const
0057 {
0058   return d->profileName;
0059 }
0060 
0061 
0062 void Smb4KProfileObject::setProfileName(const QString& profileName)
0063 {
0064   d->profileName = profileName;
0065   emit changed();
0066 }
0067 
0068 
0069 bool Smb4KProfileObject::isActiveProfile() const
0070 {
0071   return d->activeProfile;
0072 }
0073 
0074 
0075 void Smb4KProfileObject::setActiveProfile(bool active)
0076 {
0077   d->activeProfile = active;
0078   emit changed();
0079 }
0080