1
0
forked from blue/squawk
squawk/ui/squawk.h

45 lines
799 B
C
Raw Normal View History

2019-03-29 14:54:34 +00:00
#ifndef SQUAWK_H
#define SQUAWK_H
#include <QMainWindow>
#include <QScopedPointer>
#include <QCloseEvent>
2019-03-30 20:13:13 +00:00
#include <deque>
2019-03-29 14:54:34 +00:00
#include "accounts.h"
namespace Ui {
class Squawk;
}
class Squawk : public QMainWindow
{
Q_OBJECT
public:
explicit Squawk(QWidget *parent = nullptr);
~Squawk() override;
2019-03-30 20:13:13 +00:00
signals:
void newAccountRequest(const QMap<QString, QVariant>&);
public slots:
void newAccount(const QMap<QString, QVariant>& account);
2019-03-29 14:54:34 +00:00
private:
2019-03-30 20:13:13 +00:00
typedef std::deque<QMap<QString, QVariant>> AC;
2019-03-29 14:54:34 +00:00
QScopedPointer<Ui::Squawk> m_ui;
Accounts* accounts;
2019-03-30 20:13:13 +00:00
AC accountsCache;
2019-03-29 14:54:34 +00:00
protected:
void closeEvent(QCloseEvent * event) override;
private slots:
void onAccounts();
void onAccountsClosed(QObject* parent = 0);
};
#endif // SQUAWK_H