-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdatabasedialog.cpp
55 lines (48 loc) · 1.27 KB
/
databasedialog.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "databasedialog.h"
#include "ui_databasedialog.h"
#include "confighelper.h"
DatabaseDialog::DatabaseDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::DatabaseDialog)
{
ui->setupUi(this);
}
DatabaseDialog::~DatabaseDialog()
{
delete ui;
}
void DatabaseDialog::changeEvent(QEvent *e)
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
void DatabaseDialog::SetDatabaseNames(QMap<QString, QString>* names)
{
ConfigHelper::MapToFormLayout(names, ui->formLayout);
}
QMap<QString, QString>* DatabaseDialog::GetDatabaseNames()
{
QMap<QString, QString>* names = ConfigHelper::FormLayoutToMap(ui->formLayout);
return names;
}
void DatabaseDialog::SetDefaults()
{
ui->lineEditSimulatorDBName->setText("OpenSim");
ui->lineEditAssetServiceDBName->setText("grid");
ui->lineEditInventoryService->setText("grid");
ui->lineEditGridService->setText("opensim");
ui->lineEditUserService->setText("grid");
ui->lineEditMessagingService->setText("grid");
ui->lineEditNHibernate->setText("TaigaWebdav");
ui->lineEditModrexDb->setText("os_modrex");
}
void DatabaseDialog::on_pushButtonDefaults_clicked()
{
SetDefaults();
}