ff7tk 0.80.25
Work with Final Fantasy 7 game data
ChocoboLabel.h
Go to the documentation of this file.
1/****************************************************************************/
2// copyright 2013 - 2020 Chris Rizzitello <sithlord48@gmail.com> //
3// //
4// This file is part of FF7tk //
5// //
6// FF7tk is free software: you can redistribute it and/or modify //
7// it under the terms of the GNU General Public License as published by //
8// the Free Software Foundation, either version 3 of the License, or //
9// (at your option) any later version. //
10// //
11// FF7tk is distributed in the hope that it will be useful, //
12// but WITHOUT ANY WARRANTY; without even the implied warranty of //
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
14// GNU General Public License for more details. //
15/****************************************************************************/
16#pragma once
17
18#include <QWidget>
19
20class QCheckBox;
21class QFrame;
22class QLabel;
23class QPushButton;
24
25#ifndef ff7tkwidgets_export_h
26 #include <ff7tkwidgets_export.h>
27#endif
28
32class FF7TKWIDGETS_EXPORT ChocoboLabel : public QWidget
33{
34 Q_OBJECT
35public:
43 explicit ChocoboLabel(const QString &titleText = nullptr, bool occupied = false, QWidget *parent = nullptr);
44 ~ChocoboLabel() = default;
45signals:
46 void clicked();
47 void copy();
48 void paste();
49 void remove();
50 void occupiedToggled(bool occupied);
51public slots:
52 void setSelected(bool selected);
53 void setType(int type);
54 void setName(QString decodedName);
55 void setRank(int wins);
56 void setSex(bool Male);
57 void setSex(int sex);
58 void setOccupied(bool occupied);
59 void setTitle(QString title);
60 void setFontSize(int fontSize);
61 void clearLabel(void);
62 void setHoverColorStyle(QString backgroundColor);
63 bool isOccupied(void);
64private:
65 void enable(bool enabled);
66 bool event(QEvent *ev);
67 QPushButton *btnCopy = nullptr;
68 QPushButton *btnPaste = nullptr;
69 QPushButton *btnRemove = nullptr;
70 QCheckBox *chkOccupied = nullptr;
71 QLabel *lblType = nullptr;
72 QLabel *lblName = nullptr;
73 QLabel *lblRank = nullptr;
74 QLabel *lblSex = nullptr;
75 QFrame *innerFrame = nullptr;
76 QFrame *outerFrame = nullptr;
77 QString SelectedBkStyle;
78 int m_wins = -1;
79 bool isEnabled;
80};
A Label to display a single chocobo's brief data.
Definition: ChocoboLabel.h:33
void remove()
Emit Signal: the remove button pressed.
void occupiedToggled(bool occupied)
the occupied checkbox has been toggled
void clicked()
Emit Signal: the widget has been clicked.
void paste()
Emit Signal: the paste button pressed.
~ChocoboLabel()=default
void copy()
Emit Signal: the copy button pressed.