ZeroTierOne/attic/ZeroTierUI/networkwidget.h

70 lines
2.1 KiB
C
Raw Normal View History

2014-01-10 23:27:44 +00:00
/*
* ZeroTier One - Network Virtualization Everywhere
* Copyright (C) 2011-2015 ZeroTier, Inc.
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
#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 {
class NetworkWidget;
2013-11-13 21:50:49 +00:00
}
class NetworkWidget : public QWidget
2013-11-13 21:50:49 +00:00
{
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);
2014-08-20 00:42:17 +00:00
void setMAC(const std::string &mac);
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-11-13 21:50:49 +00:00
private:
Ui::NetworkWidget *ui;
std::string networkIdStr;
bool publicWarningShown;
2013-11-13 21:50:49 +00:00
};
#endif // NETWORK_H