mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
feat: add mathModel use
This commit is contained in:
@@ -10,9 +10,9 @@ EntryWidget::EntryWidget(QWidget *parent) :
|
||||
|
||||
void EntryWidget::initialize(MainWindow *mainWindow)
|
||||
{
|
||||
ui->settingsWidget->hide();
|
||||
ui->offlineWidget->hide();
|
||||
ui->loginWidget->hide();
|
||||
ui->settingsWidget->hide();
|
||||
this->mainWindow = mainWindow;
|
||||
|
||||
}
|
||||
@@ -22,12 +22,10 @@ void EntryWidget::connectionEmptyState()
|
||||
show();
|
||||
ui->offlineWidget->show();
|
||||
ui->loginWidget->hide();
|
||||
ui->settingsWidget->hide();
|
||||
}
|
||||
|
||||
void EntryWidget::settingsState()
|
||||
{
|
||||
ui->settingsWidget->show();
|
||||
ui->loginWidget->hide();
|
||||
ui->offlineWidget->hide();
|
||||
}
|
||||
@@ -48,36 +46,16 @@ ClientAutorization* EntryWidget::getAuthData()
|
||||
return data;
|
||||
}
|
||||
|
||||
ServerSettings *EntryWidget::getServerSettings()
|
||||
{
|
||||
ServerSettings *data = new ServerSettings;
|
||||
QString server = ui->serverInputField->text();
|
||||
QString port = ui->portInputField->text();
|
||||
|
||||
data->Address = server;
|
||||
data->Port = port;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void EntryWidget::loginIsActive(bool flag)
|
||||
{
|
||||
if(flag) ui->loginWidget->show();
|
||||
if(flag)
|
||||
{
|
||||
ui->loginWidget->show();
|
||||
ui->offlineWidget->hide();
|
||||
}
|
||||
else ui->loginWidget->hide();
|
||||
}
|
||||
|
||||
void EntryWidget::settingsWidgetIsActive(bool flag)
|
||||
{
|
||||
if(flag) ui->settingsWidget->show();
|
||||
else ui->settingsWidget->hide();
|
||||
}
|
||||
|
||||
void EntryWidget::fillSettings(ServerSettings *settings)
|
||||
{
|
||||
ui->serverInputField->setText(settings->Address);
|
||||
ui->portInputField->setText(settings->Port);
|
||||
}
|
||||
|
||||
void EntryWidget::on_loginButton_clicked()
|
||||
{
|
||||
mainWindow->login();
|
||||
@@ -88,6 +66,34 @@ void EntryWidget::on_saveServerButton_clicked()
|
||||
mainWindow->saveServerSettingsWithConnect();
|
||||
}
|
||||
|
||||
ServerSettings *EntryWidget::getServerSettings()
|
||||
{
|
||||
ServerSettings *data = new ServerSettings;
|
||||
QString server = ui->serverInputField->text();
|
||||
QString port = ui->portInputField->text();
|
||||
//bool checked = ui->mathModelUsecheckBox->isChecked();
|
||||
|
||||
data->Address = server;
|
||||
data->Port = port;
|
||||
data->mathModelUse = true;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
void EntryWidget::fillSettings(ServerSettings *settings)
|
||||
{
|
||||
ui->serverInputField->setText(settings->Address);
|
||||
ui->portInputField->setText(settings->Port);
|
||||
//ui->mathModelUsecheckBox->setChecked(settings->mathModelUse);
|
||||
}
|
||||
|
||||
void EntryWidget::isActive(bool flag)
|
||||
{
|
||||
if (flag) ui->settingsWidget->show();
|
||||
else ui->settingsWidget->hide();
|
||||
}
|
||||
|
||||
|
||||
EntryWidget::~EntryWidget()
|
||||
{
|
||||
delete ui;
|
||||
@@ -95,3 +101,4 @@ EntryWidget::~EntryWidget()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user