Solid

rootdevice.cpp
1/*
2 SPDX-FileCopyrightText: 2010 Mario Bensi <mbensi@ipsquad.net>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#include "rootdevice.h"
8
9using namespace Solid::Backends::Shared;
10
11RootDevice::RootDevice(const QString &udi, const QString &parentUdi)
12 : Solid::Ifaces::Device()
13 , m_udi(udi)
14 , m_parentUdi(parentUdi)
15 , m_vendor("KDE")
16{
17}
18
19RootDevice::~RootDevice()
20{
21}
22
23QString RootDevice::udi() const
24{
25 return m_udi;
26}
27
28QString RootDevice::parentUdi() const
29{
30 return m_parentUdi;
31}
32
33QString RootDevice::vendor() const
34{
35 return m_vendor;
36}
37
38void RootDevice::setVendor(const QString &vendor)
39{
40 m_vendor = vendor;
41}
42
43QString RootDevice::product() const
44{
45 return m_product;
46}
47
48void RootDevice::setProduct(const QString &product)
49{
50 m_product = product;
51}
52
53QString RootDevice::icon() const
54{
55 return m_icon;
56}
57
58void RootDevice::setIcon(const QString &icon)
59{
60 m_icon = icon;
61}
62
63QStringList RootDevice::emblems() const
64{
65 return m_emblems;
66}
67
68void RootDevice::setEmblems(const QStringList &emblems)
69{
70 m_emblems = emblems;
71}
72
73QString RootDevice::description() const
74{
75 return m_description;
76}
77
78void RootDevice::setDescription(const QString &description)
79{
80 m_description = description;
81}
82
83bool RootDevice::queryDeviceInterface(const Solid::DeviceInterface::Type &) const
84{
85 return false;
86}
87
88QObject *RootDevice::createDeviceInterface(const Solid::DeviceInterface::Type &)
89{
90 return nullptr;
91}
92
93#include "moc_rootdevice.cpp"
Type
This enum type defines the type of device interface that a Device can have.
This class allows applications to deal with devices available in the underlying system.
The single responsibility of this class is to create arguments valid for logind Inhibit call.
Definition fakebattery.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:12 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.