Example #1
0
void showDialog(QDialog &t_Dialog)
{
   t_Dialog.show();
   t_Dialog.raise();
   t_Dialog.activateWindow();

   QApplication::processEvents();
}
LVRRemoveOutliersDialog::LVRRemoveOutliersDialog(LVRPointCloudItem* pc, LVRModelItem* parent, QTreeWidget* treeWidget, vtkRenderWindow* window) :
   m_pc(pc), m_parent(parent), m_treeWidget(treeWidget), m_renderWindow(window)
{
    // Setup DialogUI and events
    QDialog* dialog = new QDialog(m_treeWidget);
    m_dialog = new RemoveOutliersDialog;
    m_dialog->setupUi(dialog);

    connectSignalsAndSlots();

    dialog->show();
    dialog->raise();
    dialog->activateWindow();
}
LVRReconstructViaMarchingCubesDialog::LVRReconstructViaMarchingCubesDialog(string decomposition, LVRPointCloudItem* pc, LVRModelItem* parent, QTreeWidget* treeWidget, vtkRenderWindow* window) :
   m_decomposition(decomposition), 
   m_pc(pc), m_parent(parent), 
   m_treeWidget(treeWidget),
   m_renderWindow(window)
{
	m_master = this;

    // Setup DialogUI and events
    QDialog* dialog = new QDialog(m_treeWidget);
    m_dialog = new ReconstructViaMarchingCubesDialog;
    m_dialog->setupUi(dialog);

    if(decomposition == "PMC")
    {
    	dialog->setWindowTitle("Planar Marching Cubes");
    }

    connectSignalsAndSlots();

    m_progressDialog = new QProgressDialog;
    m_progressDialog->setMinimum(0);
    m_progressDialog->setMaximum(100);
    m_progressDialog->setMinimumDuration(100);
    m_progressDialog->setWindowTitle("Processing...");

    // Register LVR progress callbacks
    lvr::ProgressBar::setProgressCallback(&updateProgressbar);
    lvr::ProgressBar::setProgressTitleCallback(&updateProgressbarTitle);

    connect(this, SIGNAL(progressValueChanged(int)), m_progressDialog, SLOT(setValue(int)));
    connect(this, SIGNAL(progressTitleChanged(const QString&)), m_progressDialog, SLOT(setLabelText(const QString&)));

    dialog->show();
    dialog->raise();
    dialog->activateWindow();


}