#ifndef IP_ADDR_EDIT_H
#define IP_ADDR_EDIT_H

#include <QWidget>
#include "ip_part_line_edit.h"

class QLineEdit;
class QLabel;

class IpAddrEdit : public QWidget
{
    Q_OBJECT
public:
    IpAddrEdit(QWidget* pParent = 0);
    ~IpAddrEdit();

    void settext(const QString &text);
    QString text();
    void setStyleSheet(const QString &styleSheet);

signals:
    void textchanged(const QString& text);
    void textedited(const QString &text);

private slots:
    void textchangedslot(const QString& text);
    void texteditedslot(const QString &text);

private:
    IpPartLineEdit *ip_part1_;
    IpPartLineEdit *ip_part2_;
    IpPartLineEdit *ip_part3_;
    QLineEdit *ip_part4_;

    QLabel *labeldot1_;
    QLabel *labeldot2_;    
    QLabel *labeldot3_;
};

#endif // IP_ADDR_EDIT_H
