Skip to content

Commit 11a589a

Browse files
committed
qml: Rename to Block Status
1 parent b4bebc3 commit 11a589a

19 files changed

+80
-80
lines changed

src/Makefile.qt.include

+9-9
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ QT_FORMS_UI = \
3535
qt/forms/transactiondescdialog.ui
3636

3737
QT_MOC_CPP = \
38-
qml/components/moc_blockclockdial.cpp \
38+
qml/components/moc_blockstatusdial.cpp \
3939
qml/controls/moc_linegraph.cpp \
4040
qml/models/moc_chainmodel.cpp \
4141
qml/models/moc_networktraffictower.cpp \
@@ -118,7 +118,7 @@ QT_QRC_LOCALE_CPP = qt/qrc_bitcoin_locale.cpp
118118
QT_QRC_LOCALE = qt/bitcoin_locale.qrc
119119

120120
BITCOIN_QT_H = \
121-
qml/components/blockclockdial.h \
121+
qml/components/blockstatusdial.h \
122122
qml/controls/linegraph.h \
123123
qml/models/chainmodel.h \
124124
qml/models/networktraffictower.h \
@@ -310,7 +310,7 @@ BITCOIN_QT_WALLET_CPP = \
310310

311311
BITCOIN_QML_BASE_CPP = \
312312
qml/bitcoin.cpp \
313-
qml/components/blockclockdial.cpp \
313+
qml/components/blockstatusdial.cpp \
314314
qml/controls/linegraph.cpp \
315315
qml/models/chainmodel.cpp \
316316
qml/models/networktraffictower.cpp \
@@ -333,8 +333,8 @@ QML_RES_ICONS = \
333333
qml/res/icons/arrow-down.png \
334334
qml/res/icons/arrow-up.png \
335335
qml/res/icons/bitcoin-circle.png \
336-
qml/res/icons/blockclock-size-compact.png \
337-
qml/res/icons/blockclock-size-showcase.png \
336+
qml/res/icons/blockstatus-size-compact.png \
337+
qml/res/icons/blockstatus-size-showcase.png \
338338
qml/res/icons/blocktime-dark.png \
339339
qml/res/icons/blocktime-light.png \
340340
qml/res/icons/caret-left.png \
@@ -364,8 +364,8 @@ QML_QRC_CPP = qml/qrc_bitcoin.cpp
364364
QML_QRC = qml/bitcoin_qml.qrc
365365
QML_RES_QML = \
366366
qml/components/AboutOptions.qml \
367-
qml/components/BlockClock.qml \
368-
qml/components/BlockClockDisplayMode.qml \
367+
qml/components/BlockStatus.qml \
368+
qml/components/BlockStatusDisplayMode.qml \
369369
qml/components/BlockCounter.qml \
370370
qml/components/ConnectionOptions.qml \
371371
qml/components/ConnectionSettings.qml \
@@ -418,15 +418,15 @@ QML_RES_QML = \
418418
qml/pages/node/Peers.qml \
419419
qml/pages/node/PeerDetails.qml \
420420
qml/pages/node/Shutdown.qml \
421-
qml/pages/onboarding/OnboardingBlockclock.qml \
421+
qml/pages/onboarding/OnboardingBlockStatus.qml \
422422
qml/pages/onboarding/OnboardingConnection.qml \
423423
qml/pages/onboarding/OnboardingCover.qml \
424424
qml/pages/onboarding/OnboardingStorageAmount.qml \
425425
qml/pages/onboarding/OnboardingStorageLocation.qml \
426426
qml/pages/onboarding/OnboardingStrengthen.qml \
427427
qml/pages/onboarding/OnboardingWizard.qml \
428428
qml/pages/settings/SettingsAbout.qml \
429-
qml/pages/settings/SettingsBlockClockDisplayMode.qml \
429+
qml/pages/settings/SettingsBlockStatusDisplayMode.qml \
430430
qml/pages/settings/SettingsConnection.qml \
431431
qml/pages/settings/SettingsDeveloper.qml \
432432
qml/pages/settings/SettingsDisplay.qml \

src/qml/bitcoin.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifdef __ANDROID__
1919
#include <qml/androidnotifier.h>
2020
#endif
21-
#include <qml/components/blockclockdial.h>
21+
#include <qml/components/blockstatusdial.h>
2222
#include <qml/controls/linegraph.h>
2323
#include <qml/guiconstants.h>
2424
#include <qml/models/chainmodel.h>
@@ -327,7 +327,7 @@ int QmlGuiMain(int argc, char* argv[])
327327
AppMode app_mode = SetupAppMode();
328328

