void gesamtbild::zeitanzeige(/*int dora, int hin, int may*/) { qWarning() << "Zeit"; QDialog *zeitw = new QDialog(this); QVBoxLayout layout(zeitw); QLabel *anzeige = new QLabel(tr("Time: Day %1,").arg(GAMEDATA->gametime().day()).append(QString("%1 hours").arg(GAMEDATA->gametime().hour())), zeitw); // anzeige->setText(anzeige->text().append(QString(", %2 Uhr %3").arg( gameview->stunde, gameview->minute)));gameview->stunde // qWarning() << anzeige->text().append(QString(", %2 Uhr %3").arg( gameview->stunde, gameview->minute)); QPushButton *ok = new QPushButton("Ok",zeitw); ok->move(50, 50); layout.addWidget(anzeige); layout.addWidget(ok); // zeitw->setGeometry(width()/2,height()/2,200,100); zeitw->setLayout(&layout); zeitw->setAutoFillBackground(true); zeitw->move(gameview->width()/2,gameview->height()/2); zeitw->raise(); zeitw->show(); connect(ok, SIGNAL(clicked()), gameview, SLOT(endePause())); connect(ok, SIGNAL(clicked()), zeitw, SLOT(close())); connect(ok, SIGNAL(clicked()), zeitw, SLOT(deleteLater())); }
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(); }