Exemple #1
0
void urinalysis::initConnect()
{
    //从串口获取数据
    connect(m_port, SIGNAL(dataInfo(float,float)), this, SLOT(getPortData(float,float)));

    //给ARC赋值
    connect(ui->ALBLineEdit, SIGNAL(textChanged(QString)), this, SLOT(setARC(QString)));
    connect(ui->CRELineEdit, SIGNAL(textChanged(QString)), this, SLOT(setARC(QString)));

    //清除
    connect(ui->clearPushButton, SIGNAL(clicked()), this, SLOT(clearForms()));

    //查询
    connect(ui->searchButton, SIGNAL(clicked()), this, SLOT(fillTableWidget()));

    //保存数据
    connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(saveData()));

    //显示tablewidget内容
    connect(ui->tableWidget, SIGNAL(cellDoubleClicked(int,int)), this, SLOT(setForms(int,int)));

    //关闭窗口
    connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(close()));

    //删除数据
    connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteData()));

    //打印
    connect(ui->printButton, SIGNAL(clicked()), this, SLOT(print()));
}
void DatabaseOpenWidget::hideEvent(QHideEvent* event)
{
    DialogyWidget::hideEvent(event);

#ifdef WITH_XC_YUBIKEY
    // Don't listen to any Yubikey events if we are hidden
    disconnect(YubiKey::instance(), nullptr, this, nullptr);
    m_yubiKeyBeingPolled = false;
#endif

    if (isVisible()) {
        return;
    }

    clearForms();
}
Exemple #3
0
urinalysis::urinalysis(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::urinalysis)
{
    ui->setupUi(this);

    //初始化
    init();

    //初始化表单
    clearForms();

    //初始化信号槽
    initConnect();

    //查询所有数据
    selectAllInfo();

    //填充tablewidget
    fillTableWidget();
}
Exemple #4
0
void FormBar::itemSelectionChanged() {
    emit clearForms();
    for(auto&& item: m_treewidget->selectedItems()) {
        emit enableForm(item->text(0));
    }
}