feather/src/contactswidget.h

56 lines
1.2 KiB
C
Raw Normal View History

// SPDX-License-Identifier: BSD-3-Clause
2020-12-26 19:56:06 +00:00
// Copyright (c) 2020-2021, The Monero Project.
#ifndef CONTACTSWIDGET_H
#define CONTACTSWIDGET_H
#include "model/AddressBookModel.h"
#include "model/AddressBookProxyModel.h"
2020-12-23 04:54:57 +00:00
#include "appcontext.h"
#include <QWidget>
#include <QMenu>
namespace Ui {
class ContactsWidget;
}
class ContactsWidget : public QWidget
{
Q_OBJECT
public:
explicit ContactsWidget(QWidget *parent = nullptr);
2021-05-10 15:05:10 +00:00
void setModel(AddressBookModel *model, Wallet *wallet);
2020-12-23 04:54:57 +00:00
~ContactsWidget() override;
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);
2020-12-31 06:54:19 +00:00
void resetModel();
signals:
void fillAddress(QString &address);
private slots:
2020-12-23 04:54:57 +00:00
void showHeaderMenu(const QPoint &position);
private:
Ui::ContactsWidget *ui;
QAction *m_showFullAddressesAction;
QMenu *m_rowMenu;
QMenu *m_contextMenu;
QMenu *m_headerMenu;
AddressBookModel * m_model;
AddressBookProxyModel * m_proxyModel;
2021-05-10 15:05:10 +00:00
Wallet *m_wallet;
};
#endif // CONTACTSWIDGET_H