void MainWindow::createToolBar() { QToolBar *tool = new QToolBar("Actions"); tool->addAction(QIcon(":/icons/T.png"), Strings::NewTajectory, this, SLOT(createNewTrajectorySlot())); tool->addAction(QIcon(":/icons/I.png"), Strings::NewIsosurface, this, SLOT(createNewIsosurfaceSlot())); tool->addAction(QIcon(":/icons/M.png"), Strings::NewMIP, this, SLOT(createNewMIPSlot())); tool->addAction(QIcon(":/icons/P.png"), Strings::NewPoints, this, SLOT(createNewPointsSlot())); tool->addAction(QIcon(":/icons/V.png"), Strings::NewVector, this, SLOT(createNewVectorSlot())); tool->addAction(QIcon(":/icons/Tw.png"), Strings::NewTajectoryWidth, this, SLOT(createNewTrajectoryWidthSlot())); tool->addAction(QIcon(":/icons/mesh.png"), Strings::NewMesh, this, SLOT(createNewMeshSlot())); tool->addSeparator(); tool->addAction(QIcon(":/icons/projection.png"), Strings::ToggleProjection, this, SLOT(toggleProjectionSlot())); tool->addAction(QIcon(":/icons/sphere.png"), Strings::ToggleSphere, this, SLOT(toggleSphereSlot())); tool->addSeparator(); tool->addAction(QIcon(":/icons/refresh.png"), Strings::Refresh, this, SIGNAL(refreshSignal())); tool->addSeparator(); tool->addAction(QIcon(":/icons/V1.png"), Strings::Front, this, SLOT(resetViewFrontSlot())); tool->addAction(QIcon(":/icons/V2.png"), Strings::Top, this, SLOT(resetViewTopSlot())); tool->addAction(QIcon(":/icons/V3.png"), Strings::Side, this, SLOT(resetViewSideSlot())); addToolBar(tool); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { setWindowTitle("Vision3D"); createToolBar(); QSplitter *splitter = new QSplitter(Qt::Horizontal, this); leftMenu = new LeftMenu(); splitter->addWidget(leftMenu); PlotArea * area = new PlotArea(); splitter->addWidget(area); setCentralWidget(splitter); connect(this, SIGNAL(refreshSignal()), area, SLOT(repaint())); resize(800, 600); }
void operator_Dialog::on_done_pushButton_clicked() { if(dateModelFlag == 1){ ui->label_remindMission->setText(""); QString keyID = model->record(curRow).value("keyID").toString(); QString sql = "update Diary set status = '0' where keyID = '"; sql += keyID + "'"; query.exec(sql); QString select = "select * from Diary where keyID = '";; select += keyID + "' and status = '0'"; query.exec(select); if(query.next()){ ui->label_remindMission->setText("任务完成!"); } emit refreshSignal(1); } else{ ui->label_remindMission->setText("请先确定时间范围!"); } }
void MainWindow::resetViewSideSlot() { ViewSettings::resetViewSide(); emit refreshSignal(); }
void MainWindow::toggleSphereSlot() { ViewSettings::toggleSphereRendering(); emit refreshSignal(); }
void MainWindow::toggleProjectionSlot() { ViewSettings::toggleProjection(); emit refreshSignal(); }