File indexing completed on 2024-05-05 04:57:28
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2008-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 TWITTERPOSTWIDGET_H 0010 #define TWITTERPOSTWIDGET_H 0011 0012 #include "twitterapipostwidget.h" 0013 0014 class TwitterPostWidget : public TwitterApiPostWidget 0015 { 0016 Q_OBJECT 0017 public: 0018 TwitterPostWidget(Choqok::Account *account, Choqok::Post *post, QWidget *parent = nullptr); 0019 ~TwitterPostWidget(); 0020 0021 virtual void initUi() override; 0022 0023 protected Q_SLOTS: 0024 void slotReplyToAll() override; 0025 void quotedAvatarFetched(const QUrl &remoteUrl, const QPixmap &pixmap); 0026 void quotedAvatarFetchError(const QUrl &remoteUrl, const QString &errMsg); 0027 0028 protected: 0029 QString prepareStatus(const QString &text) override; 0030 void checkAnchor(const QUrl &url) override; 0031 bool isRemoveAvailable() override; 0032 bool setupQuotedAvatar(); 0033 0034 static const QRegExp mTwitterUserRegExp; 0035 static const QRegExp mTwitterTagRegExp; 0036 static const QString mQuotedTextBase; 0037 static const QUrl mQuotedAvatarResourceUrl; 0038 private: 0039 QString getBackgroundColor(); 0040 }; 0041 0042 #endif // TWITTERPOSTWIDGET_H