2021-05-22 13:42:26 +00:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2023-01-02 19:30:11 +00:00
|
|
|
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
|
2021-05-22 13:42:26 +00:00
|
|
|
|
|
|
|
#ifndef FEATHER_ACCOUNTSWITCHERDIALOG_H
|
|
|
|
#define FEATHER_ACCOUNTSWITCHERDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
2023-03-01 02:05:56 +00:00
|
|
|
#include "libwalletqt/Wallet.h"
|
2021-10-22 17:19:56 +00:00
|
|
|
#include "components.h"
|
2021-05-22 13:42:26 +00:00
|
|
|
#include "model/SubaddressAccountModel.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class AccountSwitcherDialog;
|
|
|
|
}
|
|
|
|
|
2021-10-22 17:19:56 +00:00
|
|
|
class AccountSwitcherDialog : public WindowModalDialog
|
2021-05-22 13:42:26 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-03-01 02:05:56 +00:00
|
|
|
explicit AccountSwitcherDialog(Wallet *wallet, QWidget *parent = nullptr);
|
2021-05-22 13:42:26 +00:00
|
|
|
~AccountSwitcherDialog() override;
|
|
|
|
|
2023-03-13 18:46:31 +00:00
|
|
|
void update();
|
|
|
|
|
2021-05-22 13:42:26 +00:00
|
|
|
private slots:
|
|
|
|
void showContextMenu(const QPoint& point);
|
|
|
|
void updateSelection();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void switchAccount();
|
|
|
|
void copyLabel();
|
|
|
|
void copyBalance();
|
|
|
|
void editLabel();
|
|
|
|
|
2023-11-17 13:05:31 +00:00
|
|
|
AccountRow* currentEntry();
|
2021-05-22 13:42:26 +00:00
|
|
|
|
2021-06-27 12:13:05 +00:00
|
|
|
QScopedPointer<Ui::AccountSwitcherDialog> ui;
|
2023-03-01 02:05:56 +00:00
|
|
|
Wallet *m_wallet;
|
2021-05-22 13:42:26 +00:00
|
|
|
SubaddressAccountModel *m_model;
|
2021-05-25 22:08:32 +00:00
|
|
|
SubaddressAccountProxyModel *m_proxyModel;
|
2021-05-22 13:42:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //FEATHER_ACCOUNTSWITCHERDIALOG_H
|