Example #1
0
void ToolWidget::on_tabWidget_currentChanged(QWidget *arg1)
{
    if (arg1 == ui->solidTab) {
        mainWindow->getModelManager()->selectSolid(selectedSolid);
        mainWindow->getViewManager()->repaintAll();
    } else if (arg1 == ui->primitiveTab) {
        ModelManager* model = mainWindow->getModelManager();
        ASolid* solid = model->getSolidFromPmt(selectedPrimitive);
        model->selectSolid(solid);
        mainWindow->getViewManager()->repaintAll();
    }
}
Example #2
0
void ToolWidget::on_visiblePmtBtn_clicked()
{
    ModelManager* model = mainWindow->getModelManager();
    ASolid* solid = model->getSolidFromPmt(selectedPrimitive);
    if (solid) {
        solid->setVisible(!solid->getVisible());
        mainWindow->getViewManager()->repaintAll();
        if (ui->visiblePmtBtn->text() == "Hide") {
            ui->visiblePmtBtn->setText("Show");
        } else {
            ui->visiblePmtBtn->setText("Hide");
        }
    }
}