Files
newspark110/customcontrols/mipaddresseditor.h
Chenwenxuan edac2715f0 init
2024-03-06 14:54:30 +08:00

35 lines
695 B
C++

#ifndef MIPADDRESSEDITOR_H
#define MIPADDRESSEDITOR_H
#include <QWidget>
#include <QLineEdit>
class QLineEdit;
class MIpAddressEditor : public QWidget
{
Q_OBJECT
public:
MIpAddressEditor(QWidget* parent = nullptr);
void setIp(const QString& ip);
QString ip() const;
private:
bool eventFilter(QObject *watched, QEvent *event) override;
void paintEvent(QPaintEvent*) override;
QSize sizeHint() const override;
signals:
void IPChanged(QString value);
private slots:
void leIpTextChanged(const QString& text);
private:
bool focused;
QLineEdit *leIp1;
QLineEdit *leIp2;
QLineEdit *leIp3;
QLineEdit *leIp4;
};
#endif // MIPADDRESSEDITOR_H