Dialog to display Cancel button. More...
#include <SMESHGUI_ComputeDlg.h>

Public Member Functions | |
| SMESHGUI_ComputeDlg_QThreadQDialog (QWidget *parent, SMESH::SMESH_Gen_var gen, SMESH::SMESH_Mesh_var mesh, GEOM::GEOM_Object_var mainShape) | |
| bool | result () |
Protected Member Functions | |
| void | timerEvent (QTimerEvent *timer) |
| void | closeEvent (QCloseEvent *event) |
Private Slots | |
| void | onCancel () |
Private Attributes | |
| SMESHGUI_ComputeDlg_QThread | qthread |
| QPushButton * | cancelButton |
Dialog to display Cancel button.
Definition at line 293 of file SMESHGUI_ComputeDlg.h.
| SMESHGUI_ComputeDlg_QThreadQDialog::SMESHGUI_ComputeDlg_QThreadQDialog | ( | QWidget * | parent, |
| SMESH::SMESH_Gen_var | gen, | ||
| SMESH::SMESH_Mesh_var | mesh, | ||
| GEOM::GEOM_Object_var | mainShape | ||
| ) |
Definition at line 706 of file SMESHGUI_ComputeDlg.cxx.
References cancelButton, onCancel(), and qthread.
: QDialog(parent), qthread(gen, mesh, mainShape) { // -- setWindowTitle(tr("Compute")); cancelButton = new QPushButton(tr("Cancel")); cancelButton->setDefault(true); connect(cancelButton, SIGNAL(clicked()), this, SLOT(onCancel())); QHBoxLayout *layout = new QHBoxLayout; layout->addWidget(cancelButton); setLayout(layout); resize(200, 50); // -- startTimer(30); // 30 millisecs qthread.start(); }
| void SMESHGUI_ComputeDlg_QThreadQDialog::closeEvent | ( | QCloseEvent * | event | ) | [protected] |
Definition at line 746 of file SMESHGUI_ComputeDlg.cxx.
References qthread.
{
if(qthread.isRunning())
{
event->ignore();
return;
}
event->accept();
}
| void SMESHGUI_ComputeDlg_QThreadQDialog::onCancel | ( | ) | [private, slot] |
Definition at line 732 of file SMESHGUI_ComputeDlg.cxx.
References SMESHGUI_ComputeDlg_QThread.cancel(), and qthread.
Referenced by SMESHGUI_ComputeDlg_QThreadQDialog().
| bool SMESHGUI_ComputeDlg_QThreadQDialog::result | ( | ) |
Definition at line 727 of file SMESHGUI_ComputeDlg.cxx.
References qthread, and SMESHGUI_ComputeDlg_QThread.result().
Referenced by SMESHGUI_BaseComputeOp.computeMesh().
| void SMESHGUI_ComputeDlg_QThreadQDialog::timerEvent | ( | QTimerEvent * | timer | ) | [protected] |
Definition at line 737 of file SMESHGUI_ComputeDlg.cxx.
References qthread.
{
if(qthread.isFinished())
{
close();
}
event->accept();
}
QPushButton* SMESHGUI_ComputeDlg_QThreadQDialog.cancelButton [private] |
Definition at line 313 of file SMESHGUI_ComputeDlg.h.
Referenced by SMESHGUI_ComputeDlg_QThreadQDialog().
Definition at line 312 of file SMESHGUI_ComputeDlg.h.
Referenced by closeEvent(), onCancel(), result(), SMESHGUI_ComputeDlg_QThreadQDialog(), and timerEvent().