From da88f5f0bb5e73bc69bf7ed3962691622b1ae4f9 Mon Sep 17 00:00:00 2001 From: Manjeet Dahiya Date: Wed, 8 Sep 2010 09:23:18 +0000 Subject: add Gui Client example --- examples/GuiClient/customLabel.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 examples/GuiClient/customLabel.h (limited to 'examples/GuiClient/customLabel.h') diff --git a/examples/GuiClient/customLabel.h b/examples/GuiClient/customLabel.h new file mode 100644 index 00000000..d163d693 --- /dev/null +++ b/examples/GuiClient/customLabel.h @@ -0,0 +1,36 @@ +#ifndef CUSTOMLABEL_H +#define CUSTOMLABEL_H + +#include +#include + +class customLabel : public QLabel +{ + Q_OBJECT + +public: + enum Option + { + None = 0, + WithProgressEllipsis, + CountDown + }; + customLabel(QWidget* parent = 0); + + void setCustomText(const QString& text, customLabel::Option op = None, + int countDown = 0); + +// QSize sizeHint() const; + +private slots: + void timeout(); + +private: + QTimer m_timer; + customLabel::Option m_option; + QString m_text; + QString m_postfix; + int m_countDown; +}; + +#endif // CUSTOMLABEL_H -- cgit v1.2.3