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/QStackedWidget> 24 #include <QtWidgets/QVBoxLayout> 25 #include <QtWidgets/QWidget> 82 if (ModalOverlay->objectName().isEmpty())
83 ModalOverlay->setObjectName(QStringLiteral(
"ModalOverlay"));
84 ModalOverlay->resize(640, 513);
85 verticalLayout =
new QVBoxLayout(ModalOverlay);
86 verticalLayout->setObjectName(QStringLiteral(
"verticalLayout"));
87 verticalLayout->setSizeConstraint(QLayout::SetDefaultConstraint);
88 verticalLayout->setContentsMargins(0, 0, 0, 0);
89 bgWidget =
new QWidget(ModalOverlay);
90 bgWidget->setObjectName(QStringLiteral(
"bgWidget"));
91 bgWidget->setStyleSheet(QStringLiteral(
"#bgWidget { background: rgba(0,0,0,220); }"));
92 verticalLayoutMain =
new QVBoxLayout(bgWidget);
93 verticalLayoutMain->setObjectName(QStringLiteral(
"verticalLayoutMain"));
94 verticalLayoutMain->setContentsMargins(60, 60, 60, 60);
95 contentWidget =
new QWidget(bgWidget);
96 contentWidget->setObjectName(QStringLiteral(
"contentWidget"));
97 contentWidget->setStyleSheet(QStringLiteral(
"#contentWidget { background: white; border-radius: 6px; }"));
98 verticalLayout_3 =
new QVBoxLayout(contentWidget);
99 verticalLayout_3->setSpacing(0);
100 verticalLayout_3->setObjectName(QStringLiteral(
"verticalLayout_3"));
101 verticalLayout_3->setContentsMargins(20, 10, 20, 10);
102 stackedWidget =
new QStackedWidget(contentWidget);
103 stackedWidget->setObjectName(QStringLiteral(
"stackedWidget"));
104 page =
new QWidget();
105 page->setObjectName(QStringLiteral(
"page"));
106 verticalLayout_2 =
new QVBoxLayout(page);
107 verticalLayout_2->setSpacing(0);
108 verticalLayout_2->setObjectName(QStringLiteral(
"verticalLayout_2"));
109 verticalLayout_2->setContentsMargins(0, 0, 0, 0);
110 horizontalLayoutIconText =
new QHBoxLayout();
111 horizontalLayoutIconText->setSpacing(20);
112 horizontalLayoutIconText->setObjectName(QStringLiteral(
"horizontalLayoutIconText"));
113 horizontalLayoutIconText->setContentsMargins(-1, 20, -1, -1);
114 verticalLayoutIcon =
new QVBoxLayout();
115 verticalLayoutIcon->setObjectName(QStringLiteral(
"verticalLayoutIcon"));
116 warningIcon =
new QPushButton(page);
117 warningIcon->setObjectName(QStringLiteral(
"warningIcon"));
118 warningIcon->setEnabled(
false);
120 icon.addFile(QStringLiteral(
":/icons/warning"), QSize(), QIcon::Normal, QIcon::Off);
121 icon.addFile(QStringLiteral(
":/icons/warning"), QSize(), QIcon::Disabled, QIcon::Off);
122 warningIcon->setIcon(icon);
123 warningIcon->setIconSize(QSize(48, 48));
124 warningIcon->setFlat(
true);
126 verticalLayoutIcon->addWidget(warningIcon);
128 verticalSpacerWarningIcon =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
130 verticalLayoutIcon->addItem(verticalSpacerWarningIcon);
133 horizontalLayoutIconText->addLayout(verticalLayoutIcon);
135 verticalLayoutInfoText =
new QVBoxLayout();
136 verticalLayoutInfoText->setObjectName(QStringLiteral(
"verticalLayoutInfoText"));
137 verticalLayoutInfoText->setContentsMargins(0, 0, -1, -1);
138 infoText =
new QLabel(page);
139 infoText->setObjectName(QStringLiteral(
"infoText"));
140 infoText->setTextFormat(Qt::RichText);
141 infoText->setWordWrap(
true);
143 verticalLayoutInfoText->addWidget(infoText);
145 infoTextStrong =
new QLabel(page);
146 infoTextStrong->setObjectName(QStringLiteral(
"infoTextStrong"));
150 infoTextStrong->setFont(font);
151 infoTextStrong->setTextFormat(Qt::RichText);
152 infoTextStrong->setWordWrap(
true);
154 verticalLayoutInfoText->addWidget(infoTextStrong);
156 verticalSpacerInTextSpace =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
158 verticalLayoutInfoText->addItem(verticalSpacerInTextSpace);
161 horizontalLayoutIconText->addLayout(verticalLayoutInfoText);
163 horizontalLayoutIconText->setStretch(1, 1);
165 verticalLayout_2->addLayout(horizontalLayoutIconText);
167 formLayout =
new QFormLayout();
168 formLayout->setObjectName(QStringLiteral(
"formLayout"));
169 formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
170 formLayout->setHorizontalSpacing(20);
171 formLayout->setVerticalSpacing(6);
172 formLayout->setContentsMargins(-1, 10, -1, -1);
173 labelNumberOfBlocksLeft =
new QLabel(page);
174 labelNumberOfBlocksLeft->setObjectName(QStringLiteral(
"labelNumberOfBlocksLeft"));
176 font1.setBold(
false);
178 labelNumberOfBlocksLeft->setFont(font1);
180 formLayout->setWidget(0, QFormLayout::LabelRole, labelNumberOfBlocksLeft);
182 numberOfBlocksLeft =
new QLabel(page);
183 numberOfBlocksLeft->setObjectName(QStringLiteral(
"numberOfBlocksLeft"));
184 QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
185 sizePolicy.setHorizontalStretch(0);
186 sizePolicy.setVerticalStretch(0);
187 sizePolicy.setHeightForWidth(numberOfBlocksLeft->sizePolicy().hasHeightForWidth());
188 numberOfBlocksLeft->setSizePolicy(sizePolicy);
190 formLayout->setWidget(0, QFormLayout::FieldRole, numberOfBlocksLeft);
192 labelLastBlockTime =
new QLabel(page);
193 labelLastBlockTime->setObjectName(QStringLiteral(
"labelLastBlockTime"));
194 labelLastBlockTime->setFont(font1);
196 formLayout->setWidget(1, QFormLayout::LabelRole, labelLastBlockTime);
198 newestBlockDate =
new QLabel(page);
199 newestBlockDate->setObjectName(QStringLiteral(
"newestBlockDate"));
200 sizePolicy.setHeightForWidth(newestBlockDate->sizePolicy().hasHeightForWidth());
201 newestBlockDate->setSizePolicy(sizePolicy);
203 formLayout->setWidget(1, QFormLayout::FieldRole, newestBlockDate);
205 labelSyncDone =
new QLabel(page);
206 labelSyncDone->setObjectName(QStringLiteral(
"labelSyncDone"));
207 labelSyncDone->setFont(font1);
209 formLayout->setWidget(2, QFormLayout::LabelRole, labelSyncDone);
211 horizontalLayoutSync =
new QHBoxLayout();
212 horizontalLayoutSync->setObjectName(QStringLiteral(
"horizontalLayoutSync"));
213 percentageProgress =
new QLabel(page);
214 percentageProgress->setObjectName(QStringLiteral(
"percentageProgress"));
215 percentageProgress->setText(QStringLiteral(
"~"));
217 horizontalLayoutSync->addWidget(percentageProgress);
219 progressBar =
new QProgressBar(page);
220 progressBar->setObjectName(QStringLiteral(
"progressBar"));
221 progressBar->setValue(24);
223 horizontalLayoutSync->addWidget(progressBar);
225 horizontalLayoutSync->setStretch(1, 1);
227 formLayout->setLayout(2, QFormLayout::FieldRole, horizontalLayoutSync);
229 labelProgressIncrease =
new QLabel(page);
230 labelProgressIncrease->setObjectName(QStringLiteral(
"labelProgressIncrease"));
231 labelProgressIncrease->setFont(font1);
233 formLayout->setWidget(4, QFormLayout::LabelRole, labelProgressIncrease);
235 progressIncreasePerH =
new QLabel(page);
236 progressIncreasePerH->setObjectName(QStringLiteral(
"progressIncreasePerH"));
237 sizePolicy.setHeightForWidth(progressIncreasePerH->sizePolicy().hasHeightForWidth());
238 progressIncreasePerH->setSizePolicy(sizePolicy);
240 formLayout->setWidget(4, QFormLayout::FieldRole, progressIncreasePerH);
242 labelEstimatedTimeLeft =
new QLabel(page);
243 labelEstimatedTimeLeft->setObjectName(QStringLiteral(
"labelEstimatedTimeLeft"));
244 labelEstimatedTimeLeft->setFont(font1);
246 formLayout->setWidget(5, QFormLayout::LabelRole, labelEstimatedTimeLeft);
248 expectedTimeLeft =
new QLabel(page);
249 expectedTimeLeft->setObjectName(QStringLiteral(
"expectedTimeLeft"));
250 sizePolicy.setHeightForWidth(expectedTimeLeft->sizePolicy().hasHeightForWidth());
251 expectedTimeLeft->setSizePolicy(sizePolicy);
253 formLayout->setWidget(5, QFormLayout::FieldRole, expectedTimeLeft);
256 verticalLayout_2->addLayout(formLayout);
258 stackedWidget->addWidget(page);
259 page_2 =
new QWidget();
260 page_2->setObjectName(QStringLiteral(
"page_2"));
261 verticalLayout_4 =
new QVBoxLayout(page_2);
262 verticalLayout_4->setSpacing(15);
263 verticalLayout_4->setObjectName(QStringLiteral(
"verticalLayout_4"));
264 verticalLayout_4->setContentsMargins(-1, 40, -1, 40);
265 horizontalLayout_2 =
new QHBoxLayout();
266 horizontalLayout_2->setObjectName(QStringLiteral(
"horizontalLayout_2"));
267 horizontalSpacer_4 =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
269 horizontalLayout_2->addItem(horizontalSpacer_4);
271 warningIconBackup =
new QPushButton(page_2);
272 warningIconBackup->setObjectName(QStringLiteral(
"warningIconBackup"));
273 warningIconBackup->setEnabled(
false);
275 icon1.addFile(QStringLiteral(
":/styles/app-icons/message_warning"), QSize(), QIcon::Normal, QIcon::Off);
276 icon1.addFile(QStringLiteral(
":/styles/app-icons/message_warning"), QSize(), QIcon::Disabled, QIcon::Off);
277 warningIconBackup->setIcon(icon1);
278 warningIconBackup->setIconSize(QSize(120, 120));
279 warningIconBackup->setFlat(
true);
281 horizontalLayout_2->addWidget(warningIconBackup);
283 horizontalSpacer_5 =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
285 horizontalLayout_2->addItem(horizontalSpacer_5);
288 verticalLayout_4->addLayout(horizontalLayout_2);
290 labelNote =
new QLabel(page_2);
291 labelNote->setObjectName(QStringLiteral(
"labelNote"));
292 labelNote->setAlignment(Qt::AlignCenter);
294 verticalLayout_4->addWidget(labelNote);
296 labelMessage =
new QLabel(page_2);
297 labelMessage->setObjectName(QStringLiteral(
"labelMessage"));
298 labelMessage->setAlignment(Qt::AlignCenter);
299 labelMessage->setWordWrap(
true);
301 verticalLayout_4->addWidget(labelMessage);
303 verticalSpacer =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
305 verticalLayout_4->addItem(verticalSpacer);
307 horizontalLayout =
new QHBoxLayout();
308 horizontalLayout->setObjectName(QStringLiteral(
"horizontalLayout"));
309 horizontalSpacer_2 =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
311 horizontalLayout->addItem(horizontalSpacer_2);
313 walletBackupButton =
new QPushButton(page_2);
314 walletBackupButton->setObjectName(QStringLiteral(
"walletBackupButton"));
316 horizontalLayout->addWidget(walletBackupButton);
318 horizontalSpacer_3 =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
320 horizontalLayout->addItem(horizontalSpacer_3);
323 verticalLayout_4->addLayout(horizontalLayout);
325 stackedWidget->addWidget(page_2);
327 verticalLayout_3->addWidget(stackedWidget);
329 verticalSpacerAfterText =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
331 verticalLayout_3->addItem(verticalSpacerAfterText);
333 horizontalLayoutButtons =
new QHBoxLayout();
334 horizontalLayoutButtons->setObjectName(QStringLiteral(
"horizontalLayoutButtons"));
335 horizontalLayoutButtons->setContentsMargins(10, 10, -1, -1);
336 horizontalSpacer =
new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
338 horizontalLayoutButtons->addItem(horizontalSpacer);
340 closeButton =
new QPushButton(contentWidget);
341 closeButton->setObjectName(QStringLiteral(
"closeButton"));
343 horizontalLayoutButtons->addWidget(closeButton);
346 verticalLayout_3->addLayout(horizontalLayoutButtons);
348 verticalLayout_3->setStretch(0, 1);
350 verticalLayoutMain->addWidget(contentWidget);
353 verticalLayout->addWidget(bgWidget);
358 stackedWidget->setCurrentIndex(0);
361 QMetaObject::connectSlotsByName(ModalOverlay);
366 ModalOverlay->setWindowTitle(QApplication::translate(
"ModalOverlay",
"Form", 0));
367 warningIcon->setText(QString());
368 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 fabcoin network, as detailed below.", 0));
369 infoTextStrong->setText(QApplication::translate(
"ModalOverlay",
"Attempting to spend fabcoins that are affected by not-yet-displayed transactions will not be accepted by the network.", 0));
370 labelNumberOfBlocksLeft->setText(QApplication::translate(
"ModalOverlay",
"Number of blocks left", 0));
371 numberOfBlocksLeft->setText(QApplication::translate(
"ModalOverlay",
"Unknown...", 0));
372 labelLastBlockTime->setText(QApplication::translate(
"ModalOverlay",
"Last block time", 0));
373 newestBlockDate->setText(QApplication::translate(
"ModalOverlay",
"Unknown...", 0));
374 labelSyncDone->setText(QApplication::translate(
"ModalOverlay",
"Progress", 0));
375 progressBar->setFormat(QString());
376 labelProgressIncrease->setText(QApplication::translate(
"ModalOverlay",
"Progress increase per hour", 0));
377 progressIncreasePerH->setText(QApplication::translate(
"ModalOverlay",
"calculating...", 0));
378 labelEstimatedTimeLeft->setText(QApplication::translate(
"ModalOverlay",
"Estimated time left until synced", 0));
379 expectedTimeLeft->setText(QApplication::translate(
"ModalOverlay",
"calculating...", 0));
380 warningIconBackup->setText(QString());
381 labelNote->setText(QApplication::translate(
"ModalOverlay",
"IMPORATANT NOTE!", 0));
382 labelMessage->setText(QApplication::translate(
"ModalOverlay",
"Making a backup of your wallet helps ensure you can always maintain access to your funds. Please backup your wallet in order to avoid losing funds.", 0));
383 walletBackupButton->setText(QApplication::translate(
"ModalOverlay",
"Wallet backup", 0));
384 closeButton->setText(QApplication::translate(
"ModalOverlay",
"Hide", 0));
395 #endif // UI_MODALOVERLAY_H QLabel * percentageProgress
QSpacerItem * verticalSpacer
QSpacerItem * verticalSpacerWarningIcon
QVBoxLayout * verticalLayoutMain
QPushButton * warningIcon
QProgressBar * progressBar
QHBoxLayout * horizontalLayoutSync
QVBoxLayout * verticalLayoutInfoText
QVBoxLayout * verticalLayout_3
QVBoxLayout * verticalLayout_4
void retranslateUi(ModalOverlay *ModalOverlay)
QHBoxLayout * horizontalLayoutIconText
Modal overlay to display information about the chain-sync state.
QLabel * expectedTimeLeft
QHBoxLayout * horizontalLayout_2
QLabel * labelLastBlockTime
void setupUi(ModalOverlay *ModalOverlay)
QLabel * labelProgressIncrease
QLabel * progressIncreasePerH
QSpacerItem * verticalSpacerAfterText
QSpacerItem * verticalSpacerInTextSpace
QStackedWidget * stackedWidget
QPushButton * warningIconBackup
QLabel * numberOfBlocksLeft
QSpacerItem * horizontalSpacer_5
QHBoxLayout * horizontalLayoutButtons
QVBoxLayout * verticalLayoutIcon
QSpacerItem * horizontalSpacer_2
QLabel * labelEstimatedTimeLeft
QPushButton * closeButton
QSpacerItem * horizontalSpacer_4
QVBoxLayout * verticalLayout_2
QSpacerItem * horizontalSpacer
QVBoxLayout * verticalLayout
QLabel * labelNumberOfBlocksLeft
QSpacerItem * horizontalSpacer_3
QPushButton * walletBackupButton
QHBoxLayout * horizontalLayout