NetworkManagerQt

ipaddress.cpp
1 /*
2  SPDX-FileCopyrightText: 2008, 2011 Will Stephenson <[email protected]>
3  SPDX-FileCopyrightText: 2013 Daniel Nicoletti <[email protected]>
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 
10 namespace NetworkManager
11 {
12 class IpAddress::Private
13 {
14 public:
16 };
17 
18 }
19 
21  : d(new Private)
22 {
23 }
24 
26 {
27  delete d;
28 }
29 
31  : QNetworkAddressEntry(other)
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 allows querying the underlying system to discover the available network interfaces and rea...
Definition: accesspoint.h:20
~IpAddress()
Destroys this IpAddress object.
Definition: ipaddress.cpp:25
This class represents IP address.
Definition: ipaddress.h:20
QNetworkAddressEntry & operator=(const QNetworkAddressEntry &other)
void setGateway(const QHostAddress &gateway)
Defines the default gateway of this object.
Definition: ipaddress.cpp:42
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
IpAddress()
Constructs an empty IpAddress object.
Definition: ipaddress.cpp:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:03:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.