-
Notifications
You must be signed in to change notification settings - Fork 0
/
fangyuandialog.cpp
44 lines (40 loc) · 1.34 KB
/
fangyuandialog.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
#include "fangyuandialog.h"
#include <QtCore/QDebug>
#include "dbconnect.h"
FangyuanDialog::FangyuanDialog(QWidget *parent, DBConnect *dbcon)
:QDialog(parent)
{
setupUi(this);
this->dbcon = dbcon;
this->fangwuLaiyuanComboBox->addItems(*(this->dbcon->fangkeLaiyuanList()));
this->zhiyeGuwenComboBox->addItems(*(this->dbcon->loginNames()));
this->suozaiChengquComboBox->addItems(*(this->dbcon->chengquList()));
this->dangqianZhuangtaiComboBox->addItems(*(this->dbcon->fangwuZhuangtaiList()));
asChushouChuzu();
}
FangyuanDialog::~FangyuanDialog()
{
}
void FangyuanDialog::on_fangwuLeixingComboBox_currentIndexChanged(const QString &text)
{
qDebug() << text;
if(text==tr("合租"))
asHezu();
else
asChushouChuzu();
}
void FangyuanDialog::asChushouChuzu()
{
this->chanquanXingBieLabel->setText(tr("产权"));
this->chanquanXingbieComboBox->clear();
this->chanquanXingbieComboBox->addItem(tr("产权"));
this->chanquanXingbieComboBox->addItem(tr("使用权"));
}
void FangyuanDialog::asHezu()
{
this->chanquanXingBieLabel->setText(tr("性别倾向"));
this->chanquanXingbieComboBox->clear();
this->chanquanXingbieComboBox->addItem(tr("与男士合租"));
this->chanquanXingbieComboBox->addItem(tr("与女士合租"));
this->chanquanXingbieComboBox->addItem(tr("无要求"));
}