keeping with the refactoring

This commit is contained in:
Blue 2023-02-03 21:43:13 +03:00
parent edf1ee60cd
commit bf11d8a74e
Signed by: blue
GPG key ID: 9B203B252A63EE38
8 changed files with 298 additions and 6 deletions

View file

@ -19,6 +19,16 @@
#include <QWidget>
#include <QScopedPointer>
#include <QMenu>
#include <QPoint>
#include <QApplication>
#include <QClipboard>
#include "shared/vcard.h"
#include "shared/icons.h"
#include "ui/models/info/emails.h"
#include "ui/models/info/phones.h"
#include "ui/utils/comboboxdelegate.h"
namespace UI {
namespace Ui
@ -29,11 +39,36 @@ class ContactContacts;
class ContactContacts : public QWidget {
Q_OBJECT
public:
ContactContacts(const QString& jid, QWidget* parent = nullptr);
ContactContacts(QWidget* parent = nullptr);
~ContactContacts();
void setVCard(const QString& jid, const Shared::VCard& card, bool editable = false);
void fillVCard(Shared::VCard& card) const;
QString title() const;
private slots:
void onContextMenu(const QPoint& point);
void onAddAddress();
void onRemoveAddress();
void onAddEmail();
void onCopyEmail();
void onRemoveEmail();
void onAddPhone();
void onCopyPhone();
void onRemovePhone();
private:
void initializeDelegates();
void initializeViews();
private:
QScopedPointer<Ui::ContactContacts> m_ui;
QMenu* contextMenu;
Models::EMails emails;
Models::Phones phones;
ComboboxDelegate* roleDelegate;
ComboboxDelegate* phoneTypeDelegate;
bool editable;
};
}