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