|
@@ -16,6 +16,8 @@ StatusWidget::StatusWidget(QSettings* settings, PatchDownloader* patch_downloade
|
|
{
|
|
{
|
|
|
|
|
|
ui->setupUi(this);
|
|
ui->setupUi(this);
|
|
|
|
+ ui->server_status_widget->setupUpdater(settings->value("Network/game_servers_status", "http://translate.lotros.ru/servers.txt").toUrl(),
|
|
|
|
+ settings->value("Network/game_servers_message", "http://translate.lotros.ru/profmessage.txt").toUrl());
|
|
last_progress_update_time.start();
|
|
last_progress_update_time.start();
|
|
|
|
|
|
connect(patch_updater, &PatchDownloader::checkForUpdatesStarted, this, &StatusWidget::onPatchDownloaderStarted, Qt::QueuedConnection);
|
|
connect(patch_updater, &PatchDownloader::checkForUpdatesStarted, this, &StatusWidget::onPatchDownloaderStarted, Qt::QueuedConnection);
|
|
@@ -30,20 +32,27 @@ StatusWidget::StatusWidget(QSettings* settings, PatchDownloader* patch_downloade
|
|
connect(ui->news_list, &NewsListWidget::showHelpToolTip, this, &StatusWidget::setToolTipToNewsHelp);
|
|
connect(ui->news_list, &NewsListWidget::showHelpToolTip, this, &StatusWidget::setToolTipToNewsHelp);
|
|
connect(ui->news_list, &NewsListWidget::showNoToolTip, this, &StatusWidget::resetToolTip);
|
|
connect(ui->news_list, &NewsListWidget::showNoToolTip, this, &StatusWidget::resetToolTip);
|
|
|
|
|
|
|
|
+ connect(ui->server_status_widget, &ServerStatusWidget::updateServersTooltip, ui->server_status_tooltip, &QLabel::setText);
|
|
|
|
+ connect(ui->server_status_widget, &ServerStatusWidget::showServersTooltip, this, &StatusWidget::setToolTipToServersStatus);
|
|
|
|
+ connect(ui->server_status_widget, &ServerStatusWidget::showNoTooltip, this, &StatusWidget::resetToolTip);
|
|
|
|
+
|
|
tooltip_effects[ui->news_tooltip->objectName()] = new QGraphicsOpacityEffect(ui->news_tooltip);
|
|
tooltip_effects[ui->news_tooltip->objectName()] = new QGraphicsOpacityEffect(ui->news_tooltip);
|
|
tooltip_effects[ui->weekly_code_tooltip_1->objectName()] = new QGraphicsOpacityEffect(ui->weekly_code_tooltip_1);
|
|
tooltip_effects[ui->weekly_code_tooltip_1->objectName()] = new QGraphicsOpacityEffect(ui->weekly_code_tooltip_1);
|
|
tooltip_effects[ui->weekly_code_tooltip_2->objectName()] = new QGraphicsOpacityEffect(ui->weekly_code_tooltip_2);
|
|
tooltip_effects[ui->weekly_code_tooltip_2->objectName()] = new QGraphicsOpacityEffect(ui->weekly_code_tooltip_2);
|
|
tooltip_effects[ui->patches_status->objectName()] = new QGraphicsOpacityEffect(ui->patches_status);
|
|
tooltip_effects[ui->patches_status->objectName()] = new QGraphicsOpacityEffect(ui->patches_status);
|
|
|
|
+ tooltip_effects[ui->server_status_tooltip->objectName()] = new QGraphicsOpacityEffect(ui->server_status_tooltip);
|
|
|
|
|
|
tooltip_animations[ui->news_tooltip->objectName()] = new QPropertyAnimation(tooltip_effects[ui->news_tooltip->objectName()], "opacity");
|
|
tooltip_animations[ui->news_tooltip->objectName()] = new QPropertyAnimation(tooltip_effects[ui->news_tooltip->objectName()], "opacity");
|
|
tooltip_animations[ui->weekly_code_tooltip_1->objectName()] = new QPropertyAnimation(tooltip_effects[ui->weekly_code_tooltip_1->objectName()], "opacity");
|
|
tooltip_animations[ui->weekly_code_tooltip_1->objectName()] = new QPropertyAnimation(tooltip_effects[ui->weekly_code_tooltip_1->objectName()], "opacity");
|
|
tooltip_animations[ui->weekly_code_tooltip_2->objectName()] = new QPropertyAnimation(tooltip_effects[ui->weekly_code_tooltip_2->objectName()], "opacity");
|
|
tooltip_animations[ui->weekly_code_tooltip_2->objectName()] = new QPropertyAnimation(tooltip_effects[ui->weekly_code_tooltip_2->objectName()], "opacity");
|
|
tooltip_animations[ui->patches_status->objectName()] = new QPropertyAnimation(tooltip_effects[ui->patches_status->objectName()], "opacity");
|
|
tooltip_animations[ui->patches_status->objectName()] = new QPropertyAnimation(tooltip_effects[ui->patches_status->objectName()], "opacity");
|
|
|
|
+ tooltip_animations[ui->server_status_tooltip->objectName()] = new QPropertyAnimation(tooltip_effects[ui->server_status_tooltip->objectName()], "opacity");
|
|
|
|
|
|
ui->news_tooltip->setGraphicsEffect(tooltip_effects[ui->news_tooltip->objectName()]);
|
|
ui->news_tooltip->setGraphicsEffect(tooltip_effects[ui->news_tooltip->objectName()]);
|
|
ui->weekly_code_tooltip_1->setGraphicsEffect(tooltip_effects[ui->weekly_code_tooltip_1->objectName()]);
|
|
ui->weekly_code_tooltip_1->setGraphicsEffect(tooltip_effects[ui->weekly_code_tooltip_1->objectName()]);
|
|
ui->weekly_code_tooltip_2->setGraphicsEffect(tooltip_effects[ui->weekly_code_tooltip_2->objectName()]);
|
|
ui->weekly_code_tooltip_2->setGraphicsEffect(tooltip_effects[ui->weekly_code_tooltip_2->objectName()]);
|
|
ui->patches_status->setGraphicsEffect(tooltip_effects[ui->patches_status->objectName()]);
|
|
ui->patches_status->setGraphicsEffect(tooltip_effects[ui->patches_status->objectName()]);
|
|
|
|
+ ui->server_status_tooltip->setGraphicsEffect(tooltip_effects[ui->server_status_tooltip->objectName()]);
|
|
|
|
|
|
foreach (QPropertyAnimation* animation, tooltip_animations) {
|
|
foreach (QPropertyAnimation* animation, tooltip_animations) {
|
|
animation->setDuration(250);
|
|
animation->setDuration(250);
|
|
@@ -79,7 +88,6 @@ void StatusWidget::updateFontsSizes()
|
|
ui->progress_label->setFont(crimson_10pt);
|
|
ui->progress_label->setFont(crimson_10pt);
|
|
ui->game_button->setFont(trajan_11pt);
|
|
ui->game_button->setFont(trajan_11pt);
|
|
ui->news_label->setFont(trajan_10pt);
|
|
ui->news_label->setFont(trajan_10pt);
|
|
- ui->news_tooltip->setFont(garamond_10pt);
|
|
|
|
|
|
|
|
ui->images_label->setFont(crimson_11pt);
|
|
ui->images_label->setFont(crimson_11pt);
|
|
ui->images_status->setFont(crimson_11pt);
|
|
ui->images_status->setFont(crimson_11pt);
|
|
@@ -90,8 +98,10 @@ void StatusWidget::updateFontsSizes()
|
|
ui->videos_label->setFont(crimson_11pt);
|
|
ui->videos_label->setFont(crimson_11pt);
|
|
ui->videos_status->setFont(crimson_11pt);
|
|
ui->videos_status->setFont(crimson_11pt);
|
|
|
|
|
|
|
|
+ ui->news_tooltip->setFont(garamond_10pt);
|
|
ui->weekly_code_tooltip_1->setFont(garamond_10pt);
|
|
ui->weekly_code_tooltip_1->setFont(garamond_10pt);
|
|
ui->weekly_code_tooltip_2->setFont(garamond_10pt);
|
|
ui->weekly_code_tooltip_2->setFont(garamond_10pt);
|
|
|
|
+ ui->server_status_tooltip->setFont(crimson_14pt);
|
|
}
|
|
}
|
|
|
|
|
|
void StatusWidget::resizeEvent(QResizeEvent *event)
|
|
void StatusWidget::resizeEvent(QResizeEvent *event)
|
|
@@ -120,6 +130,8 @@ void StatusWidget::resizeEvent(QResizeEvent *event)
|
|
ui->weekly_code_tooltip_1->resize(QSize(365, 114) * coefficient);
|
|
ui->weekly_code_tooltip_1->resize(QSize(365, 114) * coefficient);
|
|
ui->weekly_code_tooltip_2->move(QPoint(38, 13) * coefficient);
|
|
ui->weekly_code_tooltip_2->move(QPoint(38, 13) * coefficient);
|
|
ui->weekly_code_tooltip_2->resize(QSize(365, 114) * coefficient);
|
|
ui->weekly_code_tooltip_2->resize(QSize(365, 114) * coefficient);
|
|
|
|
+ ui->server_status_tooltip->move(QPoint(38, 13) * coefficient);
|
|
|
|
+ ui->server_status_tooltip->resize(QSize(365, 114) * coefficient);
|
|
|
|
|
|
ui->patches_status->move(QPoint(38, 13) * coefficient);
|
|
ui->patches_status->move(QPoint(38, 13) * coefficient);
|
|
ui->patches_status->resize(QSize(365, 114) * coefficient);
|
|
ui->patches_status->resize(QSize(365, 114) * coefficient);
|
|
@@ -194,6 +206,11 @@ void StatusWidget::setToolTipToNewsHelp()
|
|
fadeBetweenToolTips(ui->news_tooltip);
|
|
fadeBetweenToolTips(ui->news_tooltip);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void StatusWidget::setToolTipToServersStatus()
|
|
|
|
+{
|
|
|
|
+ fadeBetweenToolTips(ui->server_status_tooltip);
|
|
|
|
+}
|
|
|
|
+
|
|
void StatusWidget::resetToolTip()
|
|
void StatusWidget::resetToolTip()
|
|
{
|
|
{
|
|
fadeBetweenToolTips(ui->patches_status);
|
|
fadeBetweenToolTips(ui->patches_status);
|