9 #ifndef UI_MODALOVERLAY_H 10 #define UI_MODALOVERLAY_H 12 #include <QtCore/QVariant> 13 #include <QtWidgets/QAction> 14 #include <QtWidgets/QApplication> 15 #include <QtWidgets/QButtonGroup> 16 #include <QtWidgets/QFormLayout> 17 #include <QtWidgets/QHBoxLayout> 18 #include <QtWidgets/QHeaderView> 19 #include <QtWidgets/QLabel> 20 #include <QtWidgets/QProgressBar> 21 #include <QtWidgets/QPushButton> 22 #include <QtWidgets/QSpacerItem> 23 #include <QtWidgets/QVBoxLayout> 24 #include <QtWidgets/QWidget> 64 if (ModalOverlay->objectName().isEmpty())
65 ModalOverlay->setObjectName(QStringLiteral(
"ModalOverlay"));
66 ModalOverlay->resize(640, 385);
67 verticalLayout =
new QVBoxLayout(ModalOverlay);
68 verticalLayout->setObjectName(QStringLiteral(
"verticalLayout"));
69 verticalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
70 verticalLayout->setContentsMargins(0, 0, 0, 0);
71 bgWidget =
new QWidget(ModalOverlay);
72 bgWidget->setObjectName(QStringLiteral(
"bgWidget"));
73 bgWidget->setStyleSheet(QStringLiteral(
"#bgWidget { background: rgba(0,0,0,220); }"));
74 verticalLayoutMain =
new QVBoxLayout(bgWidget);
75 verticalLayoutMain->setObjectName(QStringLiteral(
"verticalLayoutMain"));
76 verticalLayoutMain->setContentsMargins(60, 60, 60, 60);
77 contentWidget =
new QWidget(bgWidget);
78 contentWidget->setObjectName(QStringLiteral(
"contentWidget"));
79 contentWidget->setStyleSheet(QLatin1String(
"#contentWidget { background: rgba(255,255,255,240); border-radius: 6px; }\n" 81 "QLabel { color: rgb(40,40,40); }"));
82 verticalLayoutSub =
new QVBoxLayout(contentWidget);
83 verticalLayoutSub->setSpacing(0);
84 verticalLayoutSub->setObjectName(QStringLiteral(
"verticalLayoutSub"));
85 verticalLayoutSub->setContentsMargins(10, 10, 10, 10);
86 horizontalLayoutIconText =
new QHBoxLayout();
87 horizontalLayoutIconText->setObjectName(QStringLiteral(
"horizontalLayoutIconText"));
88 horizontalLayoutIconText->setContentsMargins(-1, 20, -1, -1);
89 verticalLayoutIcon =
new QVBoxLayout();
90 verticalLayoutIcon->setObjectName(QStringLiteral(
"verticalLayoutIcon"));
91 verticalLayoutIcon->setContentsMargins(0, -1, -1, -1);
92 warningIcon =
new QPushButton(contentWidget);
93 warningIcon->setObjectName(QStringLiteral(
"warningIcon"));
94 warningIcon->setEnabled(
false);
96 icon.addFile(QStringLiteral(
":/icons/warning"), QSize(), QIcon::Normal, QIcon::Off);
97 icon.addFile(QStringLiteral(
":/icons/warning"), QSize(), QIcon::Disabled, QIcon::Off);
98 warningIcon->setIcon(icon);
99 warningIcon->setIconSize(QSize(48, 48));
100 warningIcon->setFlat(
true);
102 verticalLayoutIcon->addWidget(warningIcon);
104 verticalSpacerWarningIcon =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
106 verticalLayoutIcon->addItem(verticalSpacerWarningIcon);
109 horizontalLayoutIconText->addLayout(verticalLayoutIcon);
111 verticalLayoutInfoText =
new QVBoxLayout();
112 verticalLayoutInfoText->setObjectName(QStringLiteral(
"verticalLayoutInfoText"));
113 verticalLayoutInfoText->setContentsMargins(0, 0, -1, -1);
114 infoText =
new QLabel(contentWidget);
115 infoText->setObjectName(QStringLiteral(
"infoText"));
116 infoText->setTextFormat(Qt::RichText);
117 infoText->setWordWrap(
true);
119 verticalLayoutInfoText->addWidget(infoText);
121 infoTextStrong =
new QLabel(contentWidget);
122 infoTextStrong->setObjectName(QStringLiteral(
"infoTextStrong"));
126 infoTextStrong->setFont(font);
127 infoTextStrong->setTextFormat(Qt::RichText);
128 infoTextStrong->setWordWrap(
true);
130 verticalLayoutInfoText->addWidget(infoTextStrong);
132 verticalSpacerInTextSpace =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
134 verticalLayoutInfoText->addItem(verticalSpacerInTextSpace);
137 horizontalLayoutIconText->addLayout(verticalLayoutInfoText);
139 horizontalLayoutIconText->setStretch(1, 1);
141 verticalLayoutSub->addLayout(horizontalLayoutIconText);
143 verticalSpacerAfterText =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
145 verticalLayoutSub->addItem(verticalSpacerAfterText);
147 formLayout =
new QFormLayout();
148 formLayout->setObjectName(QStringLiteral(
"formLayout"));
149 formLayout->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
150 formLayout->setHorizontalSpacing(6);
151 formLayout->setVerticalSpacing(6);
152 formLayout->setContentsMargins(-1, 10, -1, -1);
153 labelNumberOfBlocksLeft =
new QLabel(contentWidget);
154 labelNumberOfBlocksLeft->setObjectName(QStringLiteral(
"labelNumberOfBlocksLeft"));
155 labelNumberOfBlocksLeft->setFont(font);
157 formLayout->setWidget(0, QFormLayout::LabelRole, labelNumberOfBlocksLeft);
159 numberOfBlocksLeft =
new QLabel(contentWidget);
160 numberOfBlocksLeft->setObjectName(QStringLiteral(
"numberOfBlocksLeft"));
162 formLayout->setWidget(0, QFormLayout::FieldRole, numberOfBlocksLeft);
164 labelLastBlockTime =
new QLabel(contentWidget);
165 labelLastBlockTime->setObjectName(QStringLiteral(
"labelLastBlockTime"));
166 labelLastBlockTime->setFont(font);
168 formLayout->setWidget(1, QFormLayout::LabelRole, labelLastBlockTime);
170 newestBlockDate =
new QLabel(contentWidget);
171 newestBlockDate->setObjectName(QStringLiteral(
"newestBlockDate"));
172 QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
173 sizePolicy.setHorizontalStretch(0);
174 sizePolicy.setVerticalStretch(0);
175 sizePolicy.setHeightForWidth(newestBlockDate->sizePolicy().hasHeightForWidth());
176 newestBlockDate->setSizePolicy(sizePolicy);
178 formLayout->setWidget(1, QFormLayout::FieldRole, newestBlockDate);
180 labelSyncDone =
new QLabel(contentWidget);
181 labelSyncDone->setObjectName(QStringLiteral(
"labelSyncDone"));
182 labelSyncDone->setFont(font);
184 formLayout->setWidget(2, QFormLayout::LabelRole, labelSyncDone);
186 horizontalLayoutSync =
new QHBoxLayout();
187 horizontalLayoutSync->setObjectName(QStringLiteral(
"horizontalLayoutSync"));
188 percentageProgress =
new QLabel(contentWidget);
189 percentageProgress->setObjectName(QStringLiteral(
"percentageProgress"));
190 percentageProgress->setText(QStringLiteral(
"~"));
192 horizontalLayoutSync->addWidget(percentageProgress);
194 progressBar =
new QProgressBar(contentWidget);
195 progressBar->setObjectName(QStringLiteral(
"progressBar"));
196 progressBar->setValue(24);
198 horizontalLayoutSync->addWidget(progressBar);
200 horizontalLayoutSync->setStretch(1, 1);
202 formLayout->setLayout(2, QFormLayout::FieldRole, horizontalLayoutSync);
204 labelProgressIncrease =
new QLabel(contentWidget);
205 labelProgressIncrease->setObjectName(QStringLiteral(
"labelProgressIncrease"));
206 labelProgressIncrease->setFont(font);
208 formLayout->setWidget(4, QFormLayout::LabelRole, labelProgressIncrease);
210 progressIncreasePerH =
new QLabel(contentWidget);
211 progressIncreasePerH->setObjectName(QStringLiteral(
"progressIncreasePerH"));
213 formLayout->setWidget(4, QFormLayout::FieldRole, progressIncreasePerH);
215 labelEstimatedTimeLeft =
new QLabel(contentWidget);
216 labelEstimatedTimeLeft->setObjectName(QStringLiteral(
"labelEstimatedTimeLeft"));
217 labelEstimatedTimeLeft->setFont(font);
219 formLayout->setWidget(5, QFormLayout::LabelRole, labelEstimatedTimeLeft);
221 expectedTimeLeft =
new QLabel(contentWidget);
222 expectedTimeLeft->setObjectName(QStringLiteral(
"expectedTimeLeft"));
224 formLayout->setWidget(5, QFormLayout::FieldRole, expectedTimeLeft);
227 verticalLayoutSub->addLayout(formLayout);
229 horizontalLayoutButtons =
new QHBoxLayout();
230 horizontalLayoutButtons->setObjectName(QStringLiteral(
"horizontalLayoutButtons"));
231 horizontalLayoutButtons->setContentsMargins(10, 10, -1, -1);
232 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
234 horizontalLayoutButtons->addItem(horizontalSpacer);
236 closeButton =
new QPushButton(contentWidget);
237 closeButton->setObjectName(QStringLiteral(
"closeButton"));
238 closeButton->setFocusPolicy(Qt::StrongFocus);
240 horizontalLayoutButtons->addWidget(closeButton);
243 verticalLayoutSub->addLayout(horizontalLayoutButtons);
245 verticalLayoutSub->setStretch(0, 1);
247 verticalLayoutMain->addWidget(contentWidget);
249 verticalLayoutMain->setStretch(0, 1);
251 verticalLayout->addWidget(bgWidget);
256 closeButton->setDefault(
true);
259 QMetaObject::connectSlotsByName(ModalOverlay);
264 ModalOverlay->setWindowTitle(QApplication::translate(
"ModalOverlay",
"Form", 0));
265 warningIcon->setText(QString());
266 infoText->setText(QApplication::translate(
"ModalOverlay",
"Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.", 0));
267 infoTextStrong->setText(QApplication::translate(
"ModalOverlay",
"Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.", 0));
268 labelNumberOfBlocksLeft->setText(QApplication::translate(
"ModalOverlay",
"Number of blocks left", 0));
269 numberOfBlocksLeft->setText(QApplication::translate(
"ModalOverlay",
"Unknown...", 0));
270 labelLastBlockTime->setText(QApplication::translate(
"ModalOverlay",
"Last block time", 0));
271 newestBlockDate->setText(QApplication::translate(
"ModalOverlay",
"Unknown...", 0));
272 labelSyncDone->setText(QApplication::translate(
"ModalOverlay",
"Progress", 0));
273 progressBar->setFormat(QString());
274 labelProgressIncrease->setText(QApplication::translate(
"ModalOverlay",
"Progress increase per hour", 0));
275 progressIncreasePerH->setText(QApplication::translate(
"ModalOverlay",
"calculating...", 0));
276 labelEstimatedTimeLeft->setText(QApplication::translate(
"ModalOverlay",
"Estimated time left until synced", 0));
277 expectedTimeLeft->setText(QApplication::translate(
"ModalOverlay",
"calculating...", 0));
278 closeButton->setText(QApplication::translate(
"ModalOverlay",
"Hide", 0));
279 closeButton->setShortcut(QApplication::translate(
"ModalOverlay",
"Esc", 0));
290 #endif // UI_MODALOVERLAY_H QLabel * percentageProgress
QSpacerItem * verticalSpacerWarningIcon
QVBoxLayout * verticalLayoutMain
QPushButton * warningIcon
QProgressBar * progressBar
QHBoxLayout * horizontalLayoutSync
QVBoxLayout * verticalLayoutInfoText
QHBoxLayout * horizontalLayoutIconText
Modal overlay to display information about the chain-sync state.
QLabel * expectedTimeLeft
QLabel * labelLastBlockTime
void setupUi(QWidget *ModalOverlay)
QLabel * labelProgressIncrease
QLabel * progressIncreasePerH
QSpacerItem * verticalSpacerAfterText
QSpacerItem * verticalSpacerInTextSpace
QLabel * numberOfBlocksLeft
QHBoxLayout * horizontalLayoutButtons
QVBoxLayout * verticalLayoutIcon
QLabel * labelEstimatedTimeLeft
QPushButton * closeButton
QVBoxLayout * verticalLayoutSub
QSpacerItem * horizontalSpacer
QVBoxLayout * verticalLayout
QLabel * labelNumberOfBlocksLeft
void retranslateUi(QWidget *ModalOverlay)