summaryrefslogtreecommitdiff
path: root/src/notificationbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-10-11 12:23:07 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-10-11 12:23:07 +0200
commitab7a1d8e856894a0074178aee111b4043738d439 (patch)
tree732390d3b542a53a1c850bb262b077d157b54237 /src/notificationbar.cpp
parentNo need to check progress if load is finished. (diff)
parentListItem: add auto test for multiple word highlighting. (diff)
downloadrekonq-ab7a1d8e856894a0074178aee111b4043738d439.tar.xz
Merge branch 'm213'
Diffstat (limited to 'src/notificationbar.cpp')
-rw-r--r--src/notificationbar.cpp51
1 files changed, 12 insertions, 39 deletions
diff --git a/src/notificationbar.cpp b/src/notificationbar.cpp
index 94c5cba8..e3d9c6b0 100644
--- a/src/notificationbar.cpp
+++ b/src/notificationbar.cpp
@@ -22,47 +22,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* ============================================================ */
+// Self includes
#include "notificationbar.h"
+#include "notificationbar.moc"
-#include <QApplication>
-#include <QColor>
-#include <QGraphicsEffect>
-#include <QPainter>
-#include <QPropertyAnimation>
-
-
-class BlinkEffect : public QGraphicsEffect
-{
- Q_OBJECT
- Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
-
-public:
- BlinkEffect(QObject *parent = 0)
- : QGraphicsEffect(parent)
- , m_opacity(0)
- , m_backgroundColor(QApplication::palette().highlight().color().lighter())
- {}
-
- qreal opacity() const { return m_opacity; }
- void setOpacity(qreal opacity)
- {
- m_opacity = opacity;
- update();
- }
-
-protected:
- void draw(QPainter *painter)
- {
- painter->drawPixmap(QPoint(0,0), sourcePixmap());
- painter->setOpacity(m_opacity);
- painter->fillRect(boundingRect(), m_backgroundColor);
- }
-
-private:
- double m_opacity;
- QColor m_backgroundColor;
+// Qt Includes
-};
+#include <QLayout>
+#include <QDebug>
NotificationBar::NotificationBar(QWidget *parent)
@@ -89,4 +56,10 @@ void NotificationBar::notifyUser(int animationDuration)
}
-#include "notificationbar.moc"
+void NotificationBar::destroy()
+{
+ qDebug() << Q_FUNC_INFO << "deleting the bar" << this;
+ if (parentWidget() && parentWidget()->layout())
+ parentWidget()->layout()->removeWidget(this);
+ deleteLater();
+}