File: smb4kprofileobject.cpp

package info (click to toggle)
smb4k 4.0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 19,328 kB
  • sloc: cpp: 19,304; xml: 967; makefile: 7; sh: 5
file content (55 lines) | stat: -rw-r--r-- 1,155 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
    This class derives from QObject and encapsulates a profile item/name.
    It is for use with QtQuick.

    SPDX-FileCopyrightText: 2014-2021 Alexander Reinholdt <alexander.reinholdt@kdemail.net>
    SPDX-License-Identifier: GPL-2.0-or-later
*/

// application specific includes
#include "smb4kprofileobject.h"

class Smb4KProfileObjectPrivate
{
public:
    QString profileName;
    bool activeProfile;
};

Smb4KProfileObject::Smb4KProfileObject(QObject *parent)
    : QObject(parent)
    , d(new Smb4KProfileObjectPrivate)
{
    d->profileName = QString();
    d->activeProfile = false;
}

Smb4KProfileObject::~Smb4KProfileObject()
{
}

QString Smb4KProfileObject::profileName() const
{
    return d->profileName;
}

void Smb4KProfileObject::setProfileName(const QString &profileName)
{
    if (d->profileName != profileName) {
        d->profileName = profileName;
        Q_EMIT changed();
    }
}

bool Smb4KProfileObject::isActiveProfile() const
{
    return d->activeProfile;
}

void Smb4KProfileObject::setActiveProfile(bool active)
{
    if (d->activeProfile != active) {
        d->activeProfile = active;
        Q_EMIT changed();
    }
}