void RecentFiles::removeRecentFile( const QString& file )
{
	QStringList files = loadRecentFiles();
	files.removeAll( file );
	saveRecentFiles( files );

	updateMenu();
}
Exemplo n.º 2
0
MDLViewer::~MDLViewer ()
{
	saveRecentFiles ();
	SaveViewerSettings( g_pStudioModel->GetFileName(), g_pStudioModel );
	SaveViewerRootSettings( );

#ifdef WIN32
	DeleteFile ("hlmv.cfg");
	DeleteFile ("midump.txt");
#endif
}
Exemplo n.º 3
0
void MDLViewer::OnDelete()
{
	saveRecentFiles ();
	SaveViewerSettings( g_viewerSettings.modelFile );

#ifdef WIN32
	DeleteFile ("hlmv.cfg");
	DeleteFile ("midump.txt");
#endif

	g_MDLViewer = NULL;
}
void RecentFiles::setCurrentFile( const QString& file )
{
	QStringList files = loadRecentFiles();
	files.removeAll( file );
	files.prepend( file );

	while ( files.size() > m_actions.size() )
		files.removeLast();

	saveRecentFiles( files );

	updateMenu();
}
Exemplo n.º 5
0
void MRU::insert(const std::string& fileName) {

	if (!fileName.empty())
	{
		// Insert the item into the filelist
		_list.insert(fileName);

		// Update the widgets
		updateMenu();

		// Persist MRU to the registry on each change
		saveRecentFiles();
	}
}
Exemplo n.º 6
0
Arquivo: App.cpp Projeto: KDE/kwave
//***************************************************************************
Kwave::App::~App()
{
    saveRecentFiles();
    m_recent_files.clear();
}