コード例 #1
0
ファイル: logicperson.cpp プロジェクト: hadesjaky/RiskKiller
void LogicPerson::setData(const QString fieldName, QString value)
{
    if(fieldName == "level")
    {
        pushLevel(value);
    }
    else if(fieldName == "customer_no" or fieldName == "customerNO")
    {
        setCustomerNO(value);
    }
    else if(fieldName == "card_no" or fieldName == "cardNO")
    {
        addCardNO(value);
    }
    else if(fieldName == "email")
    {
        addEmail(value);
    }
    else if(fieldName == "id")
    {
        setId(value);
    }

    else if(fieldName == "name")
    {
        setName(value);
    }
    else if(fieldName == "mobile")
    {
        addMobile(value);
    }
    //jaky,email重复,以删除,问题:tel和mobile是不是应该归一组
    else if(fieldName == "tel")
    {
        addMobile(value);
    }
}
コード例 #2
0
ファイル: lairtool.cpp プロジェクト: Mesagoppinmypants/Tools
LairTool::LairTool(QWidget *parent) : QDialog(parent), ui(new Ui::LairTool) {
    ui->setupUi(this);

    currentTemplate = NULL;

    nameMobileForm = new NewLairMobile(this);
    nameBuildingForm = new LairName(this);

    connect(ui->pushButton_addMobile, SIGNAL(clicked()), nameMobileForm, SLOT(show()));
    connect(ui->pushButton_AddBuilding, SIGNAL(clicked()), nameBuildingForm, SLOT(show()));
    connect(nameMobileForm, SIGNAL(accepted()), this, SLOT(addMobile()));
    connect(nameBuildingForm, SIGNAL(accepted()), this, SLOT(addBuilding()));
    connect(ui->pushButton_RemoveBuilding, SIGNAL(clicked()), this, SLOT(removeBuilding()));
    connect(ui->pushButton_removeMobile, SIGNAL(clicked()), this, SLOT(removeMobile()));
    connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(commitToTemplate()));
    connect(ui->pushButton_view3d, SIGNAL(clicked()), this, SLOT(view3d()));

    this->setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint);
}