ff7tk
1.2.0.13
Work with Final Fantasy 7 game data
src
widgets
data
ChocoboLabel.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2013 - 2023 Chris Rizzitello <sithlord48@gmail.com>
2
// SPDX-License-Identifier: LGPL-3.0-or-later
3
4
#pragma once
5
6
#include <QWidget>
7
#include <ff7tkwidgets_export.h>
8
9
class
QCheckBox;
10
class
QFrame;
11
class
QLabel;
12
class
QPushButton;
13
14
18
class
FF7TKWIDGETS_EXPORT
ChocoboLabel
:
public
QWidget
19
{
20
Q_OBJECT
21
public
:
29
explicit
ChocoboLabel
(
const
QString &titleText =
nullptr
,
bool
occupied =
false
, QWidget *parent =
nullptr
);
30
~
ChocoboLabel
() =
default
;
31
signals:
32
void
clicked();
33
void
copy();
34
void
paste();
35
void
remove();
36
void
occupiedToggled(
bool
occupied);
37
public
slots:
38
void
setSelected(
bool
selected);
39
void
setType(
int
type);
40
void
setName(QString decodedName);
41
void
setRank(
int
wins);
42
void
setSex(
bool
Male);
43
void
setSex(
int
sex);
44
void
setOccupied(
bool
occupied);
45
void
setTitle(QString title);
46
void
setFontSize(
int
fontSize);
47
void
clearLabel(
void
);
48
bool
isOccupied(
void
);
49
protected
:
50
bool
event(QEvent *ev);
51
void
changeEvent(QEvent *e);
52
void
paintEvent(QPaintEvent *);
53
private
:
54
void
enable(
bool
enabled);
55
QPushButton *btnCopy =
nullptr
;
56
QPushButton *btnPaste =
nullptr
;
57
QPushButton *btnRemove =
nullptr
;
58
QCheckBox *chkOccupied =
nullptr
;
59
QLabel *lblType =
nullptr
;
60
QLabel *lblName =
nullptr
;
61
QLabel *lblRank =
nullptr
;
62
QLabel *lblSex =
nullptr
;
63
QFrame *innerFrame =
nullptr
;
64
QFrame *outerFrame =
nullptr
;
65
int
m_wins = -1;
66
int
m_fontSize = 14;
67
bool
isSelected;
68
bool
isEnabled;
69
inline
static
const
auto
_style = QStringLiteral(
"QPushButton:enabled{background-color:rgba(0,0,0,0);border:0px solid;} QWidget[HoverStyled=\"true\"]:enabled:hover{background-color: palette(highlight)}"
);
70
};
ChocoboLabel
A Label to display a single chocobo's brief data.
Definition:
ChocoboLabel.h:18
Generated by
1.8.17