File indexing completed on 2024-04-28 04:55:43
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2016 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 FRIENDICAEDITACCOUNT_H 0010 #define FRIENDICAEDITACCOUNT_H 0011 0012 #include <QByteArray> 0013 0014 #include "editaccountwidget.h" 0015 0016 #include "ui_friendicaeditaccount_base.h" 0017 0018 class QProgressBar; 0019 class GNUSocialApiAccount; 0020 class FriendicaMicroBlog; 0021 0022 class FriendicaEditAccountWidget : public ChoqokEditAccountWidget, public Ui::FriendicaEditAccountBase 0023 { 0024 Q_OBJECT 0025 public: 0026 FriendicaEditAccountWidget(FriendicaMicroBlog *microblog, GNUSocialApiAccount *account, QWidget *parent); 0027 0028 /** 0029 * Destructor 0030 */ 0031 ~FriendicaEditAccountWidget(); 0032 0033 virtual bool validateData() override; 0034 0035 /** 0036 * Create a new account if we are in the 'add account wizard', 0037 * otherwise update the existing account. 0038 * @Return new or modified account. OR nullptr on failure. 0039 */ 0040 virtual Choqok::Account *apply() override; 0041 0042 protected Q_SLOTS: 0043 // virtual void authorizeUser(); 0044 // void slotAuthMethodChanged(int); 0045 void slotCheckHostUrl(); 0046 // void getAccessToken(); 0047 0048 protected: 0049 // virtual void getPinCode(); 0050 void loadTimelinesTableState(); 0051 void saveTimelinesTableState(); 0052 // void setAuthenticated(bool authenticated); 0053 void setTextLimit(); 0054 0055 FriendicaMicroBlog *mBlog; 0056 GNUSocialApiAccount *mAccount; 0057 QProgressBar *progress; 0058 0059 bool isAuthenticated; 0060 }; 0061 0062 #endif // FRIENDICAEDITACCOUNT_H