-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScoreBar.cpp
More file actions
48 lines (44 loc) · 1.44 KB
/
ScoreBar.cpp
File metadata and controls
48 lines (44 loc) · 1.44 KB
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
39
40
41
42
43
44
45
46
47
48
#include "ScoreBar.h"
ScoreBar::ScoreBar(QWidget* parent)
: QWidget(parent)
, m_pLayout(0)
, m_pSpacer(0)
, m_pScoreLabel(0)
, m_pScoreEdit(0)
, m_pBestLabel(0)
, m_pBestEdit(0)
, m_pSpacerEnd(0)
{
m_pLayout = new QHBoxLayout(this);
m_pLayout->setContentsMargins(QMargins(0, 0, 0, 0));
m_pLayout->setSpacing(0);
m_pScoreLabel = new QLabel(this);
m_pScoreLabel->setObjectName("score");
m_pScoreLabel->setText(tr("Score") + " ");
m_pLayout->addWidget(m_pScoreLabel);
m_pScoreEdit = new QLineEdit(this);
m_pScoreEdit->setObjectName("score");
m_pScoreEdit->setMinimumSize(QSize(150, 25));
m_pScoreEdit->setMaximumSize(QSize(150, 25));
m_pScoreEdit->setReadOnly(true);
m_pScoreEdit->setText("0");
m_pLayout->addWidget(m_pScoreEdit);
m_pSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Fixed);
m_pLayout->addItem(m_pSpacer);
m_pBestLabel = new QLabel(this);
m_pBestLabel->setObjectName("best");
m_pBestLabel->setText(" " + tr("Best") + " ");
m_pLayout->addWidget(m_pBestLabel);
m_pBestEdit = new QLineEdit(this);
m_pBestEdit->setObjectName("best");
m_pBestEdit->setMinimumSize(QSize(150, 25));
m_pBestEdit->setMaximumSize(QSize(150, 25));
m_pBestEdit->setReadOnly(true);
m_pBestEdit->setText("0");
m_pLayout->addWidget(m_pBestEdit);
m_pSpacerEnd = new QSpacerItem(10, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
m_pLayout->addItem(m_pSpacerEnd);
}
ScoreBar::~ScoreBar()
{
}