kylin-nm/src-vpn/frontend/vpndetails/vpnipv6page.h

58 lines
1.3 KiB
C++

#ifndef VPNIPV6PAGE_H
#define VPNIPV6PAGE_H
#include <QWidget>
#include <QFrame>
#include <QLabel>
#include <QLineEdit>
#include <QComboBox>
#include <QFormLayout>
#include "kyvpnconnectoperation.h"
class VpnIpv6Page : public QFrame
{
Q_OBJECT
public:
VpnIpv6Page(QWidget *parent = nullptr);
~VpnIpv6Page() = default;
void setVpnIpv6Info(const KyVpnConfig &vpnInfo);
void setDns(const QString &firstDns);
void setSearchDomain(const QString &searchDomain);
bool checkIsChanged(const KyVpnConfig &vpnInfo);
void updateVpnIpv6Info(KyVpnConfig &vpnInfo);
private:
QLabel *m_configLabel;
QLabel *m_addressLabel;
QLabel *m_maskLabel;
QLabel *m_gateWayLabel;
QLabel *m_dnsServerLabel;
QLabel *m_searchDomainLabel;
QComboBox *m_ipv6ConfigCombox;
QLineEdit *m_ipv6addressEdit;
QLineEdit *m_netMaskEdit;
QLineEdit *m_gateWayEdit;
QLineEdit *m_dnsServerEdit;
QLineEdit *m_searchDomainEdit;
void initUI();
void initConnect();
void setManualEnabled(bool state);
bool getIpv6EditState(QString text);
bool checkConfirmBtnIsEnabled();
private Q_SLOTS:
void setEnableOfConfirmBtn();
void onConfigChanged(int index);
Q_SIGNALS:
void setIpv6PageState(bool);
};
#endif // VPNIPV6PAGE_H