Le champ "Fichier" dans Fichier > Exporter est desormais pourvu de l'auto-completion

Amelioration des options de compilation : plus besoin d'entourer les chemins par des \\"
Amelioration mineure du rendu des points de selection sur les conducteurs


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@174 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-10-13 15:26:01 +00:00
parent 7690fbcccb
commit 174fad9e16
4 changed files with 21 additions and 9 deletions

View File

@@ -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<QPointF> 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;
}

View File

@@ -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);

View File

@@ -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

View File

@@ -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
}