代码拉取完成,页面将自动刷新
同步操作将从 murphy/QTLauncher 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#ifndef NETWIDGET_H_
#define NETWIDGET_H_
#include "basewidget.h"
#include <QLabel>
#include <QLineEdit>
#include <QProcess>
class QVBoxLayout;
class QHBoxLayout;
class QLabel;
class QPaintEvent;
class QHBoxLayout;
class QPushButton;
class QEvent;
namespace ui {
class SwitchBar;
class AutoWidget;
class EtherNet;
class ManualWidget;
class InputMethod;
class NetWidget : public BaseWidget {
Q_OBJECT
public :
explicit NetWidget(QWidget *parent = 0);
~NetWidget();
void startDhcp();
private slots :
void onStateChanged(bool);
void processFinished(int, QProcess::ExitStatus);
void onSignIn();
private :
SwitchBar *mTopBar;
AutoWidget *mAutoItem;
ManualWidget *mManualItem;
QVBoxLayout *mLayout;
};
class PropertyWidget : public QWidget {
Q_OBJECT
public :
explicit PropertyWidget(QString name, QString property = QString(), QWidget *parent = 0);
~PropertyWidget();
void setName(QString name) { mName->setText(name); }
void setProperty(QString property) { mProperty->setText(property); }
void setBackground(QPixmap background) { mBackground = background; }
QString name() { return mName->text(); }
QString property() { return mProperty->text(); }
protected :
void paintEvent(QPaintEvent *e);
private :
QLabel *mName;
QLabel *mProperty;
QPixmap mBackground;
};
class EditableWidget: public QWidget {
Q_OBJECT
public :
explicit EditableWidget(QString name, QString content = QString(), QWidget *parent = 0);
~EditableWidget();
QLineEdit *lineEdit() { return mLineEdit; }
QString name() { return mNameLabel->text(); }
QString content() { return mLineEdit->text(); }
void setName(QString name) { mNameLabel->setText(name); }
void setContent(QString content) { mLineEdit->setText(content); }
protected :
void paintEvent(QPaintEvent *e);
bool eventFilter(QObject *, QEvent *);
signals :
void focus(QLineEdit *);
private :
QLabel *mNameLabel;
QLineEdit *mLineEdit;
};
class TitleWidget : public QLabel {
Q_OBJECT
public :
explicit TitleWidget(QString title, QWidget *parent = 0);
protected :
void paintEvent(QPaintEvent *e);
};
class AutoWidget : public QWidget {
Q_OBJECT
public :
explicit AutoWidget(QWidget *parent = 0);
~AutoWidget();
void updateConfig();
bool autoDhcp();
private :
PropertyWidget *mDevice;
PropertyWidget *mMac;
PropertyWidget *mIp;
PropertyWidget *mNetmask;
PropertyWidget *mGateway;
PropertyWidget *mDns;
EtherNet *mConf;
};
class ManualWidget : public QWidget {
Q_OBJECT
public :
explicit ManualWidget(QWidget *parent = 0);
~ManualWidget();
QString ip() { return mIp->content(); }
QString netmask() { return mNetmask->content(); }
QString gateway() { return mGateway->content(); }
QString dns() { return mDnsSever->content(); }
signals :
void signIn();
private slots :
void onFocusChanged(QLineEdit *);
void onTextInput(QString);
void onTextDel();
void onInputDone();
private :
EditableWidget *mIp;
EditableWidget *mNetmask;
EditableWidget *mGateway;
EditableWidget *mDnsSever;
InputMethod *mInputMethod;
QPushButton *mSign;
QPushButton *mCancel;
QHBoxLayout *mButtonLayout;
QVBoxLayout *mMidLayout;
QLineEdit *mFocusWidget;
};
}
#endif /*NETWIGET_H*/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。