diff options
| author | Peter Penz <[email protected]> | 2007-01-30 19:38:44 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-01-30 19:38:44 +0000 |
| commit | 7495dabc15d5a3a2c7a1e81657227f936a59144f (patch) | |
| tree | 7de2e26f7c8a155fb7c88fc64c2be44531b9e201 /src/statusbarmessagelabel.h | |
| parent | e1816544942d72f5228555adcd13a4ada0a712ed (diff) | |
Improvements for error messages:
- increase/decrease size on demand and hide progress bar or space information if required
- provide close button
TODO: the code is far from being finished (e. g. no queueing of pending error messages, close button looks fugly, ...), but I decided to commit the changes to prevent getting an inconsistent state in combination with other commits...
svn path=/trunk/playground/utils/dolphin/; revision=628642
Diffstat (limited to 'src/statusbarmessagelabel.h')
| -rw-r--r-- | src/statusbarmessagelabel.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/statusbarmessagelabel.h b/src/statusbarmessagelabel.h index 03683c107..b75e499fb 100644 --- a/src/statusbarmessagelabel.h +++ b/src/statusbarmessagelabel.h @@ -21,13 +21,15 @@ #ifndef STATUSBARMESSAGELABEL_H #define STATUSBARMESSAGELABEL_H -#include <qwidget.h> -#include <qpixmap.h> -#include <qstring.h> -//Added by qt3to4: -#include <QPaintEvent> -#include <QResizeEvent> #include <dolphinstatusbar.h> + +#include <QPixmap> +#include <QString> +#include <QWidget> + +class QPaintEvent; +class QResizeEvent; +class QPushButton; class QTimer; /** @@ -84,6 +86,12 @@ private slots: */ int availableTextWidth() const; + /** + * Moves the close button to the upper right corner + * of the message label. + */ + void updateCloseButtonPosition(); + private: enum State { Default, @@ -101,12 +109,13 @@ private: QTimer* m_timer; QString m_text; QPixmap m_pixmap; + QPushButton* m_closeButton; QColor mixColors(const QColor& c1, const QColor& c2, int percent) const; - int pixmapGap() const { return 3; } + int borderGap() const { return 3; } }; #endif |
