File indexing completed on 2024-04-28 04:55:36

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 TWITTERAPIDMESSAGEDIALOG_H
0010 #define TWITTERAPIDMESSAGEDIALOG_H
0011 
0012 #include <QDialog>
0013 
0014 #include "twitterapihelper_export.h"
0015 
0016 #include "microblog.h"
0017 
0018 namespace Choqok
0019 {
0020 class Account;
0021 class Post;
0022 
0023     namespace UI
0024     {
0025         class TextEdit;
0026     }
0027 }
0028 
0029 class TwitterApiAccount;
0030 
0031 class TWITTERAPIHELPER_EXPORT TwitterApiDMessageDialog : public QDialog
0032 {
0033     Q_OBJECT
0034 public:
0035     explicit TwitterApiDMessageDialog(TwitterApiAccount *theAccount, QWidget *parent = nullptr, Qt::WindowFlags flags = {});
0036     ~TwitterApiDMessageDialog();
0037     void setTo(const QString &username);
0038 
0039 protected Q_SLOTS:
0040     virtual void accept() override;
0041 
0042     void followersUsernameListed(TwitterApiAccount *, QStringList);
0043     void submitPost(QString);
0044     void reloadFriendslist();
0045     void errorPost(Choqok::Account *, Choqok::Post *, Choqok::MicroBlog::ErrorType,
0046                    QString, Choqok::MicroBlog::ErrorLevel);
0047 
0048 protected:
0049     void setupUi(QWidget *mainWidget);
0050     void setFriends(const QStringList friends);
0051     Choqok::UI::TextEdit *editor();
0052     TwitterApiAccount *account();
0053 
0054 private:
0055     class Private;
0056     Private *const d;
0057 };
0058 
0059 #endif // TWITTERAPIDMESSAGEDIALOG_H