#include <QTextStream>
#include <QChar>
#include <QFileInfo>
+#include <QFileDialog>
+#include <QMessageBox>
//VSR: uncomment below macro to support unicode text properly in SALOME
// current commented out due to regressions
void PyConsole_EditorBase::dumpSlot()
{
- //TODO
+ QString fileName(QFileDialog::getSaveFileName(this,tr("Choose python file where to store"),QString(),tr("Python scripts ext (*.py)")));
+ if ( !fileName.isEmpty() )
+ this->dump( fileName );
+ else
+ QMessageBox::warning(this,tr("WARNING"),tr("Python file has not been written"));
}
/*!
void PyConsole_EditorBase::startLogSlot()
{
- //TODO
+ QString fileName(QFileDialog::getSaveFileName(this,tr("Choose python file where to store log"),QString(),tr("Log files ext (*.log *.txt)")));
+ while (1)
+ {
+ if ( !fileName.isEmpty() )
+ {
+ if ( startLogImpl( fileName ) )
+ break;
+ else
+ QMessageBox::warning(this,tr("WARNING"),tr("Log file is not writable"));
+ }
+ }
}
/*!
<translation>Stop &Log</translation>
</message>
</context>
+<context>
+ <name>PyConsole_EditorBase</name>
+ <message>
+ <source>Choose python file where to store</source>
+ <translation>Choose python file where to store dump</translation>
+ </message>
+ <message>
+ <source>Python scripts ext (*.py)</source>
+ <translation>Python scripts (*.py)</translation>
+ </message>
+ <message>
+ <source>WARNING</source>
+ <translation>WARNING !</translation>
+ </message>
+ <message>
+ <source>Python file has not been written</source>
+ <translation>Python file has not been written !</translation>
+ </message>
+ <message>
+ <source>Choose python file where to store log</source>
+ <translation>Choose python file where to store log</translation>
+ </message>
+ <message>
+ <source>Log files ext (*.log *.txt)</source>
+ <translation>Log files extension (*.log *.txt)</translation>
+ </message>
+ <message>
+ <source>Log file is not writable</source>
+ <translation>Log file is not writable !</translation>
+ </message>
+</context>
</TS>
<translation>Arrêter la &trace</translation>
</message>
</context>
+<context>
+ <name>PyConsole_EditorBase</name>
+ <message>
+ <source>Choose python file where to store</source>
+ <translation>Choose python file where to store dump</translation>
+ </message>
+ <message>
+ <source>Python scripts ext (*.py)</source>
+ <translation>Python scripts (*.py)</translation>
+ </message>
+ <message>
+ <source>WARNING</source>
+ <translation>WARNING !</translation>
+ </message>
+ <message>
+ <source>Python file has not been written</source>
+ <translation>Python file has not been written !</translation>
+ </message>
+ <message>
+ <source>Choose python file where to store log</source>
+ <translation>Choose python file where to store log</translation>
+ </message>
+ <message>
+ <source>Log files ext (*.log *.txt)</source>
+ <translation>Log files extension (*.log *.txt)</translation>
+ </message>
+ <message>
+ <source>Log file is not writable</source>
+ <translation>Log file is not writable !</translation>
+ </message>
+</context>
</TS>
<translation>ログの停止 (&L)</translation>
</message>
</context>
+ <context>
+ <name>PyConsole_EditorBase</name>
+ <message>
+ <source>Choose python file where to store</source>
+ <translation>Choose python file where to store dump</translation>
+ </message>
+ <message>
+ <source>Python scripts ext (*.py)</source>
+ <translation>Python scripts (*.py)</translation>
+ </message>
+ <message>
+ <source>WARNING</source>
+ <translation>WARNING !</translation>
+ </message>
+ <message>
+ <source>Python file has not been written</source>
+ <translation>Python file has not been written !</translation>
+ </message>
+ <message>
+ <source>Choose python file where to store log</source>
+ <translation>Choose python file where to store log</translation>
+ </message>
+ <message>
+ <source>Log files ext (*.log *.txt)</source>
+ <translation>Log files extension (*.log *.txt)</translation>
+ </message>
+ <message>
+ <source>Log file is not writable</source>
+ <translation>Log file is not writable !</translation>
+ </message>
+</context>
</TS>