summaryrefslogtreecommitdiff
path: root/ZeroTierUI/networkwidget.h
blob: e177f25bfd7f1f83efb3a21dfad4a9fc7c83fde6 (plain)
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
#ifndef NETWORK_H
#define NETWORK_H

#include <string>

#include <QWidget>
#include <QListWidgetItem>

namespace Ui {
class NetworkWidget;
}

class NetworkWidget : public QWidget
{
	Q_OBJECT

public:
	explicit NetworkWidget(QWidget *parent = 0,const std::string &nwid = std::string());
	virtual ~NetworkWidget();

	void setStatus(const std::string &status,const std::string &age);
	void setNetworkName(const std::string &name);
	void setNetworkType(const std::string &type);
	void setNetworkDeviceName(const std::string &dev);
	void setIps(const std::string &commaSeparatedList);

	const std::string &networkId();

private slots:
	void on_leaveNetworkButton_clicked();
	void on_networkIdPushButton_clicked();
	void on_ipListWidget_itemActivated(QListWidgetItem *item);

private:
	Ui::NetworkWidget *ui;
	std::string networkIdStr;
};

#endif // NETWORK_H