atrooney-online-2/include/aoemotebutton.h
oldmud0 13942345c6 Run clang-format on entire project
Indentation fixed to 2 spaces per tab. Braces set to Stroustrup style.
Lines reflow at 80 characters. One-line method bodies are on the same
line as the signature. Space always after `//`. No indentation
on preprocessor macros. Includes are sorted lexicographically.

If you don't want to see this commit on blames, use the hidden
whitespace option on GitHub, or use `-w` in git-blame.
2020-04-17 21:57:16 -05:00

36 lines
674 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);
// void set_on(QString p_char, int p_emote);
// void set_off(QString p_char, int p_emote);
void set_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