2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 13:47:43 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:19:40 -10:00
parent a1ed397436
commit 39a8b1608d
24 changed files with 2019 additions and 2329 deletions

View File

@@ -2,19 +2,16 @@
#include <QLabel>
class ErrorLabel : public QLabel
{
class ErrorLabel : public QLabel {
public:
ErrorLabel(QWidget* parent = Q_NULLPTR) : QLabel(parent) {}
void setText(const QString& str, bool success = false)
{
QPalette pal = QLabel::palette();
if (success)
pal.setColor(QPalette::WindowText, QColor(0,255,0));
else
pal.setColor(QPalette::WindowText, QColor(255,47,0));
QLabel::setPalette(pal);
QLabel::setText(str);
}
ErrorLabel(QWidget* parent = Q_NULLPTR) : QLabel(parent) {}
void setText(const QString& str, bool success = false) {
QPalette pal = QLabel::palette();
if (success)
pal.setColor(QPalette::WindowText, QColor(0, 255, 0));
else
pal.setColor(QPalette::WindowText, QColor(255, 47, 0));
QLabel::setPalette(pal);
QLabel::setText(str);
}
};