File indexing completed on 2024-05-05 04:57:29

0001 /*
0002     This file is part of Choqok, the KDE micro-blogging client
0003 
0004     SPDX-FileCopyrightText: 2012 Mehrdad Momeny <mehrdad.momeny@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0007 */
0008 
0009 #ifndef DUMMYNOTIFICATION_H
0010 #define DUMMYNOTIFICATION_H
0011 
0012 #include <QTextBrowser>
0013 
0014 class DummyNotification : public QTextBrowser
0015 {
0016     Q_OBJECT
0017 public:
0018     DummyNotification(const QFont &font, const QColor &color, const QColor &background, QWidget *parent);
0019     virtual ~DummyNotification();
0020 
0021 protected:
0022     virtual void mouseMoveEvent(QMouseEvent *ev) override;
0023     virtual void mousePressEvent(QMouseEvent *ev) override;
0024     virtual void mouseReleaseEvent(QMouseEvent *ev) override;
0025 
0026 Q_SIGNALS:
0027     void positionSelected(QPoint position);
0028 
0029 protected Q_SLOTS:
0030     void slotProcessAnchor(const QUrl &url);
0031 
0032 private:
0033     QPoint lastPressedPosition;
0034     bool isMoving;
0035 };
0036 
0037 #endif // DUMMYNOTIFICATION_H