summaryrefslogtreecommitdiff
path: root/src/messagebar.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-01 10:56:10 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-11 12:52:53 +0200
commite3cdb49f2aa6b84f60deabbd20945e02a48193c7 (patch)
treeeca32ed4bb33092a4d630ddbd5817039c4033ffd /src/messagebar.h
parentAdd GFDL-1.2 licensing for docs (diff)
downloadrekonq-e3cdb49f2aa6b84f60deabbd20945e02a48193c7.tar.xz
Move to KMessageWidget
Port rekonq notification bars to KMessageWidget: walletbar, crash notification bar, set favorite preview bar. Remove old no more used notification bar.
Diffstat (limited to 'src/messagebar.h')
-rw-r--r--src/messagebar.h43
1 files changed, 9 insertions, 34 deletions
diff --git a/src/messagebar.h b/src/messagebar.h
index 65313662..6125bfa1 100644
--- a/src/messagebar.h
+++ b/src/messagebar.h
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2010-2011 by Pierre Rossi <pierre dot rossi at gmail dot com>
+* Copyright (C) 2011 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -23,57 +24,31 @@
*
* ============================================================ */
+
#ifndef MESSAGEBAR_H
#define MESSAGEBAR_H
// Rekonq Includes
#include "rekonq_defines.h"
-#include "notificationbar.h"
-
-// Qt Includes
-#include <QMessageBox>
-// Forward Declarations
-class QLabel;
-class QPushButton;
+// KDE Includes
+#include <KMessageWidget>
-class REKONQ_TESTS_EXPORT MessageBar : public NotificationBar
+class REKONQ_TESTS_EXPORT MessageBar : public KMessageWidget
{
Q_OBJECT
- Q_FLAGS(StandardButtons)
-
public:
+ explicit MessageBar(const QString & message, QWidget *parent);
- enum StandardButton
- {
- NoButton = 0x00000000,
- Ok = 0x00000001,
- Cancel = 0x00000002,
- Yes = 0x00000004,
- No = 0x00000008,
- Continue = 0x00000010
- };
-
- Q_DECLARE_FLAGS(StandardButtons, StandardButton)
-
- explicit MessageBar(const QString & message, QWidget *parent
- , QMessageBox::Icon icon = QMessageBox::NoIcon
- , StandardButtons buttons = NoButton);
- ~MessageBar();
-
+private Q_SLOTS:
+ void hideAndDelete();
+
Q_SIGNALS:
void accepted();
void rejected();
-
-private:
- QLabel *m_icon;
- QLabel *m_text;
- QList<QPushButton *> m_buttons;
-
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(MessageBar::StandardButtons)
#endif // MESSAGEBAR_H