diff --git a/conductor.cpp b/conductor.cpp index f4af7744c..59050cda9 100644 --- a/conductor.cpp +++ b/conductor.cpp @@ -402,7 +402,7 @@ QPointF Conductor::extendTerminal(const QPointF &terminal, QET::Orientation term @param qsogi Les options de style pour le conducteur @param qw Le QWidget sur lequel on dessine */ -void Conductor::paint(QPainter *qp, const QStyleOptionGraphicsItem */*qsogi*/, QWidget */*qw*/) { +void Conductor::paint(QPainter *qp, const QStyleOptionGraphicsItem *options, QWidget */*qw*/) { qp -> save(); qp -> setRenderHint(QPainter::Antialiasing, false); @@ -429,24 +429,24 @@ void Conductor::paint(QPainter *qp, const QStyleOptionGraphicsItem */*qsogi*/, Q // dessin des points d'accroche du conducteur si celui-ci est selectionne if (isSelected()) { - qp -> setRenderHint(QPainter::Antialiasing, true); QList points = segmentsToPoints(); QPointF previous_point; QBrush square_brush(Qt::darkGreen); for (int i = 1 ; i < (points.size() -1) ; ++ i) { QPointF point = points.at(i); - + qp -> setRenderHint(QPainter::Antialiasing, false); if (i > 1) { qp -> fillRect( QRectF( - ((previous_point.x() + point.x()) / 2.0 ) - 2.5, - ((previous_point.y() + point.y()) / 2.0 ) - 2.5, + ((previous_point.x() + point.x()) / 2.0 ) - (options -> levelOfDetail == 1 ? 2.0 : 2.5), + ((previous_point.y() + point.y()) / 2.0 ) - (options -> levelOfDetail == 1 ? 2.0 : 2.5), 5.0, 5.0 ), square_brush ); } + qp -> setRenderHint(QPainter::Antialiasing, true); qp -> drawEllipse(QRectF(point.x() - 3.0, point.y() - 3.0, 6.0, 6.0)); previous_point = point; } diff --git a/exportdialog.cpp b/exportdialog.cpp index c9515c74d..5a2588b9f 100644 --- a/exportdialog.cpp +++ b/exportdialog.cpp @@ -159,6 +159,10 @@ QWidget *ExportDialog::leftPart() { QHBoxLayout *hboxLayout = new QHBoxLayout(); hboxLayout -> addWidget(new QLabel(tr("Nom de fichier :"), this)); hboxLayout -> addWidget(filename = new QLineEdit(this)); + filename -> setText(QDir::toNativeSeparators(QDir::homePath())); + QCompleter *completer = new QCompleter(this); + completer -> setModel(new QDirModel(completer)); + filename -> setCompleter(completer); hboxLayout -> addWidget(button_browse = new QPushButton(tr("Parcourir"), this)); vboxLayout -> addLayout(hboxLayout); diff --git a/qelectrotech.pro b/qelectrotech.pro index 57bb19493..48e6fcd44 100644 --- a/qelectrotech.pro +++ b/qelectrotech.pro @@ -136,6 +136,12 @@ CONFIG(debug, debug|release) { } else { TARGET = qelectrotech.release } -;DEFINES += QET_LANG_PATH='\\"/path/to/qelectrotech/lang/\\"' -;DEFINES += QET_COMMON_COLLECTION_PATH='\\"/path/to/qelectrotech/elements/\\"' + +#Chemin des fichiers de traduction ; par defaut : lang/ dans le repertoire d'execution +#DEFINES += QET_LANG_PATH='/path/to/qelectrotech/lang/' + +#Chemin de la collection commune ; par defaut : elements/ dans le repertoire d'execution +#DEFINES += QET_COMMON_COLLECTION_PATH='/path/to/qelectrotech/elements/' + +#Commenter la ligne ci-dessous pour desactiver l'option --common-elements-dir DEFINES += QET_ALLOW_OVERRIDE_CED_OPTION diff --git a/qetapp.cpp b/qetapp.cpp index c6414e31b..2a1522b4c 100644 --- a/qetapp.cpp +++ b/qetapp.cpp @@ -1,6 +1,8 @@ #include "qetapp.h" #include "qetdiagrameditor.h" #include "qetelementeditor.h" +#define QUOTE(x) STRINGIFY(x) +#define STRINGIFY(x) #x QString QETApp::common_elements_dir = QString(); @@ -182,7 +184,7 @@ QString QETApp::commonElementsDir() { if (common_elements_dir != QString()) return(common_elements_dir); #endif #ifdef QET_COMMON_COLLECTION_PATH - return(QET_COMMON_COLLECTION_PATH); + return(QUOTE(QET_COMMON_COLLECTION_PATH)); #else return(QDir::current().path() + "/elements/"); #endif @@ -272,7 +274,7 @@ QString QETApp::languagesPath() { #ifndef QET_LANG_PATH return(QDir::current().path() + "/lang/"); #else - return(QET_LANG_PATH); + return(QUOTE(QET_LANG_PATH)); #endif }