329329
qmlRegisterSingletonInstance<AppMode>("org.bitcoincore.qt", 1, 0, "AppMode", &app_mode);
330-
qmlRegisterType<BlockClockDial>("org.bitcoincore.qt", 1, 0, "BlockClockDial");
330+
qmlRegisterType<BlockStatusDial>("org.bitcoincore.qt", 1, 0, "BlockStatusDial");
331331
qmlRegisterType<LineGraph>("org.bitcoincore.qt", 1, 0, "LineGraph");
332332
qmlRegisterUncreatableType<PeerDetailsModel>("org.bitcoincore.qt", 1, 0, "PeerDetailsModel", "");
333333

src/qml/bitcoin_qml.qrc

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!DOCTYPE RCC><RCC version="1.0">
22
<qresource prefix="/qml">
33
<file>components/AboutOptions.qml</file>
4-
<file>components/BlockClock.qml</file>
5-
<file>components/BlockClockDisplayMode.qml</file>
4+
<file>components/BlockStatus.qml</file>
5+
<file>components/BlockStatusDisplayMode.qml</file>
66
<file>components/BlockCounter.qml</file>
77
<file>controls/CaretRightIcon.qml</file>
88
<file>components/ConnectionOptions.qml</file>
@@ -55,15 +55,15 @@
5555
<file>pages/node/Peers.qml</file>
5656
<file>pages/node/PeerDetails.qml</file>
5757
<file>pages/node/Shutdown.qml</file>
58-
<file>pages/onboarding/OnboardingBlockclock.qml</file>
58+
<file>pages/onboarding/OnboardingBlockStatus.qml</file>
5959
<file>pages/onboarding/OnboardingConnection.qml</file>
6060
<file>pages/onboarding/OnboardingCover.qml</file>
6161
<file>pages/onboarding/OnboardingStorageAmount.qml</file>
6262
<file>pages/onboarding/OnboardingStorageLocation.qml</file>
6363
<file>pages/onboarding/OnboardingStrengthen.qml</file>
6464
<file>pages/onboarding/OnboardingWizard.qml</file>
6565
<file>pages/settings/SettingsAbout.qml</file>
66-
<file>pages/settings/SettingsBlockClockDisplayMode.qml</file>
66+
<file>pages/settings/SettingsBlockStatusDisplayMode.qml</file>
6767
<file>pages/settings/SettingsConnection.qml</file>
6868
<file>pages/settings/SettingsDeveloper.qml</file>
6969
<file>pages/settings/SettingsDisplay.qml</file>
@@ -85,8 +85,8 @@
8585
<file alias="arrow-down">res/icons/arrow-down.png</file>
8686
<file alias="arrow-up">res/icons/arrow-up.png</file>
8787
<file alias="bitcoin-circle">res/icons/bitcoin-circle.png</file>
88-
<file alias="blockclock-size-compact">res/icons/blockclock-size-compact.png</file>
89-
<file alias="blockclock-size-showcase">res/icons/blockclock-size-showcase.png</file>
88+
<file alias="blockstatus-size-compact">res/icons/blockstatus-size-compact.png</file>
89+
<file alias="blockstatus-size-showcase">res/icons/blockstatus-size-showcase.png</file>
9090
<file alias="blocktime-dark">res/icons/blocktime-dark.png</file>
9191
<file alias="blocktime-light">res/icons/blocktime-light.png</file>
9292
<file alias="bitcoin">../qt/res/icons/bitcoin.png</file>

