Exemplo n.º 1
0
void Letterbox::open()
{
	pause(true);

	if (m_modified)
	{
		switch (askToSave())
		{
		case 0:
			writeFile();

		case 1:
			break;

		case 2:
			return;
		}
	}
	
	QString defaultFilter = defaultStudyListFileFilter();
	QString filename = QFileDialog::getOpenFileName(this, tr("Choose Letterbox file to open"), getInitialDirectory(), studyListFileFilters(), &defaultFilter);
	if (!filename.isEmpty())
	{
		setInitialDirectory(filename);
		m_filename = filename;
		loadFile();
		saveSettings();
	}
}
Exemplo n.º 2
0
//-----------------------------------------------------------------------------
CNewFileSelector::~CNewFileSelector ()
{
	setTitle (0);
	setInitialDirectory (0);
	setDefaultSaveName (0);
	for (size_t i = 0; i < result.size (); i++)
		free (result[i]);
}