Example #1
0
void NewFileDialog::on_recentsList_itemDoubleClicked(QListWidgetItem *item)
{
    // Get selected item to send to options dialog
    QVariant data = item->data( Qt::UserRole );
    QString sitem = data.toString();
    // Close dialog and open OptionsDialog
    close();
    OptionsDialog* o = new OptionsDialog(nullptr);
    o->setFilename (sitem, this->strippedName(sitem));
    o->exec();
}
Example #2
0
void NewFileDialog::on_loadFileButton_clicked()
{
    // Check that there is a file selected
    QString fname = ui->newFileEdit->text();
    if (fname.isEmpty()) {
        QMessageBox msgBox;
        msgBox.setText("Select a new program or a previous one\nbefore continue");
        msgBox.exec();
    } else {
        // Close dialog and open OptionsDialog
        close();
        OptionsDialog* o = new OptionsDialog(nullptr);
        o->setFilename (fname, this->strippedName(fname));
        o->exec();
    }
}