init
This commit is contained in:
34
customcontrols/mipaddresseditor.h
Normal file
34
customcontrols/mipaddresseditor.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user