CCIMXDesktop
 
Loading...
Searching...
No Matches
InterfacesQuery.h
1#ifndef INTERFACESQUERY_H
2#define INTERFACESQUERY_H
3#include <QNetworkInterface>
4#include <QObject>
5class QTimer;
10class InterfacesQuery : public QObject {
11 Q_OBJECT
12 static constexpr const unsigned short TIMELY_SCAN_S = 1;
13
14public:
19 explicit InterfacesQuery(QObject* parent = nullptr);
24 const QList<QNetworkInterface>& interfaces_cached() const { return cached_interfaces; }
25
32 std::optional<QNetworkInterface> from_name_query(const QString& readable_name) const;
33
34signals:
39 void network_query_display(const QStringList interfaces);
40
41private:
42 QTimer* timer;
43 QList<QNetworkInterface> cached_interfaces;
44 void setup_memory();
45 void process_query();
46};
47
48#endif // INTERFACESQUERY_H
The InterfacesQuery class query the netcard info, if you want to specify query way,...
Definition InterfacesQuery.h:10
void network_query_display(const QStringList interfaces)
network_query_display is just the signals
const QList< QNetworkInterface > & interfaces_cached() const
interfaces_cached returns the sync query of the netcard interfaces
Definition InterfacesQuery.h:24
std::optional< QNetworkInterface > from_name_query(const QString &readable_name) const
from_name_query query from the network card readable name, using in select list widgets
Definition InterfacesQuery.cpp:10