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: 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 LACONICAEDITACCOUNT_H
0010 #define LACONICAEDITACCOUNT_H
0011 
0012 #include <QByteArray>
0013 
0014 #include "editaccountwidget.h"
0015 
0016 #include "ui_laconicaeditaccount_base.h"
0017 
0018 class QProgressBar;
0019 class GNUSocialApiAccount;
0020 class LaconicaMicroBlog;
0021 /**
0022 
0023 @author Mehrdad Momeny \<mehrdad.momeny@gmail.com\>
0024 */
0025 class LaconicaEditAccountWidget : public ChoqokEditAccountWidget, public Ui::LaconicaEditAccountBase
0026 {
0027     Q_OBJECT
0028 public:
0029     LaconicaEditAccountWidget(LaconicaMicroBlog *microblog, GNUSocialApiAccount *account, QWidget *parent);
0030 
0031     /**
0032     * Destructor
0033     */
0034     ~LaconicaEditAccountWidget();
0035 
0036     virtual bool validateData() override;
0037 
0038     /**
0039     * Create a new account if we are in the 'add account wizard',
0040     * otherwise update the existing account.
0041     * @Return new or modified account. OR nullptr on failure.
0042     */
0043     virtual Choqok::Account *apply() override;
0044 
0045 protected Q_SLOTS:
0046 //     virtual void authorizeUser();
0047 //     void slotAuthMethodChanged(int);
0048     void slotCheckHostUrl();
0049 //     void getAccessToken();
0050 
0051 protected:
0052 //     virtual void getPinCode();
0053     void loadTimelinesTableState();
0054     void saveTimelinesTableState();
0055 //     void setAuthenticated(bool authenticated);
0056     void setTextLimit();
0057 
0058     LaconicaMicroBlog *mBlog;
0059     GNUSocialApiAccount *mAccount;
0060     QProgressBar *progress;
0061 
0062     bool isAuthenticated;
0063 };
0064 
0065 #endif // LACONICAEDITACCOUNT_H