+ out<<myHistory.at(i).command<<endl;
+ }
+ file.close();
+ }
+}
+/*!
+ \brief "Save log" operation.
+ */
+void PyConsole_Editor::saveLog()
+{
+ QStringList aFilters;
+ aFilters.append( tr( "PYTHON_FILES_FILTER" ) );
+
+ QString fileName = SUIT_FileDlg::getFileName( this, QString(),
+ aFilters, tr( "TOT_SAVE_PYLOG" ),
+ false, true, new DumpCommandsFileValidator( this ) );
+ if ( fileName != "" ) {
+ QFile file( fileName );
+ if ( !file.open( QFile::WriteOnly ) )
+ return;
+
+ QTextStream out (&file);
+
+ for( int i = 0; i < myHistory.count(); i++ ) {
+ out << myHistory.at(i).command << endl;
+ out << myHistory.at(i).output;