NetworkManager::IpConfig Class
This class represents IP configuration. More...
- Header:
#include <NetworkManagerQt/IpConfig> - CMake:
find_package(KF6 REQUIRED COMPONENTS NetworkManagerQt)
target_link_libraries(mytarget PRIVATE KF6::NetworkManagerQt)
List of all members, including inherited members
Public Functions
- IpConfig()
- IpConfig(const NetworkManager::IpAddresses &addresses, const QList<QHostAddress> &nameservers, const QStringList &domains, const NetworkManager::IpRoutes &routes)
- IpConfig(const NetworkManager::IpConfig &other)
- ~IpConfig()
- NetworkManager::IpAddresses addresses() const
- QStringList dnsOptions() const
- QStringList domains() const
- QString gateway() const
- bool isValid() const
- QList<QHostAddress> nameservers() const
- NetworkManager::IpRoutes routes() const
- QStringList searches() const
- void setIPv4Path(const QString &path)
- void setIPv6Path(const QString &path)
- NetworkManager::IpConfig &IpConfig::operator=(const NetworkManager::IpConfig &other)
Detailed Description
Member Function Documentation
IpConfig::IpConfig()
Constructs an empty IpConfig object.
IpConfig::IpConfig(const NetworkManager::IpAddresses &addresses, const QList<QHostAddress> &nameservers, const QStringList &domains, const NetworkManager::IpRoutes &routes)
Constructs an IP config object with a list of addresses, nameservers, domains and routes.
IpConfig::IpConfig(const NetworkManager::IpConfig &other)
Constructs an IpConfig object that is a copy of the object other.
[noexcept] IpConfig::~IpConfig()
Destroys this IpConfig object.
NetworkManager::IpAddresses IpConfig::addresses() const
Returns a list of IP addresses and gateway related to this configuration. Use IpAddress::ip() to access the IP address and IpAddress::gateway() to access the gateway address.
QStringList IpConfig::dnsOptions() const
Returns a list of DNS options that modify the behaviour of the DNS resolver.
QStringList IpConfig::domains() const
Returns a list of domains related to this configuration.
QString IpConfig::gateway() const
Returns the gateway in use
bool IpConfig::isValid() const
Returns false if the list of IP addresses is empty
QList<QHostAddress> IpConfig::nameservers() const
Returns a list of nameservers related to this configuration.
NetworkManager::IpRoutes IpConfig::routes() const
Returns a list of static routes (not the default gateway) related to this configuration. Use addresses() to retrieve the default gateway.
QStringList IpConfig::searches() const
Returns a list of DNS searches.
void IpConfig::setIPv4Path(const QString &path)
Configure this class using the information on the following path
void IpConfig::setIPv6Path(const QString &path)
Configure this class using the information on the following path
NetworkManager::IpConfig &IpConfig::operator=(const NetworkManager::IpConfig &other)
Makes a copy of the IpConfig object other.