File indexing completed on 2024-05-12 05:22:09

0001 /*
0002     SPDX-FileCopyrightText: 2012 Jan Grulich <grulja@gmail.com>
0003     SPDX-FileCopyrightText: 2012-2018 Daniel Vrátil <dvratil@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 #pragma once
0009 
0010 #include "ui_mainwindow.h"
0011 #include <QMainWindow>
0012 
0013 #include "core/types.h"
0014 
0015 class MainWindow : public QMainWindow
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit MainWindow(QWidget *parent = nullptr);
0021 
0022 private Q_SLOTS:
0023     /**
0024      * Retrieves tokens from Google that we will use to authenticate
0025      * further requests
0026      */
0027     void authenticate();
0028 
0029     /**
0030      * Retrieves list of all contacts from user's Google Contacts
0031      * addressbook
0032      */
0033     void fetchContactList();
0034 
0035     /**
0036      * A specific contact in contact list has been selected. Sends a request
0037      * to Google to retrieve full details about the specific contact
0038      */
0039     void contactSelected();
0040 
0041 private:
0042     Ui::MainWindow ui;
0043 
0044     KGAPI2::AccountPtr m_account;
0045 };