forked from blue/squawk
changing avatar in local vcard, no uploading yet
This commit is contained in:
parent
2a37f36b83
commit
652381b067
9 changed files with 221 additions and 63 deletions
|
@ -21,9 +21,16 @@
|
|||
|
||||
#include <QWidget>
|
||||
#include <QScopedPointer>
|
||||
#include <QPixmap>
|
||||
#include <QMenu>
|
||||
#include <QFileDialog>
|
||||
#include <QMimeDatabase>
|
||||
#include <QImage>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <set>
|
||||
|
||||
#include "../../global.h"
|
||||
#include "../utils/image.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
|
@ -49,10 +56,22 @@ signals:
|
|||
|
||||
private slots:
|
||||
void onButtonBoxAccepted();
|
||||
void onClearAvatar();
|
||||
void onSetAvatar();
|
||||
void onAvatarSelected();
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::VCard> m_ui;
|
||||
Image avatar;
|
||||
QSize avatarButtonMargins;
|
||||
QMenu* avatarMenu;
|
||||
bool editable;
|
||||
Shared::Avatar currentAvatarType;
|
||||
QString currentAvatarPath;
|
||||
|
||||
static const std::set<QString> supportedTypes;
|
||||
|
||||
private:
|
||||
void updateAvatar();
|
||||
};
|
||||
|
||||
#endif // VCARD_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue