NetworkManagerQt

ipaddress.cpp
1/*
2 SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <wstephenson@kde.org>
3 SPDX-FileCopyrightText: 2013 Daniel Nicoletti <dantti12@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8#include "ipaddress.h"
9
10namespace NetworkManager
11{
12class IpAddress::Private
13{
14public:
15 QHostAddress gateway;
16};
17
18}
19
21 : d(new Private)
22{
23}
24
29
32 , d(new Private)
33{
34 *this = other;
35}
36
38{
39 return !ip().isNull();
40}
41
43{
44 d->gateway = gateway;
45}
46
48{
49 return d->gateway;
50}
51
53{
54 if (this == &other) {
55 return *this;
56 }
57
59 *d = *other.d;
60
61 return *this;
62}
This class represents IP address.
Definition ipaddress.h:21
IpAddress()
Constructs an empty IpAddress object.
Definition ipaddress.cpp:20
IpAddress & operator=(const IpAddress &other)
Makes a copy of the IpAddress object other.
Definition ipaddress.cpp:52
QHostAddress gateway() const
Returns the default gateway of this object.
Definition ipaddress.cpp:47
bool isValid() const
Return if the IP address is defined.
Definition ipaddress.cpp:37
void setGateway(const QHostAddress &gateway)
Defines the default gateway of this object.
Definition ipaddress.cpp:42
~IpAddress()
Destroys this IpAddress object.
Definition ipaddress.cpp:25
This class allows querying the underlying system to discover the available network interfaces and rea...
Definition accesspoint.h:21
QNetworkAddressEntry & operator=(const QNetworkAddressEntry &other)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.