mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-30 10:00:00 +02:00
Minor
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4677 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -140,7 +140,7 @@ void QETElementEditor::setupActions() {
|
|||||||
new_element = new QAction(QET::Icons::DocumentNew, tr("&Nouveau"), this);
|
new_element = new QAction(QET::Icons::DocumentNew, tr("&Nouveau"), this);
|
||||||
open = new QAction(QET::Icons::DocumentOpen, tr("&Ouvrir"), this);
|
open = new QAction(QET::Icons::DocumentOpen, tr("&Ouvrir"), this);
|
||||||
open_file = new QAction(QET::Icons::DocumentOpen, tr("&Ouvrir depuis un fichier"), this);
|
open_file = new QAction(QET::Icons::DocumentOpen, tr("&Ouvrir depuis un fichier"), this);
|
||||||
open_dxf = new QAction(QET::Icons::DocumentOpen, tr("&Ouvrir depuis un fichier dxf"), this);
|
open_dxf = new QAction(QET::Icons::DocumentOpen, tr("&Lancer le plugin convertisseur DXF"), this);
|
||||||
save = new QAction(QET::Icons::DocumentSave, tr("&Enregistrer"), this);
|
save = new QAction(QET::Icons::DocumentSave, tr("&Enregistrer"), this);
|
||||||
save_as = new QAction(QET::Icons::DocumentSaveAs, tr("Enregistrer sous"), this);
|
save_as = new QAction(QET::Icons::DocumentSaveAs, tr("Enregistrer sous"), this);
|
||||||
save_as_file = new QAction(QET::Icons::DocumentSaveAs, tr("Enregistrer dans un fichier"), this);
|
save_as_file = new QAction(QET::Icons::DocumentSaveAs, tr("Enregistrer dans un fichier"), this);
|
||||||
@@ -1043,14 +1043,34 @@ void QETElementEditor::openRecentFile(const QString &filepath) {
|
|||||||
* @brief QETElementEditor::slot_openDxf
|
* @brief QETElementEditor::slot_openDxf
|
||||||
*/
|
*/
|
||||||
void QETElementEditor::slot_openDxf (){
|
void QETElementEditor::slot_openDxf (){
|
||||||
|
bool success;
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN32
|
||||||
QString program = (QDir::homePath() + "/Application Data/qet/DXFtoQET.exe");
|
QString program = (QDir::homePath() + "/Application Data/qet/DXFtoQET.exe");
|
||||||
#else
|
#else
|
||||||
QString program = (QDir::homePath() + "/.qet/DXFtoQET");
|
QString program = (QDir::homePath() + "/.qet/DXFtoQET");
|
||||||
#endif
|
#endif
|
||||||
QStringList arguments;
|
|
||||||
QProcess *DXF = new QProcess(qApp);
|
QProcess *DXF = new QProcess(qApp);
|
||||||
DXF->start(program, arguments);
|
success = DXF->startDetached(program);
|
||||||
|
if ( !success ) {
|
||||||
|
QMessageBox::warning(0,
|
||||||
|
"Error launching plugin DXF",
|
||||||
|
"To install the plugin DXF\nVisit https://download.tuxfamily.org/qet/builds/dxf_to_elmt/\n"
|
||||||
|
"\n"
|
||||||
|
">> Install plugin on Linux\n"
|
||||||
|
"\n"
|
||||||
|
"cd ~/.qet/\n"
|
||||||
|
"wget http://download.tuxfamily.org/qet/builds/dxf_to_elmt/linux_x86-64_qt5.5.1/DXFtoQET\n"
|
||||||
|
"\n"
|
||||||
|
"chmod +x DXFtoQET\n"
|
||||||
|
"\n"
|
||||||
|
"\n"
|
||||||
|
">> Install plugin on Windows\n"
|
||||||
|
"Download http://download.tuxfamily.org/qet/builds/dxf_to_elmt/windows_64/DXFtoQET.exe\n"
|
||||||
|
"Move or past this exe to your C:\\Users\\username\\AppData\\Roaming\\qet\\ directory\n"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2146,24 +2146,14 @@ void QETDiagramEditor::activeUndoStackCleanChanged(bool clean) {
|
|||||||
/**
|
/**
|
||||||
* @brief QETDiagramEditor::slot_generateTerminalBlock
|
* @brief QETDiagramEditor::slot_generateTerminalBlock
|
||||||
*/
|
*/
|
||||||
//void QETDiagramEditor::slot_generateTerminalBlock(){
|
|
||||||
|
|
||||||
//QString path,program;
|
|
||||||
//QStringList args;
|
|
||||||
//path=(QDir("/bin/bash").absolutePath());
|
|
||||||
//program="gksudo";
|
|
||||||
//args << "pip3 install --upgrade qet_tb_generator";
|
|
||||||
//QProcess *process = new QProcess(qApp);
|
|
||||||
//process->start(program,args);
|
|
||||||
//process->waitForFinished();
|
|
||||||
//}
|
|
||||||
|
|
||||||
void QETDiagramEditor::slot_generateTerminalBlock() {
|
void QETDiagramEditor::slot_generateTerminalBlock() {
|
||||||
bool success;
|
bool success;
|
||||||
QProcess *process = new QProcess(qApp);
|
QProcess *process = new QProcess(qApp);
|
||||||
|
|
||||||
// If launched under control:
|
// If launched under control:
|
||||||
//connect(process, SIGNAL(errorOcurred(int error)), this, SLOT(slot_generateTerminalBlock_error()));
|
//connect(process, SIGNAL(errorOcurred(int error)), this, SLOT(slot_generateTerminalBlock_error()));
|
||||||
//process->start("qet_tb_generator");
|
//process->start("qet_tb_generator");
|
||||||
|
|
||||||
success = process->startDetached("qet_tb_generator");
|
success = process->startDetached("qet_tb_generator");
|
||||||
if ( !success ) {
|
if ( !success ) {
|
||||||
QMessageBox::warning(0,
|
QMessageBox::warning(0,
|
||||||
|
|||||||
Reference in New Issue
Block a user