keeping with the refactoring
This commit is contained in:
parent
edf1ee60cd
commit
bf11d8a74e
8 changed files with 298 additions and 6 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue