def loadVars(self):
filename = QFileDialog.getOpenFileName(self, self.tr("Import variables from file"),
- os.getenv("HOME"),
+ os.path.expanduser("~"),
self.tr("XML Files (*.xml)"))
if not filename:
return
self.tr("Cannot load file %s:\n%s" % (filename, e)))
def saveVars(self):
- default = os.path.join(os.getenv("HOME"), "vars.xml")
+ default = os.path.join(os.path.expanduser("~"), "vars.xml")
filename = QFileDialog.getSaveFileName(self, self.tr("Export variables to file"),
default, self.tr("XML Files (*.xml)"))
if not filename:
#include <QPushButton>
#include <QTextStream>
#include <QFile>
+#include <QDir>
#include <QPrinter>
//#include <QSimpleRichText>
#include <QTextDocument>
void SUIT_LicenseDlg::onAgree()
{
+ /*
QString env;
#ifdef WIN32
DWORD aLen=1024;
QFile file( env + "/ReadLicense.log" ); // Read the text from a file
file.open( QIODevice::WriteOnly );
+ */
+ QString env = QDir::homePath();
+ QFile file( env + "/ReadLicense.log" );
+ if (!file.open( QIODevice::WriteOnly ))
+ reject();
QTextStream ts( &file );
ts << "OK" << endl;
#include <QLayout>
#include <QLineEdit>
#include <QPushButton>
+#include <QDir>
/*!
* Constructor
aFilter.append( tr( "FLT_AVI_FILES" ) );
aFilter.append( tr( "FLT_ALL_FILES" ) );
- QString aFileName = SUIT_FileDlg::getFileName( this, Qtx::getenv( "HOME" ), aFilter,
+ QString aFileName = SUIT_FileDlg::getFileName( this, QDir::homePath(), aFilter,
tr( "FILE_NAME" ), false );
if( aFileName.isNull() )