Skip to content

Commit

Permalink
Remove civstatus
Browse files Browse the repository at this point in the history
The civstatus widget was introduced as a first-gen top bar, but never reached
maturity and is now superseded. Remove it.

Closes longturn#1271.
  • Loading branch information
lmoureaux committed Aug 15, 2022
1 parent 18b2b7e commit cb7c6b2
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 203 deletions.
1 change: 0 additions & 1 deletion client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ add_library(
citydlg_common.cpp
cityrep.cpp
cityrepdata.cpp
civstatus.cpp
client_main.cpp
climap.cpp
climisc.cpp
Expand Down
140 changes: 0 additions & 140 deletions client/civstatus.cpp

This file was deleted.

36 changes: 0 additions & 36 deletions client/civstatus.h

This file was deleted.

14 changes: 0 additions & 14 deletions client/fc_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,18 +457,6 @@ void fc_client::read_settings()
} else {
qt_settings.battlelog_y = 0.0;
}
if (s.contains(QStringLiteral("civstatus_x"))) {
qt_settings.civstatus_x =
s.value(QStringLiteral("civstatus_x")).toFloat();
} else {
qt_settings.civstatus_x = 0.0;
}
if (s.contains(QStringLiteral("civstatus_y"))) {
qt_settings.civstatus_y =
s.value(QStringLiteral("civstatus_y")).toFloat();
} else {
qt_settings.civstatus_y = 0.0;
}
qt_settings.player_repo_sort_col = -1;
qt_settings.city_repo_sort_col = -1;

Expand Down Expand Up @@ -524,8 +512,6 @@ void fc_client::write_settings()
s.setValue(QStringLiteral("battlelog_scale"), qt_settings.battlelog_scale);
s.setValue(QStringLiteral("battlelog_x"), qt_settings.battlelog_x);
s.setValue(QStringLiteral("battlelog_y"), qt_settings.battlelog_y);
s.setValue(QStringLiteral("civstatus_x"), qt_settings.civstatus_x);
s.setValue(QStringLiteral("civstatus_y"), qt_settings.civstatus_y);
s.setValue(QStringLiteral("new_turn_text"),
qt_settings.show_new_turn_text);
s.setValue(QStringLiteral("show_battle_log"), qt_settings.show_battle_log);
Expand Down
2 changes: 0 additions & 2 deletions client/fc_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ struct fc_settings {
float battlelog_scale;
float battlelog_x;
float battlelog_y;
float civstatus_x;
float civstatus_y;
};

/****************************************************************************
Expand Down
8 changes: 0 additions & 8 deletions client/page_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "government.h"
#include "repodlgs_g.h"
// client
#include "civstatus.h"
#include "client_main.h"
#include "mapview_common.h"
#include "text.h"
Expand Down Expand Up @@ -154,10 +153,6 @@ pageGame::pageGame(QWidget *parent)
top_bar_wdg->addWidget(sw_indicators);
top_bar_wdg->addWidget(sw_message);

civ_status = new civstatus(mapview_wdg);
civ_status->setAttribute(Qt::WA_NoMousePropagation);
civ_status->show();

city_overlay = new city_dialog(mapview_wdg);
connect(mapview_wdg, &map_view::scale_changed, city_overlay,
&city_dialog::refresh);
Expand Down Expand Up @@ -533,9 +528,6 @@ bool fc_game_tab_widget::event(QEvent *event)
qRound(king()->qt_settings.battlelog_x * mapview.width),
qRound(king()->qt_settings.battlelog_y * mapview.height));
queen()->x_vote->move(width() / 2 - queen()->x_vote->width() / 2, 0);
queen()->civ_status->move(
qRound(king()->qt_settings.civstatus_x * mapview.width),
qRound(king()->qt_settings.civstatus_y * mapview.height));

queen()->updateSidebarTooltips();
queen()->minimap_panel->turn_done()->setEnabled(
Expand Down
2 changes: 0 additions & 2 deletions client/page_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
class city_dialog;
class fc_client;
class map_view;
class civstatus;
class minimap_panel;
class hud_units;
class indicators_widget;
Expand Down Expand Up @@ -82,7 +81,6 @@ class pageGame : public QWidget {
units_reports *units;
top_bar_widget *sw_cunit;
xvote *x_vote;
civstatus *civ_status;
top_bar_widget *sw_diplo;
indicators_widget *sw_indicators;
top_bar_widget *sw_science;
Expand Down

0 comments on commit cb7c6b2

Please sign in to comment.