File indexing completed on 2024-04-28 04:55:44
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2017 Andrea Scarpino <scarpino@kde.org> 0005 0006 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 */ 0008 0009 #ifndef MASTODONDMESSAGEDIALOG_H 0010 #define MASTODONDMESSAGEDIALOG_H 0011 0012 #include <QDialog> 0013 0014 #include "microblog.h" 0015 0016 namespace Choqok 0017 { 0018 class Account; 0019 class Post; 0020 0021 namespace UI 0022 { 0023 class TextEdit; 0024 } 0025 } 0026 0027 class MastodonAccount; 0028 0029 class MastodonDMessageDialog : public QDialog 0030 { 0031 Q_OBJECT 0032 public: 0033 explicit MastodonDMessageDialog(MastodonAccount *theAccount, QWidget *parent = nullptr, Qt::WindowFlags flags = {}); 0034 ~MastodonDMessageDialog(); 0035 void setTo(const QString &username); 0036 0037 protected Q_SLOTS: 0038 virtual void accept() override; 0039 0040 void followersUsernameListed(MastodonAccount *, QStringList); 0041 void submitPost(QString); 0042 void reloadFriendslist(); 0043 void errorPost(Choqok::Account *, Choqok::Post *, Choqok::MicroBlog::ErrorType, 0044 QString, Choqok::MicroBlog::ErrorLevel); 0045 0046 protected: 0047 void setupUi(QWidget *mainWidget); 0048 void setFriends(const QStringList friends); 0049 Choqok::UI::TextEdit *editor(); 0050 MastodonAccount *account(); 0051 0052 private: 0053 class Private; 0054 Private *const d; 0055 }; 0056 0057 #endif // MASTODONDMESSAGEDIALOG_H