예제 #1
0
void MainWindow::on_actionOpen_triggered()
{
    _viewerWidget->stop();
    QString filename = QFileDialog::getOpenFileName(this, "Select Scene File");
    if(filename != NULL) {
        _loadFile(filename);
    }
    _viewerWidget->start();
}
예제 #2
0
 void AppController::scene1_addPixmap(const QString& path)
 {
   if ( _loadFile(path) )
   {
   }
   else if ( m_Img1.load(path) )
   {
     m_Scene1->setPixmap(m_Img1);
   }
 }
예제 #3
0
 void AppController::action_openFile()
 {
   QFileDialog dialog(&m_MainWindow, "Open File");
   dialog.setFileMode(QFileDialog::ExistingFile);
   dialog.setNameFilter("*.dat");
   
   if(dialog.exec())
   {
     QString path = dialog.selectedFiles().first();
     _loadFile(path);
   }
 }
예제 #4
0
MainWindow::MainWindow(osgViewer::ViewerBase::ThreadingModel threadingModel, QString filename, QWidget *parent)
    : QMainWindow(parent)
{
    setupUi(this);
    _viewerWidget = new ViewerWidget(threadingModel, this);
    setCentralWidget(_viewerWidget);

    connect(actionTogglePolygonMode, SIGNAL(toggled(bool)),
            _viewerWidget, SLOT(togglePolygonMode(bool)));

    createDockWindows();

    _loadFile(filename);
}
예제 #5
0
/**
 *  Open file dialog
 */
void MainWindow::_open()
{
    QFileDialog dialog( this );
    dialog.setFileMode( QFileDialog::ExistingFile );
    dialog.setDirectory( getCurrentName( ));
    if( !dialog.exec( ))
        return;

    QStringList files = dialog.selectedFiles();
    if( files.isEmpty( ) || files.first().isEmpty( ))
        return;

    _loadFile( files.first( ));
}
UT_Error IE_Imp::importFile (const char * szFilename)
{
	GsfInput * input;

	input = UT_go_file_open (szFilename, NULL);
	if (!input)
		return UT_IE_FILENOTFOUND;

	UT_Error result = _loadFile (input);

	g_object_unref (G_OBJECT (input));

	return result;
}
예제 #7
0
void EditNoteForm::setSettings(const SettingsMap &settings)
{
	_newNoteTextTemplate = _loadFile(settings[S_NEW_NOTE_TEXT_TEMPLATE].toString());
	_noteShowingTemplate = _loadFile(settings[S_NOTE_SHOWING_TEMPLATE] .toString());

	if (_noteShowingTemplate.isEmpty())
	{
		QMessageBox msgBox;
		msgBox.setText(tr("NoteShowingTemplate.html does not found \n\n(")
					   + settings[S_NEW_NOTE_TEXT_TEMPLATE].toString() + ").");
		msgBox.setInformativeText(tr("In-program reserve template will be used now."));
		msgBox.setStandardButtons(QMessageBox::Ok);
		msgBox.setIcon(QMessageBox::Warning);
		msgBox.exec();
		_noteShowingTemplate = noteShowingTemplate();
	}

	_changeFontSizeStep  = settings[S_CHANGE_FONT_SIZE_STEP].toInt();
	_defaultColorTheme   = settings[S_DEFAULT_COLOR_THEME].toString();
	ui->le_Title->setVisible(settings[S_ENABLE_NOTE_TITLES].toBool());
	ui->dte_Date->setVisible(settings[S_ALLOW_DATE_EDITING_IN_NEW_NOTE].toBool());
	ui->l_Date->setVisible(settings[S_ALLOW_DATE_EDITING_IN_NEW_NOTE].toBool());
	_allowDatetimeEditing  = settings[S_ALLOW_DATE_EDITING_IN_NEW_NOTE].toBool();
}
void DicomSurfaceSegmentationLoad::_process()
{
	_startProcessing(); 
	_loadFile();
	_finishProcessing(); 
}
UT_Error IE_Imp::importFile (GsfInput * input)
{
	return _loadFile (input);
}