feather/src/ContactsWidget.h

59 lines
1.3 KiB
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2024-01-01 17:07:58 +00:00
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
2021-06-27 12:51:15 +00:00
#ifndef FEATHER_CONTACTSWIDGET_H
#define FEATHER_CONTACTSWIDGET_H
2021-10-13 13:55:07 +00:00
#include <QPushButton>
#include <QWidget>
#include <QMenu>
2021-06-28 17:48:23 +00:00
#include "model/AddressBookModel.h"
#include "model/AddressBookProxyModel.h"
#include "libwalletqt/Wallet.h"
2021-06-28 17:48:23 +00:00
namespace Ui {
class ContactsWidget;
}
class ContactsWidget : public QWidget
{
Q_OBJECT
public:
explicit ContactsWidget(Wallet *wallet, QWidget *parent = nullptr);
2020-12-23 04:54:57 +00:00
~ContactsWidget() override;
2021-05-23 14:58:18 +00:00
void setSearchbarVisible(bool visible);
void focusSearchbar();
public slots:
void copyAddress();
void copyName();
void payTo();
2020-12-23 04:54:57 +00:00
void newContact(QString address = "", QString name = "");
void deleteContact();
void setShowFullAddresses(bool show);
void setSearchFilter(const QString &filter);
signals:
void fillAddress(QString &address);
private slots:
2020-12-23 04:54:57 +00:00
void showHeaderMenu(const QPoint &position);
private:
2021-06-27 12:13:05 +00:00
QScopedPointer<Ui::ContactsWidget> ui;
Wallet *m_wallet;
QAction *m_showFullAddressesAction;
QMenu *m_rowMenu;
QMenu *m_contextMenu;
QMenu *m_headerMenu;
AddressBookModel * m_model;
AddressBookProxyModel * m_proxyModel;
2021-10-13 13:55:07 +00:00
QPushButton *m_btn_addContact;
};
2021-06-27 12:51:15 +00:00
#endif // FEATHER_CONTACTSWIDGET_H