src/qml/components/BlockClock.qml src/qml/components/BlockStatus.qml

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ Item {
3838

3939
Settings {
4040
id: settings
41-
property alias blockclocksize: dial.scale
41+
property alias blockstatussize: dial.scale
4242
}
4343

44-
BlockClockDial {
44+
BlockStatusDial {
4545
id: dial
4646
anchors.horizontalCenter: root.horizontalCenter
47-
scale: Theme.blockclocksize
47+
scale: Theme.blockstatussize
4848
width: {Math.max(Math.min(200, Math.min(root.parentWidth - 30, root.parentHeight - 30)),
4949
Math.min((root.parentWidth * dial.scale), (root.parentHeight * dial.scale)))}
5050
height: dial.width

src/qml/components/BlockClockDisplayMode.qml src/qml/components/BlockStatusDisplayMode.qml

+7-7
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ ColumnLayout {
2121
ButtonGroup.group: group
2222
text: qsTr("Compact")
2323
description: qsTr("For personal use on a computer or smartphone.")
24-
image: "image://images/blockclock-size-compact"
25-
checked: Theme.blockclocksize == (1/3)
24+
image: "image://images/blockstatus-size-compact"
25+
checked: Theme.blockstatussize == (1/3)
2626
onClicked: {
27-
Theme.blockclocksize = (1/3)
27+
Theme.blockstatussize = (1/3)
2828
}
2929
}
3030

3131
OptionButton {
3232
Layout.fillWidth: true
3333
ButtonGroup.group: group
3434
text: qsTr("Showcase")
35-
description: qsTr("A larger block clock for public display on a tablet or other large screen.")
36-
image: "image://images/blockclock-size-showcase"
37-
checked: Theme.blockclocksize == (1/2)
35+
description: qsTr("A larger block status for public display on a tablet or other large screen.")
36+
image: "image://images/blockstatus-size-showcase"
37+
checked: Theme.blockstatussize == (1/2)
3838
onClicked: {
39-
Theme.blockclocksize = (1/2)
39+
Theme.blockstatussize = (1/2)
4040
}
4141
}
4242
}

src/qml/components/blockclockdial.cpp src/qml/components/blockstatusdial.cpp

+24-24
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <qml/components/blockclockdial.h>
5+
#include <qml/components/blockstatusdial.h>
66

77
#include <QBrush>
88
#include <QColor>
@@ -12,7 +12,7 @@
1212
#include <QtMath>
1313
#include <QtGlobal>
1414

15-
BlockClockDial::BlockClockDial(QQuickItem *parent)
15+
BlockStatusDial::BlockStatusDial(QQuickItem *parent)
1616
: QQuickPaintedItem(parent)
1717
{
1818
m_animation_timer.setTimerType(Qt::PreciseTimer);
@@ -32,7 +32,7 @@ BlockClockDial::BlockClockDial(QQuickItem *parent)
3232
m_delay_timer.start();
3333
}
3434

35-
void BlockClockDial::setupConnectingGradient(const QPen & pen)
35+
void BlockStatusDial::setupConnectingGradient(const QPen & pen)
3636
{
3737
m_connecting_gradient.setCenter(getBoundsForPen(pen).center());
3838
m_connecting_gradient.setAngle(m_connecting_start_angle);
@@ -43,7 +43,7 @@ void BlockClockDial::setupConnectingGradient(const QPen & pen)
4343
m_connecting_gradient.setColorAt(1, "transparent");
4444
}
4545

46-
qreal BlockClockDial::decrementGradientAngle(qreal angle)
46+
qreal BlockStatusDial::decrementGradientAngle(qreal angle)
4747
{
4848
if (angle == -360) {
4949
return 0;
@@ -52,7 +52,7 @@ qreal BlockClockDial::decrementGradientAngle(qreal angle)
5252
}
5353
}
5454

55-
qreal BlockClockDial::getTargetAnimationAngle()
55+
qreal BlockStatusDial::getTargetAnimationAngle()
5656
{
5757
if (connected() && synced()) {
5858
return m_time_ratio_list[0].toDouble() * 360;
@@ -63,7 +63,7 @@ qreal BlockClockDial::getTargetAnimationAngle()
6363
}
6464
}
6565

66-
qreal BlockClockDial::incrementAnimatingMaxAngle(qreal angle)
66+
qreal BlockStatusDial::incrementAnimatingMaxAngle(qreal angle)
6767
{
6868
if (connected()) {
6969
return angle += (getTargetAnimationAngle() - angle) * 0.05;
@@ -77,19 +77,19 @@ qreal BlockClockDial::incrementAnimatingMaxAngle(qreal angle)
7777
}
7878
}
7979

80-
void BlockClockDial::setTimeRatioList(QVariantList new_list)
80+
void BlockStatusDial::setTimeRatioList(QVariantList new_list)
8181
{
8282
m_time_ratio_list = new_list;
8383
update();
8484
}
8585

86-
void BlockClockDial::setVerificationProgress(double progress)
86+
void BlockStatusDial::setVerificationProgress(double progress)
8787
{
8888
m_verification_progress = progress;
8989
update();
9090
}
9191

92-
void BlockClockDial::setConnected(bool connected)
92+
void BlockStatusDial::setConnected(bool connected)
9393
{
9494
if (m_is_connected != connected) {
9595
m_is_connected = connected;
@@ -104,7 +104,7 @@ void BlockClockDial::setConnected(bool connected)
104104
}
105105
}
106106

107-
void BlockClockDial::setSynced(bool is_synced)
107+
void BlockStatusDial::setSynced(bool is_synced)
108108
{
109109
if (m_is_synced != is_synced) {
110110
m_is_synced = is_synced;
@@ -116,7 +116,7 @@ void BlockClockDial::setSynced(bool is_synced)
116116
}
117117
}
118118

119-
void BlockClockDial::setPaused(bool paused)
119+
void BlockStatusDial::setPaused(bool paused)
120120
{
121121
if (m_is_paused != paused) {
122122
m_is_paused = paused;
@@ -128,39 +128,39 @@ void BlockClockDial::setPaused(bool paused)
128128
}
129129
}
130130

131-
void BlockClockDial::setPenWidth(qreal width)
131+
void BlockStatusDial::setPenWidth(qreal width)
132132
{
133133
m_pen_width = width;
134134
update();
135135
}
136136

137-
void BlockClockDial::setScale(qreal scale)
137+
void BlockStatusDial::setScale(qreal scale)
138138
{
139139
m_scale = scale;
140140
update();
141141

142142
Q_EMIT scaleChanged();
143143
}
144144

145-
void BlockClockDial::setBackgroundColor(QColor color)
145+
void BlockStatusDial::setBackgroundColor(QColor color)
146146
{
147147
m_background_color = color;
148148
update();
149149
}
150150

151-
void BlockClockDial::setConfirmationColors(QList<QColor> colorList)
151+
void BlockStatusDial::setConfirmationColors(QList<QColor> colorList)
152152
{
153153
m_confirmation_colors = colorList;
154154
update();
155155
}
156156

157-
void BlockClockDial::setTimeTickColor(QColor color)
157+
void BlockStatusDial::setTimeTickColor(QColor color)
158158
{
159159
m_time_tick_color = color;
160160
update();
161161
}
162162

163-
QRectF BlockClockDial::getBoundsForPen(const QPen & pen)
163+
QRectF BlockStatusDial::getBoundsForPen(const QPen & pen)
164164
{
165165
const QRectF bounds = boundingRect();
166166
const qreal smallest = qMin(bounds.width(), bounds.height());
@@ -185,7 +185,7 @@ QRectF BlockClockDial::getBoundsForPen(const QPen & pen)
185185
return rect;
186186
}
187187

188-
void BlockClockDial::paintBlocks(QPainter * painter)
188+
void BlockStatusDial::paintBlocks(QPainter * painter)
189189
{
190190
int numberOfBlocks = m_time_ratio_list.length();
191191
if (numberOfBlocks < 2) {
@@ -234,7 +234,7 @@ void BlockClockDial::paintBlocks(QPainter * painter)
234234
}
235235
}
236236

237-
void BlockClockDial::paintProgress(QPainter * painter)
237+
void BlockStatusDial::paintProgress(QPainter * painter)
238238
{
239239
QPen pen(m_confirmation_colors[5]);
240240
pen.setWidthF(m_pen_width);
@@ -257,7 +257,7 @@ void BlockClockDial::paintProgress(QPainter * painter)
257257
painter->drawArc(bounds, startAngle * 16, spanAngle * 16);
258258
}
259259

260-
void BlockClockDial::paintConnectingAnimation(QPainter * painter)
260+
void BlockStatusDial::paintConnectingAnimation(QPainter * painter)
261261
{
262262
QPen pen;
263263
pen.setWidthF(m_pen_width);
@@ -274,7 +274,7 @@ void BlockClockDial::paintConnectingAnimation(QPainter * painter)
274274
}
275275
}
276276

277-
void BlockClockDial::paintBackground(QPainter * painter)
277+
void BlockStatusDial::paintBackground(QPainter * painter)
278278
{
279279
QPen pen(m_background_color);
280280
pen.setWidthF(m_pen_width);
@@ -284,13 +284,13 @@ void BlockClockDial::paintBackground(QPainter * painter)
284284
painter->drawEllipse(bounds);
285285
}
286286

287-
double BlockClockDial::degreesPerPixel()
287+
double BlockStatusDial::degreesPerPixel()
288288
{
289289
double circumference = width() * 3.1415926;
290290
return 360 / circumference;
291291
}
292292

293-
void BlockClockDial::paintTimeTicks(QPainter * painter)
293+
void BlockStatusDial::paintTimeTicks(QPainter * painter)
294294
{
295295
QPen pen(m_time_tick_color);
296296
pen.setWidthF(m_pen_width);
@@ -309,7 +309,7 @@ void BlockClockDial::paintTimeTicks(QPainter * painter)
309309
}
310310
}
311311

312-
void BlockClockDial::paint(QPainter * painter)
312+
void BlockStatusDial::paint(QPainter * painter)
313313
{
314314
if (width() <= 0 || height() <= 0) {
315315
return;

src/qml/components/blockclockdial.h src/qml/components/blockstatusdial.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <QTimer>
1212
#include <QtGlobal>
1313

14-
class BlockClockDial : public QQuickPaintedItem
14+
class BlockStatusDial : public QQuickPaintedItem
1515
{
1616
Q_OBJECT
1717
Q_PROPERTY(QVariantList timeRatioList READ timeRatioList WRITE setTimeRatioList)
@@ -26,7 +26,7 @@ class BlockClockDial : public QQuickPaintedItem
2626
Q_PROPERTY(QColor timeTickColor READ timeTickColor WRITE setTimeTickColor)
2727

2828
public:
29-
explicit BlockClockDial(QQuickItem * parent = nullptr);
29+
explicit BlockStatusDial(QQuickItem * parent = nullptr);
3030
void paint(QPainter * painter) override;
3131

3232
QVariantList timeRatioList() const { return m_time_ratio_list; };

0 commit comments

Comments
 (0)