#define STATUSBARMESSAGELABEL_H
-#include <QtCore/QList>
-#include <QtGui/QPixmap>
+#include <QList>
+#include <QPixmap>
+#include <QWidget>
+#include <QTimer>
-#include <QtGui/QWidget>
#include <definitions.h>
class QPaintEvent;
class QResizeEvent;
class QPushButton;
-class QTimer;
/**
* @brief Represents a message text label as part of the status bar.
const QString& text() const;
- void setDefaultText(const QString& text);
- const QString& defaultText() const;
-
// TODO: maybe a better approach is possible with the size hint
void setMinimumTextHeight(int min);
int minimumTextHeight() const;
- /**
- * Returns the gap of the width of the current set text to the
- * width of the message label. A gap <= 0 means that the text
- * fits into the available width.
- */
- int widthGap() const;
-
protected:
/** @see QWidget::paintEvent() */
virtual void paintEvent(QPaintEvent* event);
State m_state;
int m_illumination;
int m_minTextHeight;
- QTimer* m_timer;
+ QTimer m_timer;
+ QTimer m_hidetimer;
QString m_text;
- QString m_defaultText;
QList<QString> m_pendingMessages;
QPixmap m_pixmap;
QPushButton* m_closeButton;
return m_text;
}
-inline void StatusBarMessageLabel::setDefaultText(const QString& text)
-{
- m_defaultText = text;
-}
-
-inline const QString& StatusBarMessageLabel::defaultText() const
-{
- return m_defaultText;
-}
-
inline int StatusBarMessageLabel::minimumTextHeight() const
{
return m_minTextHeight;