diff options
author | Eskil Abrahamsen Blomfeldt <eblomfel@trolltech.com> | 2009-06-02 15:38:17 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-01-14 12:47:23 (GMT) |
commit | 9e4bf3772c808d8bf0016ae6674610bae2272613 (patch) | |
tree | c61ce8e18ea14139922438d7e2c63313a199898a /src/gui/text/qstatictext.h | |
parent | c46759628b95e388eb4c5bd8c87347a0f2ea0ad6 (diff) | |
download | Qt-9e4bf3772c808d8bf0016ae6674610bae2272613.zip Qt-9e4bf3772c808d8bf0016ae6674610bae2272613.tar.gz Qt-9e4bf3772c808d8bf0016ae6674610bae2272613.tar.bz2 |
Add operators and implicit sharing to QStaticText
Adds copy constructor, operator==, operator= and operator!= to
QStaticText. Implemented using an implicitly shared private object.
Diffstat (limited to 'src/gui/text/qstatictext.h')
-rw-r--r-- | src/gui/text/qstatictext.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/text/qstatictext.h b/src/gui/text/qstatictext.h index a25bef8..4976039 100644 --- a/src/gui/text/qstatictext.h +++ b/src/gui/text/qstatictext.h @@ -58,10 +58,9 @@ class Q_GUI_EXPORT QStaticText public: QStaticText(); QStaticText(const QString &text, const QFont &font = QFont(), const QSizeF &maximumSize = QSizeF()); + QStaticText(const QStaticText &other); ~QStaticText(); - void isValid() const; - void setText(const QString &text); QString text() const; @@ -71,8 +70,15 @@ public: void setMaximumSize(const QSizeF &maximumSize); QSizeF maximumSize() const; + QStaticText &operator=(const QStaticText &); + bool operator==(const QStaticText &) const; + bool operator!=(const QStaticText &) const; + + QString toString() const; private: + void detach(); + QStaticTextPrivate *d_ptr; }; |