aboutsummaryrefslogtreecommitdiff
path: root/aocharbutton.h
blob: f71541691031fb94908bf94ea05a28d69495252f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef AOCHARBUTTON_H
#define AOCHARBUTTON_H

#include "aoapplication.h"

#include <QPushButton>
#include <QString>
#include <QWidget>
#include "aoimage.h"

class AOCharButton : public QPushButton
{
  Q_OBJECT

public:
  AOCharButton(QWidget *parent, AOApplication *p_ao_app, int x_pos, int y_pos);

  AOApplication *ao_app;

  void reset();
  void set_taken();
  void set_passworded();

  void set_image(QString p_character);

private:
  QWidget *m_parent;

  AOImage *ui_taken;
  AOImage *ui_passworded;
  AOImage *ui_selector;

protected:
  void enterEvent(QEvent *e);
  void leaveEvent(QEvent *e);
};

#endif // AOCHARBUTTON_H