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: 2011-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 NOTIFICATION_H 0010 #define NOTIFICATION_H 0011 0012 #include "postwidget.h" 0013 0014 #include "mytextbrowser.h" 0015 0016 class Notification : public QWidget 0017 { 0018 Q_OBJECT 0019 public: 0020 Notification(Choqok::UI::PostWidget *post); 0021 virtual ~Notification(); 0022 void init(); 0023 0024 virtual QSize sizeHint() const override; 0025 0026 Q_SIGNALS: 0027 void ignored(); 0028 void postReaded(); 0029 void mouseEntered(); 0030 void mouseLeaved(); 0031 0032 protected Q_SLOTS: 0033 void slotProcessAnchor(const QUrl &url); 0034 void slotClicked(); 0035 0036 protected: 0037 virtual void mouseMoveEvent(QMouseEvent *) override; 0038 0039 private: 0040 void setDirection(); 0041 void setHeight(); 0042 static const QRegExp dirRegExp; 0043 Choqok::UI::PostWidget *post; 0044 QString dir; 0045 MyTextBrowser mainWidget; 0046 }; 0047 0048 #endif // NOTIFICATION_H