Release 1.6 WIP
This commit is contained in:
parent
f9affb083b
commit
a5e9cea22f
29 changed files with 2046 additions and 136 deletions
30
client/ui/server_widget.cpp
Normal file
30
client/ui/server_widget.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "server_widget.h"
|
||||
#include "ui_server_widget.h"
|
||||
|
||||
#include "settings.h"
|
||||
|
||||
ServerWidget::ServerWidget(const QJsonObject &server, bool isDefault, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::ServerWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QString desc = server.value(Settings::descriptionString).toString();
|
||||
QString address = server.value(Settings::hostNameString).toString();
|
||||
|
||||
ui->label_address->setText(address);
|
||||
|
||||
if (desc.isEmpty()) {
|
||||
ui->label_description->setText(address);
|
||||
}
|
||||
else {
|
||||
ui->label_description->setText(desc);
|
||||
}
|
||||
|
||||
ui->pushButton_default->setChecked(isDefault);
|
||||
ui->pushButton_default->setDisabled(isDefault);
|
||||
}
|
||||
|
||||
ServerWidget::~ServerWidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue