#ifndef MIPADDRESSEDITOR_H #define MIPADDRESSEDITOR_H #include #include 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