Esempio n. 1
0
void HarmonicsInfoForm::
        currentCellChanged()
{
    if (2==rebuilding)
        return;

    int currentRow = ui->tableWidget->currentRow();
    if (currentRow < 0)
    {
        harmonicscontroller->setCurrentView( 0 );
        return;
    }

    QObjectUserData* userData = ui->tableWidget->userData(currentRow);
    CurrentViewUserData* cvud = dynamic_cast<CurrentViewUserData*>(userData);
    if (cvud)
    {
        harmonicscontroller->setCurrentView( cvud->view() );
        if (0==rebuilding)
        {
            render_view->model->setPosition( cvud->view()->model()->pos() );
            render_view->redraw ();
        }
    }
}
Esempio n. 2
0
void HarmonicsInfoForm::
        deleteCurrentRow()
{
    int currentRow = ui->tableWidget->currentRow();
    if (currentRow < 0)
        return;

    QObjectUserData* userData = ui->tableWidget->userData(currentRow);
    CurrentViewUserData* cvud = dynamic_cast<CurrentViewUserData*>(userData);
    if (cvud)
        delete cvud->view()->model()->comment;
}