Cockatrice/cockatrice/src/interface/widgets/dialogs/dlg_edit_avatar.h
BruebachL 1365f3cb49
Some checks failed
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
Build Desktop / Configure (push) Has been cancelled
Build Docker / Servatrice (arm) (push) Has been cancelled
Build Docker / Servatrice (x86) (push) Has been cancelled
Build Desktop / Debian 13 (push) Has been cancelled
Build Desktop / Debian 12 (push) Has been cancelled
Build Desktop / Fedora 44 (push) Has been cancelled
Build Desktop / Fedora 43 (push) Has been cancelled
Build Desktop / Servatrice_Debian 12 (push) Has been cancelled
Build Desktop / Ubuntu 26.04 (push) Has been cancelled
Build Desktop / Ubuntu 24.04 (push) Has been cancelled
Build Desktop / Arch (push) Has been cancelled
Build Desktop / macOS 13 Intel (push) Has been cancelled
Build Desktop / macOS 14 (push) Has been cancelled
Build Desktop / macOS 15 (push) Has been cancelled
Build Desktop / macOS 26 Debug (push) Has been cancelled
Build Desktop / Windows 10 (push) Has been cancelled
Build Docker / Publish multi-platform Servatrice image (push) Has been cancelled
[Avatar] Cap user avatar upload resolution at 1024x1024 (#7353)
* [Avatar] Cap user avatar upload resolution at 1024x1024

* Remove stylesheet.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-09-27 21:38:50 +02:00

38 lines
719 B
C++

/**
* @file dlg_edit_avatar.h
* @ingroup AccountDialogs
*/
//! \todo Document this file.
#ifndef DLG_EDITAVATAR_H
#define DLG_EDITAVATAR_H
#include <QComboBox>
#include <QDialog>
#include <QLineEdit>
#include <QLoggingCategory>
inline Q_LOGGING_CATEGORY(DlgEditAvatarLog, "dlg_edit_avatar");
class QLabel;
class QPushButton;
class QCheckBox;
class DlgEditAvatar : public QDialog
{
Q_OBJECT
public:
explicit DlgEditAvatar(QWidget *parent = nullptr);
QByteArray getImage();
private slots:
void actOk();
void actBrowse();
private:
static constexpr int MAX_AVATAR_DIMENSION = 1024;
QImage image;
QLabel *textLabel, *imageLabel, *hintLabel;
QPushButton *browseButton;
};
#endif