mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
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:
@@ -402,7 +402,7 @@ QPointF Conductor::extendTerminal(const QPointF &terminal, QET::Orientation term
|
|||||||
@param qsogi Les options de style pour le conducteur
|
@param qsogi Les options de style pour le conducteur
|
||||||
@param qw Le QWidget sur lequel on dessine
|
@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 -> save();
|
||||||
qp -> setRenderHint(QPainter::Antialiasing, false);
|
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
|
// dessin des points d'accroche du conducteur si celui-ci est selectionne
|
||||||
if (isSelected()) {
|
if (isSelected()) {
|
||||||
qp -> setRenderHint(QPainter::Antialiasing, true);
|
|
||||||
QList<QPointF> points = segmentsToPoints();
|
QList<QPointF> points = segmentsToPoints();
|
||||||
QPointF previous_point;
|
QPointF previous_point;
|
||||||
QBrush square_brush(Qt::darkGreen);
|
QBrush square_brush(Qt::darkGreen);
|
||||||
for (int i = 1 ; i < (points.size() -1) ; ++ i) {
|
for (int i = 1 ; i < (points.size() -1) ; ++ i) {
|
||||||
QPointF point = points.at(i);
|
QPointF point = points.at(i);
|
||||||
|
qp -> setRenderHint(QPainter::Antialiasing, false);
|
||||||
if (i > 1) {
|
if (i > 1) {
|
||||||
qp -> fillRect(
|
qp -> fillRect(
|
||||||
QRectF(
|
QRectF(
|
||||||
((previous_point.x() + point.x()) / 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 ) - 2.5,
|
((previous_point.y() + point.y()) / 2.0 ) - (options -> levelOfDetail == 1 ? 2.0 : 2.5),
|
||||||
5.0,
|
5.0,
|
||||||
5.0
|
5.0
|
||||||
),
|
),
|
||||||
square_brush
|
square_brush
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
qp -> setRenderHint(QPainter::Antialiasing, true);
|
||||||
qp -> drawEllipse(QRectF(point.x() - 3.0, point.y() - 3.0, 6.0, 6.0));
|
qp -> drawEllipse(QRectF(point.x() - 3.0, point.y() - 3.0, 6.0, 6.0));
|
||||||
previous_point = point;
|
previous_point = point;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -159,6 +159,10 @@ QWidget *ExportDialog::leftPart() {
|
|||||||
QHBoxLayout *hboxLayout = new QHBoxLayout();
|
QHBoxLayout *hboxLayout = new QHBoxLayout();
|
||||||
hboxLayout -> addWidget(new QLabel(tr("Nom de fichier :"), this));
|
hboxLayout -> addWidget(new QLabel(tr("Nom de fichier :"), this));
|
||||||
hboxLayout -> addWidget(filename = new QLineEdit(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));
|
hboxLayout -> addWidget(button_browse = new QPushButton(tr("Parcourir"), this));
|
||||||
|
|
||||||
vboxLayout -> addLayout(hboxLayout);
|
vboxLayout -> addLayout(hboxLayout);
|
||||||
|
|||||||
@@ -136,6 +136,12 @@ CONFIG(debug, debug|release) {
|
|||||||
} else {
|
} else {
|
||||||
TARGET = qelectrotech.release
|
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
|
DEFINES += QET_ALLOW_OVERRIDE_CED_OPTION
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "qetapp.h"
|
#include "qetapp.h"
|
||||||
#include "qetdiagrameditor.h"
|
#include "qetdiagrameditor.h"
|
||||||
#include "qetelementeditor.h"
|
#include "qetelementeditor.h"
|
||||||
|
#define QUOTE(x) STRINGIFY(x)
|
||||||
|
#define STRINGIFY(x) #x
|
||||||
|
|
||||||
QString QETApp::common_elements_dir = QString();
|
QString QETApp::common_elements_dir = QString();
|
||||||
|
|
||||||
@@ -182,7 +184,7 @@ QString QETApp::commonElementsDir() {
|
|||||||
if (common_elements_dir != QString()) return(common_elements_dir);
|
if (common_elements_dir != QString()) return(common_elements_dir);
|
||||||
#endif
|
#endif
|
||||||
#ifdef QET_COMMON_COLLECTION_PATH
|
#ifdef QET_COMMON_COLLECTION_PATH
|
||||||
return(QET_COMMON_COLLECTION_PATH);
|
return(QUOTE(QET_COMMON_COLLECTION_PATH));
|
||||||
#else
|
#else
|
||||||
return(QDir::current().path() + "/elements/");
|
return(QDir::current().path() + "/elements/");
|
||||||
#endif
|
#endif
|
||||||
@@ -272,7 +274,7 @@ QString QETApp::languagesPath() {
|
|||||||
#ifndef QET_LANG_PATH
|
#ifndef QET_LANG_PATH
|
||||||
return(QDir::current().path() + "/lang/");
|
return(QDir::current().path() + "/lang/");
|
||||||
#else
|
#else
|
||||||
return(QET_LANG_PATH);
|
return(QUOTE(QET_LANG_PATH));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user