-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
NetworkList.hxx
70 lines (52 loc) · 1.56 KB
/
NetworkList.hxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
This file is part of liquidshell.
SPDX-FileCopyrightText: 2017 - 2024 Martin Koller <[email protected]>
SPDX-License-Identifier: GPL-3.0-or-later
*/
#ifndef _NetworkList_H_
#define _NetworkList_H_
#include <QFrame>
#include <QToolButton>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QScrollArea>
class NetworkList : public QFrame
{
Q_OBJECT
public:
NetworkList(QWidget *parent);
QSize sizeHint() const override;
Q_SIGNALS:
void changed();
void configureDialogClicked();
private Q_SLOTS:
void statusUpdate();
void fillConnections();
private:
QToolButton *network, *wireless;
QVBoxLayout *connectionsVbox;
QHBoxLayout *hbox;
QScrollArea *scroll;
};
//--------------------------------------------------------------------------------
#include <NetworkManagerQt/Manager>
#include <NetworkManagerQt/AccessPoint>
#include <IconButton.hxx>
class NetworkButton : public IconButton
{
Q_OBJECT
public:
NetworkButton(NetworkManager::Connection::Ptr c = NetworkManager::Connection::Ptr(),
NetworkManager::Device::Ptr dev = NetworkManager::Device::Ptr(),
NetworkManager::AccessPoint::Ptr accessPoint = NetworkManager::AccessPoint::Ptr());
static bool compare(const NetworkButton *left, const NetworkButton *right);
private Q_SLOTS:
void toggleNetworkStatus(bool on);
private:
NetworkManager::Connection::Ptr connection;
NetworkManager::Device::Ptr device;
QByteArray rawSsid;
QString ssid;
NetworkManager::AccessPoint::WpaFlags wpaFlags;
};
#endif