51 lines
1.2 KiB
C++
51 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
#include <QTableWidget>
|
|
#include <QTimer>
|
|
#include <QWidget>
|
|
#include <functional>
|
|
|
|
#include "db/MaterialInfo.h"
|
|
#include "db/BankProfileInfo.h"
|
|
|
|
class AccountSettingsWindow final : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
AccountSettingsWindow(QWidget *parent, QString deviceId, QString deviceName, const BankProfileInfo &app);
|
|
|
|
private:
|
|
QString m_deviceId;
|
|
QString m_deviceName;
|
|
BankProfileInfo m_app;
|
|
|
|
QLabel *m_statusLabel;
|
|
QLabel *m_pinLabel;
|
|
QLabel *m_profileLabel;
|
|
QPushButton *m_toggleBtn;
|
|
QTableWidget *m_cardsTable;
|
|
|
|
// Overlay
|
|
QWidget *m_overlay = nullptr;
|
|
QLabel *m_overlayText = nullptr;
|
|
QTimer *m_overlayTimer = nullptr;
|
|
|
|
void showOverlay(const QString &text);
|
|
void hideOverlay(bool success, const QString &message, std::function<void()> onHidden = nullptr);
|
|
|
|
void updateStatusUI();
|
|
void toggleProfileStatus();
|
|
void editPinCode();
|
|
void startCheckPinCode();
|
|
void startGetProfileInfo();
|
|
void startGetCardInfo();
|
|
void sendAppStatus(const QString &status);
|
|
void toggleMaterialStatus(const MaterialInfo &account);
|
|
void reloadCards();
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *event) override;
|
|
};
|