diff options
Diffstat (limited to 'weather/addcitytool.h')
-rw-r--r-- | weather/addcitytool.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/weather/addcitytool.h b/weather/addcitytool.h index bc313b0..f0f6b1f 100644 --- a/weather/addcitytool.h +++ b/weather/addcitytool.h @@ -29,6 +29,22 @@ private: const QRectF m_boundingRect; }; +class AddCityLineEdit : public QLineEdit +{ + Q_OBJECT +public: + AddCityLineEdit(QWidget *parent = 0); + void editReset(); +protected: + void focusInEvent(QFocusEvent *event); + void focusOutEvent(QFocusEvent *event); +private: + bool m_clean; +private slots: + void textEditedSlot(const QString & text); +}; + + class AddCityFirstScreen : public QObject, public AddCityScreen { Q_OBJECT @@ -44,7 +60,7 @@ private: PixmapButton * const m_button; QString m_text; QGraphicsProxyWidget *m_proxy; - QLineEdit *m_lineEdit; + AddCityLineEdit *m_lineEdit; private slots: void buttonClick(); @@ -98,7 +114,6 @@ private: void paintNotFound(QPainter *painter); void paintAlreadyInList(QPainter *painter); }; - class AddCityTool : public QObject, public QGraphicsPixmapItem { Q_OBJECT |