atrooney-online-2/include/aoemotebutton.h
Crystalwarrior c8e12558cd Clang-ify the code with this styling using Visual Studio Code:
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All }
(this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
2020-05-22 01:18:24 +03:00

35 lines
684 B
C++

#ifndef AOEMOTEBUTTON_H
#define AOEMOTEBUTTON_H
#include "aoapplication.h"
#include <QDebug>
#include <QPushButton>
class AOEmoteButton : public QPushButton {
Q_OBJECT
public:
AOEmoteButton(QWidget *p_parent, AOApplication *p_ao_app, int p_x, int p_y, int p_w, int p_h);
void set_image(QString p_image, QString p_emote_comment);
void set_char_image(QString p_char, int p_emote, QString suffix);
void set_id(int p_id) { m_id = p_id; }
int get_id() { return m_id; }
private:
QWidget *parent;
AOApplication *ao_app;
int m_id = 0;
signals:
void emote_clicked(int p_id);
private slots:
void on_clicked();
};
#endif // AOEMOTEBUTTON_H