2014-01-10 23:27:44 +00:00
|
|
|
/*
|
|
|
|
* ZeroTier One - Global Peer to Peer Ethernet
|
2014-02-16 20:40:22 +00:00
|
|
|
* Copyright (C) 2011-2014 ZeroTier Networks LLC
|
2014-01-10 23:27:44 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* --
|
|
|
|
*
|
|
|
|
* ZeroTier may be used and distributed under the terms of the GPLv3, which
|
|
|
|
* are available at: http://www.gnu.org/licenses/gpl-3.0.html
|
|
|
|
*
|
|
|
|
* If you would like to embed ZeroTier into a commercial application or
|
|
|
|
* redistribute it in a modified binary form, please contact ZeroTier Networks
|
|
|
|
* LLC. Start here: http://www.zerotier.com/
|
|
|
|
*/
|
|
|
|
|
2013-11-13 21:50:49 +00:00
|
|
|
#ifndef NETWORK_H
|
|
|
|
#define NETWORK_H
|
|
|
|
|
2013-11-20 21:16:30 +00:00
|
|
|
#include <string>
|
|
|
|
|
2013-11-18 17:01:33 +00:00
|
|
|
#include <QWidget>
|
2013-12-19 00:52:21 +00:00
|
|
|
#include <QListWidgetItem>
|
2013-11-13 21:50:49 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
2013-12-12 23:47:00 +00:00
|
|
|
class NetworkWidget;
|
2013-11-13 21:50:49 +00:00
|
|
|
}
|
|
|
|
|
2013-12-12 23:47:00 +00:00
|
|
|
class NetworkWidget : public QWidget
|
2013-11-13 21:50:49 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2013-12-12 23:47:00 +00:00
|
|
|
explicit NetworkWidget(QWidget *parent = 0,const std::string &nwid = std::string());
|
|
|
|
virtual ~NetworkWidget();
|
2013-11-20 21:16:30 +00:00
|
|
|
|
2013-11-21 20:11:22 +00:00
|
|
|
void setStatus(const std::string &status,const std::string &age);
|
2013-11-20 21:16:30 +00:00
|
|
|
void setNetworkName(const std::string &name);
|
|
|
|
void setNetworkType(const std::string &type);
|
|
|
|
void setNetworkDeviceName(const std::string &dev);
|
|
|
|
void setIps(const std::string &commaSeparatedList);
|
2014-08-20 00:42:17 +00:00
|
|
|
void setMAC(const std::string &mac);
|
2013-11-20 21:16:30 +00:00
|
|
|
|
|
|
|
const std::string &networkId();
|
2013-11-13 21:50:49 +00:00
|
|
|
|
2013-11-18 17:01:33 +00:00
|
|
|
private slots:
|
|
|
|
void on_leaveNetworkButton_clicked();
|
2014-01-24 21:26:24 +00:00
|
|
|
void on_networkIdButton_clicked();
|
2013-12-19 00:52:21 +00:00
|
|
|
void on_ipListWidget_itemActivated(QListWidgetItem *item);
|
2014-01-27 22:55:56 +00:00
|
|
|
void on_ipListWidget_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
|
2013-12-18 02:20:20 +00:00
|
|
|
|
2013-11-13 21:50:49 +00:00
|
|
|
private:
|
2013-12-12 23:47:00 +00:00
|
|
|
Ui::NetworkWidget *ui;
|
2013-11-20 21:16:30 +00:00
|
|
|
std::string networkIdStr;
|
2014-02-05 20:38:37 +00:00
|
|
|
bool publicWarningShown;
|
2013-11-13 21:50:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NETWORK_H
|