MCPcopy Create free account
hub / github.com/RGAA-Software/GoDesk / TabServerStatus

Method TabServerStatus

src/render_panel/ui/tab_server_status.cpp:53–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 TabServerStatus::TabServerStatus(const std::shared_ptr<GrApplication>& app, QWidget *parent) : TabBase(app, parent) {
54 auto content_root = new NoMarginHLayout();
55
56 // LEFT
57 auto label_width = 195;
58 int margin_left = 20;
59 {
60 auto layout = new NoMarginVLayout();
61 // title margin
62 layout->addSpacing(kTabContentMarginTop);
63
64 content_root->addLayout(layout);
65 // Server Status
66 {
67 auto item_layout = new NoMarginHLayout();
68 auto title = new TcLabel(this);
69 title->SetTextId("id_server_status");
70 title->setAlignment(Qt::AlignLeft);
71 title->setStyleSheet(R"(font-size: 22px; font-weight:700;)");
72 item_layout->addSpacing(margin_left + 9);
73 item_layout->addWidget(title);
74 item_layout->addStretch();
75 layout->addLayout(item_layout);
76 layout->addSpacing(8);
77 }
78
79 // driver status
80 {
81 auto item_layout = new NoMarginHLayout();
82 item_layout->addSpacing(margin_left);
83 auto icon = new TcLabel(this);
84 icon->setFixedSize(38, 38);
85 icon->setStyleSheet(GetItemIconStyleSheet(":/icons/ic_game_controller.svg"));
86 item_layout->addWidget(icon);
87
88 auto label = new TcLabel(this);
89 label->setFixedSize(label_width, 40);
90 label->SetTextId("id_joystick_driver");
91 label->setStyleSheet("font-size: 14px;");
92 item_layout->addWidget(label);
93
94 auto status = new TcLabel(this);
95 lbl_vigem_state_ = status;
96 status->setAlignment(Qt::AlignCenter);
97 status->setFixedSize(80, 26);
98 status->setText("OK");
99 item_layout->addWidget(status);
100
101 auto btn_install = new TcPushButton(this);
102 btn_install->setFixedSize(80, 28);
103 btn_install->SetTextId("id_install");
104 item_layout->addSpacing(40);
105 item_layout->addWidget(btn_install);
106
107 auto btn_remove = new TcPushButton(this);
108 btn_remove->hide();
109 btn_remove->setFixedSize(80, 28);
110 btn_remove->SetTextId("id_remove");

Callers

nothing calls this directly

Calls 15

RefreshVigemStateMethod · 0.95
RefreshServerStateMethod · 0.95
RefreshServiceStateMethod · 0.95
RefreshUIEverySecondMethod · 0.95
to_stringFunction · 0.85
InstallMethod · 0.80
GetServiceManagerMethod · 0.80
GetIpsMethod · 0.80
GetPanelServerPortMethod · 0.80
GetRenderServerPortMethod · 0.80
GetRunGameManagerMethod · 0.80
GetRunningGamesMethod · 0.80

Tested by

no test coverage detected