void myOpenHierarchy::okay()
{
	bool error1 = false, error2 = true;
	
	int indexRow;
	for(indexRow = 0; indexRow < ui.tableWidget_qi->rowCount(); indexRow++){

		if(((QCheckBox *) ui.tableWidget_qi->cellWidget(indexRow, 2))->isChecked()){

			if(((myLineEdit *) ui.tableWidget_qi->cellWidget(indexRow, 3))->text() == ""){

				error1 = true;
			}
		}
		if(((QCheckBox *) ui.tableWidget_qi->cellWidget(indexRow, 1))->isChecked()){

			error2 = false;
		}
	}

	if(error1){

		QMessageBox::information(this, "Message", "Please choose a hierarchy file for each selected quasi-identifier.");
	}
	else if(error2){

		QMessageBox::information(this, "Message", "Please choose a sensitive attribute.");
	}
	else {

		emit signalBack(ui.tableWidget_qi);
		this->close();
	}
}
void WidgetMain::slotClickNewProject()
{
    affirmType_ = PRESSED_NEW_PROJECT;
    AffirmForm *pAffirmForm = new AffirmForm(this->rect(), this);
    connect(pAffirmForm, SIGNAL(signalBack()), this, SLOT(slotPressBack()));
    connect(pAffirmForm, SIGNAL(signalNotSave()), this, SLOT(slotPressNotSave()));
    connect(pAffirmForm, SIGNAL(signalSave()), this, SLOT(slotPressSave()));
    pAffirmForm->setAttribute(Qt::WA_DeleteOnClose);
    //this->activateWindow();
    pAffirmForm->show();
}
//关闭按钮
void WidgetMain::on_pushButtonClose_clicked()
{
    affirmType_ = PRESSED_CLOSE;
    AffirmForm *pAffirmForm = new AffirmForm(this->rect(), this);
    connect(pAffirmForm, SIGNAL(signalBack()), this, SLOT(slotPressBack()));
    connect(pAffirmForm, SIGNAL(signalNotSave()), this, SLOT(slotPressNotSave()));
    connect(pAffirmForm, SIGNAL(signalSave()), this, SLOT(slotPressSave()));
    pAffirmForm->setAttribute(Qt::WA_DeleteOnClose);
    //this->activateWindow();
    pAffirmForm->show();
}