Merge Qt5 branch sources folder to trunk

-Cette ligne, et les suivantes ci-dessous, seront ignorées--

M    sources/aboutqet.cpp
M    sources/bordertitleblock.cpp
M    sources/conductorproperties.h
M    sources/configdialog.cpp
M    sources/configpages.cpp
M    sources/configpages.h
M    sources/createdxf.h
M    sources/diagram.cpp
M    sources/diagram.h
M    sources/diagramcommands.cpp
M    sources/diagramcommands.h
M    sources/diagramprintdialog.cpp
M    sources/diagramprintdialog.h
M    sources/diagramschooser.cpp
M    sources/diagramschooser.h
M    sources/diagramview.cpp
M    sources/diagramview.h
M    sources/dvevent/dveventaddimage.cpp
M    sources/dvevent/dveventaddshape.cpp
M    sources/editor/arceditor.cpp
M    sources/editor/arceditor.h
M    sources/editor/editorcommands.cpp
M    sources/editor/editorcommands.h
M    sources/editor/elementitemeditor.h
M    sources/editor/elementprimitivedecorator.cpp
M    sources/editor/elementscene.cpp
M    sources/editor/elementscene.h
M    sources/editor/elementview.cpp
M    sources/editor/ellipseeditor.cpp
M    sources/editor/ellipseeditor.h
M    sources/editor/esevent/eseventaddtext.cpp
M    sources/editor/esevent/eseventaddtextfield.cpp
M    sources/editor/esevent/eseventinterface.cpp
M    sources/editor/graphicspart/customelementpart.h
M    sources/editor/graphicspart/parttext.cpp
M    sources/editor/graphicspart/parttext.h
M    sources/editor/graphicspart/parttextfield.cpp
M    sources/editor/graphicspart/parttextfield.h
M    sources/editor/lineeditor.cpp
M    sources/editor/lineeditor.h
M    sources/editor/polygoneditor.cpp
M    sources/editor/qetelementeditor.cpp
M    sources/editor/qetelementeditor.h
M    sources/editor/rectangleeditor.cpp
M    sources/editor/rectangleeditor.h
M    sources/editor/styleeditor.cpp
M    sources/editor/styleeditor.h
M    sources/editor/terminaleditor.cpp
M    sources/editor/terminaleditor.h
M    sources/editor/texteditor.cpp
M    sources/editor/texteditor.h
M    sources/editor/textfieldeditor.cpp
M    sources/editor/textfieldeditor.h
M    sources/editor/ui/elementpropertieseditorwidget.cpp
M    sources/elementdefinition.cpp
M    sources/elementdeleter.cpp
M    sources/elementdeleter.h
M    sources/elementdialog.cpp
M    sources/elementscategorieslist.h
M    sources/elementscategorieswidget.cpp
M    sources/elementscategorieswidget.h
M    sources/elementscategory.cpp
M    sources/elementscategorydeleter.cpp
M    sources/elementscategorydeleter.h
M    sources/elementscategoryeditor.cpp
M    sources/elementscategoryeditor.h
M    sources/elementscollection.cpp
M    sources/elementscollectioncache.cpp
M    sources/elementspanel.cpp
M    sources/elementspanel.h
M    sources/elementspanelwidget.cpp
M    sources/elementspanelwidget.h
M    sources/elementtextsmover.h
M    sources/exportdialog.cpp
M    sources/exportdialog.h
M    sources/exportproperties.cpp
M    sources/exportpropertieswidget.cpp
M    sources/exportpropertieswidget.h
M    sources/genericpanel.cpp
M    sources/integrationmoveelementshandler.cpp
M    sources/integrationmoveelementshandler.h
M    sources/interactivemoveelementshandler.cpp
M    sources/nameslistwidget.cpp
M    sources/nameslistwidget.h
M    sources/newelementwizard.cpp
M    sources/newelementwizard.h
M    sources/nomenclature.cpp
M    sources/nomenclature.h
M    sources/projectconfigpages.cpp
M    sources/projectview.cpp
M    sources/projectview.h
M    sources/qet.cpp
M    sources/qetapp.cpp
M    sources/qetapp.h
M    sources/qetdiagrameditor.cpp
M    sources/qetdiagrameditor.h
M    sources/qetgraphicsitem/conductor.cpp
M    sources/qetgraphicsitem/conductortextitem.cpp
M    sources/qetgraphicsitem/customelement.cpp
M    sources/qetgraphicsitem/diagramimageitem.cpp
M    sources/qetgraphicsitem/diagramtextitem.cpp
M    sources/qetgraphicsitem/diagramtextitem.h
M    sources/qetgraphicsitem/element.cpp
M    sources/qetgraphicsitem/ghostelement.cpp
M    sources/qetgraphicsitem/qetshapeitem.cpp
M    sources/qetgraphicsitem/terminal.cpp
M    sources/qetgraphicsitem/terminal.h
M    sources/qeticons.cpp
M    sources/qeticons.h
M    sources/qetmainwindow.cpp
M    sources/qetmessagebox.cpp
M    sources/qetmessagebox.h
M    sources/qetprintpreviewdialog.cpp
M    sources/qetprintpreviewdialog.h
M    sources/qetproject.cpp
M    sources/qetsingleapplication.cpp
M    sources/qettabbar.h
M    sources/qfilenameedit.cpp
M    sources/qtextorientationspinboxwidget.cpp
M    sources/qtextorientationspinboxwidget.h
M    sources/qtextorientationwidget.cpp
M    sources/qtextorientationwidget.h
M    sources/richtext/richtexteditor.cpp
M    sources/richtext/richtexteditor_p.h
M    sources/richtext/ui_addlinkdialog.h
M    sources/titleblock/dimensionwidget.h
M    sources/titleblock/gridlayoutanimation.h
M    sources/titleblock/helpercell.h
M    sources/titleblock/integrationmovetemplateshandler.cpp
M    sources/titleblock/integrationmovetemplateshandler.h
M    sources/titleblock/qettemplateeditor.cpp
M    sources/titleblock/qettemplateeditor.h
M    sources/titleblock/templatecellsset.h
M    sources/titleblock/templatecellwidget.cpp
M    sources/titleblock/templatecellwidget.h
M    sources/titleblock/templatecommands.cpp
M    sources/titleblock/templatedeleter.cpp
M    sources/titleblock/templatedeleter.h
M    sources/titleblock/templatelocationchooser.cpp
M    sources/titleblock/templatelocationchooser.h
M    sources/titleblock/templatelocationsaver.cpp
M    sources/titleblock/templatelocationsaver.h
M    sources/titleblock/templatelogomanager.cpp
M    sources/titleblock/templatelogomanager.h
M    sources/titleblock/templateview.cpp
M    sources/titleblock/templatevisualcell.h
M    sources/titleblockcell.cpp
M    sources/titleblocktemplate.cpp
M    sources/treecoloranimation.h
M    sources/ui/conductorpropertieswidget.cpp
M    sources/ui/diagrampropertiesdialog.cpp
M    sources/ui/diagramselection.cpp
M    sources/ui/dialogautonum.cpp
M    sources/ui/dialogwaiting.cpp
M    sources/ui/elementpropertieswidget.cpp
M    sources/ui/elementselectorwidget.cpp
M    sources/ui/linksingleelementwidget.cpp
M    sources/ui/masterpropertieswidget.cpp
M    sources/ui/potentialtextsdialog.cpp
M    sources/ui/projectpropertiesdialog.cpp
M    sources/ui/selectautonumw.cpp
M    sources/ui/titleblockpropertieswidget.cpp
M    sources/ui/xrefpropertieswidget.cpp
M    sources/undocommand/changeelementinformationcommand.cpp


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3783 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2015-03-02 20:14:56 +00:00
parent 823e4f0570
commit 81c684ca49
164 changed files with 1066 additions and 994 deletions

View File

@@ -52,12 +52,12 @@ ArcEditor::ArcEditor(QETElementEditor *editor, PartArc *arc, QWidget *parent) :
grid -> addWidget(x, 1, 1);
grid -> addWidget(new QLabel("y"), 1, 2);
grid -> addWidget(y, 1, 3);
grid -> addWidget(new QLabel(tr("Diam\350tres : ")), 2, 0);
grid -> addWidget(new QLabel(tr("Diamètres : ")), 2, 0);
grid -> addWidget(new QLabel(tr("horizontal :")), 3, 0);
grid -> addWidget(h, 3, 1);
grid -> addWidget(new QLabel(tr("vertical :")), 4, 0);
grid -> addWidget(v, 4, 1);
grid -> addWidget(new QLabel(tr("Angle de d\351part :")), 5, 0);
grid -> addWidget(new QLabel(tr("Angle de départ :")), 5, 0);
grid -> addWidget(start_angle, 5, 1);
grid -> addWidget(new QLabel(tr("Angle :")), 6, 0);
grid -> addWidget(angle, 6, 1);
@@ -121,13 +121,13 @@ void ArcEditor::updateArc() {
/// Met a jour l'abscisse du centre de l'arc et cree un objet d'annulation
void ArcEditor::updateArcX() { addChangePartCommand(tr("abscisse"), part, "centerX", x -> value()); }
/// Met a jour l'ordonnee du centre de l'arc et cree un objet d'annulation
void ArcEditor::updateArcY() { addChangePartCommand(tr("ordonn\351e"), part, "centerY", y -> value()); }
void ArcEditor::updateArcY() { addChangePartCommand(tr("ordonnée"), part, "centerY", y -> value()); }
/// Met a jour le diametre horizontal de l'arc et cree un objet d'annulation
void ArcEditor::updateArcH() { addChangePartCommand(tr("diam\350tre horizontal"), part, "diameter_h", h -> value()); }
void ArcEditor::updateArcH() { addChangePartCommand(tr("diamètre horizontal"), part, "diameter_h", h -> value()); }
/// Met a jour le diametre vertical de l'arc et cree un objet d'annulation
void ArcEditor::updateArcV() { addChangePartCommand(tr("diam\350tre vertical"), part, "diameter_v", v -> value()); }
void ArcEditor::updateArcV() { addChangePartCommand(tr("diamètre vertical"), part, "diameter_v", v -> value()); }
/// Met a jour l'angle de depart de l'arc et cree un objet d'annulation
void ArcEditor::updateArcS() { addChangePartCommand(tr("angle de d\351part"), part, "startAngle", ((start_angle -> value() * -1) + 90) * 16); }
void ArcEditor::updateArcS() { addChangePartCommand(tr("angle de départ"), part, "startAngle", ((start_angle -> value() * -1) + 90) * 16); }
/// Met a jour l'etendue de l'arc et cree un objet d'annulation
void ArcEditor::updateArcA() { addChangePartCommand(tr("angle"), part, "spanAngle", angle -> value() * -16); }

View File

@@ -17,7 +17,7 @@
*/
#ifndef ARC_EDITOR_H
#define ARC_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class PartArc;
class StyleEditor;

View File

@@ -227,7 +227,7 @@ MovePartsCommand::MovePartsCommand(
const QList<QGraphicsItem *> parts,
QUndoCommand *parent
) :
ElementEditionCommand(QObject::tr("d\351placement", "undo caption"), scene, 0, parent),
ElementEditionCommand(QObject::tr("déplacement", "undo caption"), scene, 0, parent),
movement(m),
first_redo(true)
{
@@ -444,7 +444,7 @@ ChangeZValueCommand::ChangeZValueCommand(
setText(QObject::tr("rapprocher", "undo caption"));
applyRaise(items_list);
} else if (option == Lower) {
setText(QObject::tr("\351loigner", "undo caption"));
setText(QObject::tr("éloigner", "undo caption"));
applyLower(items_list);
} else if (option == SendBackward) {
setText(QObject::tr("envoyer au fond", "undo caption"));
@@ -679,7 +679,7 @@ ChangePropertiesCommand::ChangePropertiesCommand(ElementScene *scene, QString ty
{
m_type << scene->m_elmt_type << type;
m_info << scene->m_elmt_kindInfo << info;
setText(QObject::tr("Modifier les propri\351t\351s"));
setText(QObject::tr("Modifier les propriétés"));
}
ChangePropertiesCommand::~ChangePropertiesCommand() {}

View File

@@ -23,7 +23,7 @@
#include "elementscene.h"
#include "elementcontent.h"
#include "qgimanager.h"
#include <QtGui>
#include <QtWidgets>
/**
* @brief The ElementEditionCommand class

View File

@@ -17,7 +17,7 @@
*/
#ifndef ELEMENT_ITEM_EDITOR_H
#define ELEMENT_ITEM_EDITOR_H
#include <QtGui>
#include <QtWidgets>
class QETElementEditor;
class ElementScene;
class CustomElementPart;

View File

@@ -88,8 +88,10 @@ void ElementPrimitiveDecorator::paint(QPainter *painter, const QStyleOptionGraph
Q_UNUSED(widget)
painter -> save();
// paint the original bounding rect
painter -> setPen(Qt::DashLine);
// paint the original bounding rect
QPen pen(Qt::DashLine);
pen.setCosmetic(true);
painter -> setPen(pen);
//QGraphicsItemGroup::paint(painter, option, widget);
painter -> drawRect(modified_bounding_rect_);
drawSquares(painter, option, widget);

View File

@@ -187,7 +187,9 @@ void ElementScene::drawForeground(QPainter *p, const QRectF &rect) {
p -> setRenderHint(QPainter::TextAntialiasing, true);
p -> setRenderHint(QPainter::SmoothPixmapTransform, false);
p -> setPen(Qt::red);
QPen pen(Qt::red);
pen.setCosmetic(true);
p -> setPen(pen);
p -> setBrush(Qt::NoBrush);
p -> drawLine(-20, 0, 20, 0);
p -> drawLine(0, -20, 0, 20);
@@ -199,14 +201,14 @@ void ElementScene::drawForeground(QPainter *p, const QRectF &rect) {
* Set a new event interface
* @param interface
*/
void ElementScene::setEventInterface(ESEventInterface *interface) {
void ElementScene::setEventInterface(ESEventInterface *event_interface) {
if (m_event_interface) {
delete m_event_interface;
//We must to re-init because previous interface
//Reset his own init when deleted
interface->init();
event_interface->init();
}
m_event_interface = interface;
m_event_interface = event_interface;
}
/**
@@ -530,15 +532,15 @@ void ElementScene::slot_editAuthorInformations() {
// cree un dialogue
QDialog dialog_author(element_editor);
dialog_author.setModal(true);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
dialog_author.setWindowFlags(Qt::Sheet);
#endif
dialog_author.setMinimumSize(400, 260);
dialog_author.setWindowTitle(tr("\311diter les informations sur l'auteur", "window title"));
dialog_author.setWindowTitle(tr("Éditer les informations sur l'auteur", "window title"));
QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog_author);
// ajoute un champ explicatif au dialogue
QLabel *information_label = new QLabel(tr("Vous pouvez utiliser ce champ libre pour mentionner les auteurs de l'\351l\351ment, sa licence, ou tout autre renseignement que vous jugerez utile."));
QLabel *information_label = new QLabel(tr("Vous pouvez utiliser ce champ libre pour mentionner les auteurs de l'élément, sa licence, ou tout autre renseignement que vous jugerez utile."));
information_label -> setAlignment(Qt::AlignJustify | Qt::AlignVCenter);
information_label -> setWordWrap(true);
dialog_layout -> addWidget(information_label);
@@ -586,16 +588,16 @@ void ElementScene::slot_editNames() {
// cree un dialogue
QDialog dialog(element_editor);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
dialog.setWindowFlags(Qt::Sheet);
#endif
dialog.setModal(true);
dialog.setMinimumSize(400, 330);
dialog.setWindowTitle(tr("\311diter les noms", "window title"));
dialog.setWindowTitle(tr("Éditer les noms", "window title"));
QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog);
// ajoute un champ explicatif au dialogue
QLabel *information_label = new QLabel(tr("Vous pouvez sp\351cifier le nom de l'\351l\351ment dans plusieurs langues."));
QLabel *information_label = new QLabel(tr("Vous pouvez spécifier le nom de l'élément dans plusieurs langues."));
information_label -> setAlignment(Qt::AlignJustify | Qt::AlignVCenter);
information_label -> setWordWrap(true);
dialog_layout -> addWidget(information_label);
@@ -792,7 +794,7 @@ bool ElementScene::applyInformations(const QDomDocument &xml_document, QString *
QDomElement root = xml_document.documentElement();
if (root.tagName() != "definition" || root.attribute("type") != "element") {
if (error_message) {
*error_message = tr("Ce document XML n'est pas une d\351finition d'\351l\351ment.", "error message");
*error_message = tr("Ce document XML n'est pas une définition d'élément.", "error message");
}
return(false);
}
@@ -832,7 +834,7 @@ ElementContent ElementScene::loadContent(const QDomDocument &xml_document, QStri
QDomElement root = xml_document.documentElement();
if (root.tagName() != "definition" || root.attribute("type") != "element") {
if (error_message) {
*error_message = tr("Ce document XML n'est pas une d\351finition d'\351l\351ment.", "error message");
*error_message = tr("Ce document XML n'est pas une définition d'élément.", "error message");
}
return(loaded_parts);
}
@@ -968,9 +970,9 @@ void ElementScene::centerElementToOrigine() {
int center_y = qRound(size.center().y());
//define the movement of translation
int move_x = center_x - (qRound(center_x) %10);
int move_x = center_x - (center_x %10);
if (center_x < 0) move_x -= 10;
int move_y = center_y - (qRound(center_y) %10);
int move_y = center_y - (center_y %10);
if (center_y < 0) move_y -= 10;
//move each primitive by @move

View File

@@ -17,7 +17,7 @@
*/
#ifndef ELEMENT_SCENE_H
#define ELEMENT_SCENE_H
#include <QtGui>
#include <QtWidgets>
#include <QtXml>
#include "nameslistwidget.h"
#include "qgimanager.h"
@@ -104,7 +104,7 @@ class ElementScene : public QGraphicsScene {
// methods
public:
void setEventInterface (ESEventInterface *interface);
void setEventInterface (ESEventInterface *event_interface);
QPointF snapToGrid(QPointF point);
void setNames(const NamesList &);
NamesList names() const;

View File

@@ -507,7 +507,9 @@ void ElementView::drawBackground(QPainter *p, const QRectF &r) {
if (draw_grid) {
// draw the dot of the grid
p -> setPen(Qt::black);
QPen pen(Qt::black);
pen.setCosmetic(true);
p -> setPen(pen);
p -> setBrush(Qt::NoBrush);
qreal limite_x = r.x() + r.width();
qreal limite_y = r.y() + r.height();

View File

@@ -49,7 +49,7 @@ EllipseEditor::EllipseEditor(QETElementEditor *editor, PartEllipse *ellipse, QWi
grid -> addWidget(x, 1, 1);
grid -> addWidget(new QLabel("y"), 1, 2);
grid -> addWidget(y, 1, 3);
grid -> addWidget(new QLabel(tr("Diam\350tres : ")), 2, 0);
grid -> addWidget(new QLabel(tr("Diamètres : ")), 2, 0);
grid -> addWidget(new QLabel(tr("horizontal :")), 3, 0);
grid -> addWidget(h, 3, 1);
grid -> addWidget(new QLabel(tr("vertical :")), 4, 0);
@@ -111,11 +111,11 @@ void EllipseEditor::updateEllipse() {
/// Met a jour l'abscisse du centre de l'ellipse et cree un objet d'annulation
void EllipseEditor::updateEllipseX() { addChangePartCommand(tr("abscisse"), part, "centerX", x -> value()); }
/// Met a jour l'ordonnee du centre de l'ellipse et cree un objet d'annulation
void EllipseEditor::updateEllipseY() { addChangePartCommand(tr("ordonn\351e"), part, "centerY", y -> value()); }
void EllipseEditor::updateEllipseY() { addChangePartCommand(tr("ordonnée"), part, "centerY", y -> value()); }
/// Met a jour le diametre horizontal de l'ellipse et cree un objet d'annulation
void EllipseEditor::updateEllipseH() { addChangePartCommand(tr("diam\350tre horizontal"), part, "diameter_h", h -> value()); }
void EllipseEditor::updateEllipseH() { addChangePartCommand(tr("diamètre horizontal"), part, "diameter_h", h -> value()); }
/// Met a jour le diametre vertical de l'ellipse et cree un objet d'annulation
void EllipseEditor::updateEllipseV() { addChangePartCommand(tr("diam\350tre vertical"), part, "diameter_v", v -> value()); }
void EllipseEditor::updateEllipseV() { addChangePartCommand(tr("diamètre vertical"), part, "diameter_v", v -> value()); }
/**
Met a jour le formulaire d'edition

View File

@@ -17,7 +17,7 @@
*/
#ifndef ELLIPSE_EDITOR_H
#define ELLIPSE_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class PartEllipse;
class StyleEditor;

View File

@@ -29,7 +29,8 @@
ESEventAddText::ESEventAddText(ElementScene *scene) :
ESEventInterface(scene)
{
m_text = new PartText(m_editor, 0, m_scene);
m_text = new PartText(m_editor);
m_scene -> addItem(m_text);
m_running = true;
}
@@ -62,7 +63,8 @@ bool ESEventAddText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
m_scene -> undoStack().push(new AddPartCommand(QObject::tr("Texte"), m_scene, m_text));
//Set new text
m_text = new PartText(m_editor, 0, m_scene);
m_text = new PartText(m_editor);
m_scene -> addItem(m_text);
m_text -> setPos(m_scene -> snapToGrid(event -> scenePos()));
return true;

View File

@@ -29,7 +29,8 @@
ESEventAddTextField::ESEventAddTextField(ElementScene *scene) :
ESEventInterface(scene)
{
m_text = new PartTextField(m_editor, 0, m_scene);
m_text = new PartTextField(m_editor);
m_scene -> addItem(m_text);
m_running = true;
}
@@ -62,7 +63,8 @@ bool ESEventAddTextField::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) {
m_scene -> undoStack().push(new AddPartCommand(QObject::tr("Champ texte"), m_scene, m_text));
//Set new text
m_text = new PartTextField(m_editor, 0, m_scene);
m_text = new PartTextField(m_editor);
m_scene -> addItem(m_text);
m_text -> setPos(m_scene -> snapToGrid(event -> scenePos()));
return true;

View File

@@ -109,12 +109,14 @@ void ESEventInterface::updateHelpCross(const QPointF &p) {
pen.setCosmetic(true);
pen.setColor(Qt::darkGray);
if (!m_help_horiz) {
m_help_horiz = new QGraphicsLineItem(-10000, 0, 10000, 0, 0, m_scene);
m_help_horiz = new QGraphicsLineItem(-10000, 0, 10000, 0);
m_help_horiz -> setPen(pen);
m_scene -> addItem(m_help_horiz);
}
if (!m_help_verti) {
m_help_verti = new QGraphicsLineItem(0, -10000, 0, 10000, 0, m_scene);
m_help_verti = new QGraphicsLineItem(0, -10000, 0, 10000);
m_help_verti -> setPen(pen);
m_scene -> addItem(m_help_verti);
}
}

View File

@@ -17,7 +17,7 @@
*/
#ifndef CUSTOM_ELEMENT_PART_H
#define CUSTOM_ELEMENT_PART_H
#include <QtGui>
#include <QtWidgets>
#include <QtXml>
#include <QImage>
#include "qet.h"

View File

@@ -29,11 +29,12 @@
@param scene La scene sur laquelle figure ce texte statique
*/
PartText::PartText(QETElementEditor *editor, QGraphicsItem *parent, ElementScene *scene) :
QGraphicsTextItem(parent, scene),
QGraphicsTextItem(parent),
CustomElementPart(editor),
previous_text(),
decorator_(0)
{
Q_UNUSED(scene)
#if QT_VERSION >= 0x040500
document() -> setDocumentMargin(1.0);
#endif

View File

@@ -17,7 +17,7 @@
*/
#ifndef PART_TEXT_H
#define PART_TEXT_H
#include <QtGui>
#include <QtWidgets>
#include "customelementpart.h"
#include "qetapp.h"
class TextEditor;

View File

@@ -28,13 +28,14 @@
@param scene La scene sur laquelle figure ce champ de texte
*/
PartTextField::PartTextField(QETElementEditor *editor, QGraphicsItem *parent, QGraphicsScene *scene) :
QGraphicsTextItem(parent, scene),
QGraphicsTextItem(parent),
CustomElementPart(editor),
follow_parent_rotations(true),
m_tagg("none"),
previous_text(),
decorator_(0)
{
Q_UNUSED(scene);
setDefaultTextColor(Qt::black);
setFont(QETApp::diagramTextsFont());
real_font_size_ = font().pointSize();

View File

@@ -17,7 +17,7 @@
*/
#ifndef PART_TEXTFIELD_H
#define PART_TEXTFIELD_H
#include <QtGui>
#include <QtWidgets>
#include "customelementpart.h"
#include "qetapp.h"
class TextFieldEditor;

View File

@@ -45,16 +45,16 @@ LineEditor::LineEditor(QETElementEditor *editor, PartLine *line, QWidget *parent
end1_type = new QComboBox();
end1_type -> addItem(QET::Icons::EndLineNone, tr("Normale", "type of the 1st end of a line"), Qet::None );
end1_type -> addItem(QET::Icons::EndLineSimple, tr("Fl\350che simple", "type of the 1st end of a line"), Qet::Simple );
end1_type -> addItem(QET::Icons::EndLineTriangle, tr("Fl\350che triangulaire", "type of the 1st end of a line"), Qet::Triangle);
end1_type -> addItem(QET::Icons::EndLineSimple, tr("Flèche simple", "type of the 1st end of a line"), Qet::Simple );
end1_type -> addItem(QET::Icons::EndLineTriangle, tr("Flèche triangulaire", "type of the 1st end of a line"), Qet::Triangle);
end1_type -> addItem(QET::Icons::EndLineCircle, tr("Cercle", "type of the 1st end of a line"), Qet::Circle );
end1_type -> addItem(QET::Icons::EndLineDiamond, tr("Carr\351", "type of the 1st end of a line"), Qet::Diamond );
end1_type -> addItem(QET::Icons::EndLineDiamond, tr("Carré", "type of the 1st end of a line"), Qet::Diamond );
end2_type = new QComboBox();
end2_type -> addItem(QET::Icons::EndLineNone, tr("Normale", "type of the 2nd end of a line"), Qet::None );
end2_type -> addItem(QET::Icons::EndLineSimple, tr("Fl\350che simple", "type of the 2nd end of a line"), Qet::Simple );
end2_type -> addItem(QET::Icons::EndLineTriangle, tr("Fl\350che triangulaire", "type of the 2nd end of a line"), Qet::Triangle);
end2_type -> addItem(QET::Icons::EndLineSimple, tr("Flèche simple", "type of the 2nd end of a line"), Qet::Simple );
end2_type -> addItem(QET::Icons::EndLineTriangle, tr("Flèche triangulaire", "type of the 2nd end of a line"), Qet::Triangle);
end2_type -> addItem(QET::Icons::EndLineCircle, tr("Cercle", "type of the 2nd end of a line"), Qet::Circle );
end2_type -> addItem(QET::Icons::EndLineDiamond, tr("Carr\351", "type of the 2nd end of a line"), Qet::Diamond );
end2_type -> addItem(QET::Icons::EndLineDiamond, tr("Carré", "type of the 2nd end of a line"), Qet::Diamond );
end1_length = new QDoubleSpinBox();
end2_length = new QDoubleSpinBox();
@@ -151,11 +151,11 @@ void LineEditor::updateLine() {
/// Met a jour l'abscisse du premier point de la ligne et cree un objet d'annulation
void LineEditor::updateLineX1() { addChangePartCommand(tr("abscisse point 1"), part, "p1", editedP1()); }
/// Met a jour l'ordonnee du premier point de la ligne et cree un objet d'annulation
void LineEditor::updateLineY1() { addChangePartCommand(tr("ordonn\351e point 1"), part, "p1", editedP1()); }
void LineEditor::updateLineY1() { addChangePartCommand(tr("ordonnée point 1"), part, "p1", editedP1()); }
/// Met a jour l'abscisse du second point de la ligne et cree un objet d'annulation
void LineEditor::updateLineX2() { addChangePartCommand(tr("abscisse point 2"), part, "p2", editedP2()); }
/// Met a jour l'ordonnee du second point de la ligne et cree un objet d'annulation
void LineEditor::updateLineY2() { addChangePartCommand(tr("ordonn\351e point 2"), part, "p2", editedP2()); }
void LineEditor::updateLineY2() { addChangePartCommand(tr("ordonnée point 2"), part, "p2", editedP2()); }
/// Met a jour le type de la premiere extremite
void LineEditor::updateLineEndType1() { addChangePartCommand(tr("type fin 1"), part, "end1", end1_type -> itemData(end1_type->currentIndex())); }
/// Met a jour la longueur de la premiere extremite

View File

@@ -17,7 +17,7 @@
*/
#ifndef LINE_EDITOR_H
#define LINE_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class PartLine;
class StyleEditor;

View File

@@ -32,7 +32,7 @@ PolygonEditor::PolygonEditor(QETElementEditor *editor, PartPolygon *p, QWidget *
ElementItemEditor(editor, parent),
part(p),
points_list(this),
close_polygon(tr("Polygone ferm\351"), this)
close_polygon(tr("Polygone fermé"), this)
{
style_ = new StyleEditor(editor);
@@ -73,7 +73,7 @@ void PolygonEditor::updatePolygonPoints() {
if (!part) return;
QVector<QPointF> points = getPointsFromTree();
if (points.count() < 2) {
QET::MessageBox::warning(
QET::QetMessageBox::warning(
this,
tr("Erreur", "message box title"),
tr("Le polygone doit comporter au moins deux points.", "message box content")

View File

@@ -66,7 +66,7 @@
QETElementEditor::QETElementEditor(QWidget *parent) :
QETMainWindow(parent),
read_only(false),
min_title(tr("QElectroTech - \311diteur d'\351l\351ment", "window title")),
min_title(tr("QElectroTech - Éditeur d'élément", "window title")),
opened_from_file(false)
{
setWindowTitle(min_title);
@@ -143,19 +143,19 @@ void QETElementEditor::setupActions() {
save_as_file = new QAction(QET::Icons::DocumentSaveAs, tr("Enregistrer dans un fichier"), this);
reload = new QAction(QET::Icons::ViewRefresh, tr("Recharger"), this);
quit = new QAction(QET::Icons::ApplicationExit, tr("&Quitter"), this);
selectall = new QAction(QET::Icons::EditSelectAll, tr("Tout s\351lectionner"), this);
deselectall = new QAction( tr("D\351s\351lectionner tout"), this);
selectall = new QAction(QET::Icons::EditSelectAll, tr("Tout sélectionner"), this);
deselectall = new QAction( tr("Désélectionner tout"), this);
cut = new QAction(QET::Icons::EditCut, tr("Co&uper"), this);
copy = new QAction(QET::Icons::EditCopy, tr("Cop&ier"), this);
paste = new QAction(QET::Icons::EditPaste, tr("C&oller"), this);
paste_in_area = new QAction(QET::Icons::EditPaste, tr("C&oller dans la zone..."), this);
paste_from_file = new QAction(QET::Icons::XmlTextFile, tr("un fichier"), this);
paste_from_elmt = new QAction(QET::Icons::Element, tr("un \351l\351ment"), this);
inv_select = new QAction( tr("Inverser la s\351lection"), this);
paste_from_elmt = new QAction(QET::Icons::Element, tr("un élément"), this);
inv_select = new QAction( tr("Inverser la sélection"), this);
edit_delete = new QAction(QET::Icons::EditDelete, tr("&Supprimer"), this);
edit_names = new QAction(QET::Icons::Names, tr("\311diter le nom et les traductions de l'\351l\351ment"), this);
edit_author = new QAction(QET::Icons::UserInformations, tr("\311diter les informations sur l'auteur"), this);
m_edit_properties = new QAction(QET::Icons::ElementEdit, tr("\311diter les propri\351t\351s de l'\351l\351ment"), this);
edit_names = new QAction(QET::Icons::Names, tr("Éditer le nom et les traductions de l'élément"), this);
edit_author = new QAction(QET::Icons::UserInformations, tr("Éditer les informations sur l'auteur"), this);
m_edit_properties = new QAction(QET::Icons::ElementEdit, tr("Éditer les propriétés de l'élément"), this);
undo = ce_scene -> undoStack().createUndoAction(this, tr("Annuler"));
redo = ce_scene -> undoStack().createRedoAction(this, tr("Refaire"));
@@ -178,7 +178,7 @@ void QETElementEditor::setupActions() {
copy -> setShortcut(QKeySequence::Copy);
paste -> setShortcut(QKeySequence::Paste);
paste_in_area -> setShortcut(tr("Ctrl+Shift+V"));
#ifndef Q_WS_MAC
#ifndef Q_OS_MAC
edit_delete -> setShortcut(QKeySequence(Qt::Key_Delete));
#else
edit_delete -> setShortcut(QKeySequence(tr("Backspace")));
@@ -217,7 +217,7 @@ void QETElementEditor::setupActions() {
QAction *edit_forward = new QAction(QET::Icons::BringForward, tr("Amener au premier plan"), m_depth_ag);
QAction *edit_raise = new QAction(QET::Icons::Raise, tr("Rapprocher"), m_depth_ag);
QAction *edit_lower = new QAction(QET::Icons::Lower, tr("\311loigner"), m_depth_ag);
QAction *edit_lower = new QAction(QET::Icons::Lower, tr("Éloigner"), m_depth_ag);
QAction *edit_backward = new QAction(QET::Icons::SendBackward, tr("Envoyer au fond"), m_depth_ag);
edit_raise -> setShortcut(QKeySequence(tr("Ctrl+Shift+Up")));
@@ -242,8 +242,8 @@ void QETElementEditor::setupActions() {
m_zoom_ag = new QActionGroup(this);
QAction *zoom_in = new QAction(QET::Icons::ZoomIn, tr("Zoom avant"), m_zoom_ag);
QAction *zoom_out = new QAction(QET::Icons::ZoomOut, tr("Zoom arri\350re"), m_zoom_ag);
QAction *zoom_fit = new QAction(QET::Icons::ZoomFitBest, tr("Zoom adapt\351"), m_zoom_ag);
QAction *zoom_out = new QAction(QET::Icons::ZoomOut, tr("Zoom arrière"), m_zoom_ag);
QAction *zoom_fit = new QAction(QET::Icons::ZoomFitBest, tr("Zoom adapté"), m_zoom_ag);
QAction *zoom_reset = new QAction(QET::Icons::ZoomOriginal, tr("Pas de zoom"), m_zoom_ag);
zoom_in -> setShortcut(QKeySequence::ZoomIn);
@@ -295,7 +295,7 @@ void QETElementEditor::setupActions() {
main_toolbar -> setObjectName("main_toolbar");
view_toolbar = new QToolBar(tr("Affichage", "toolbar title"), this);
view_toolbar -> setObjectName("display");
element_toolbar = new QToolBar(tr("\311l\351ment", "toolbar title"), this);
element_toolbar = new QToolBar(tr("Élément", "toolbar title"), this);
element_toolbar -> setObjectName("element_toolbar");
main_toolbar -> addAction(new_element);
@@ -339,7 +339,7 @@ void QETElementEditor::setupActions() {
*/
void QETElementEditor::setupMenus() {
file_menu = new QMenu(tr("&Fichier"), this);
edit_menu = new QMenu(tr("&\311dition"), this);
edit_menu = new QMenu(tr("&Édition"), this);
display_menu = new QMenu(tr("Afficha&ge"), this);
tools_menu = new QMenu(tr("O&utils"), this);
@@ -351,7 +351,7 @@ void QETElementEditor::setupMenus() {
file_menu -> addAction(new_element);
file_menu -> addAction(open);
file_menu -> addAction(open_file);
QMenu *recentfile = file_menu -> addMenu(QET::Icons::DocumentOpenRecent, tr("&R\351cemment ouverts"));
QMenu *recentfile = file_menu -> addMenu(QET::Icons::DocumentOpenRecent, tr("&Récemment ouverts"));
recentfile->addActions(QETApp::elementsRecentFiles()->menu()->actions());
connect(QETApp::elementsRecentFiles(), SIGNAL(fileOpeningRequested(const QString &)), this, SLOT(openRecentFile(const QString &)));
file_menu -> addAction(save);
@@ -462,7 +462,7 @@ void QETElementEditor::slot_updateTitle() {
QString title = min_title;
title += " - " + ce_scene -> names().name() + " ";
if (!filename_.isEmpty() || !location_.isNull()) {
if (!ce_scene -> undoStack().isClean()) title += tr("[Modifi\351]", "window title tag");
if (!ce_scene -> undoStack().isClean()) title += tr("[Modifié]", "window title tag");
}
if (isReadOnly()) title += tr(" [lecture seule]", "window title tag");
setWindowTitle(title);
@@ -542,7 +542,7 @@ void QETElementEditor::setupInterface() {
slot_createPartsList();
// barre d'etat
statusBar() -> showMessage(tr("\311diteur d'\351l\351ments", "status bar message"));
statusBar() -> showMessage(tr("Éditeur d'éléments", "status bar message"));
}
/**
@@ -631,7 +631,7 @@ void QETElementEditor::slot_updateInformations() {
//Else we only display the number of selected items
else
{
default_informations -> setText(tr("%n partie(s) s\351lectionn\351e(s).",
default_informations -> setText(tr("%n partie(s) sélectionnée(s).",
"",
selected_qgis.size()));
default_informations -> setAlignment(Qt::AlignHCenter | Qt::AlignTop);
@@ -644,7 +644,7 @@ void QETElementEditor::slot_updateInformations() {
une boite de dialogue.
*/
void QETElementEditor::xmlPreview() {
QET::MessageBox::information(
QET::QetMessageBox::information(
this,
"Export XML",
ce_scene -> toXml().toString(4)
@@ -670,8 +670,8 @@ bool QETElementEditor::checkElement()
warnings << qMakePair(
tr("Absence de borne", "warning title"),
tr(
"<br>En l'absence de borne, l'\351l\351ment ne pourra \352tre"
" reli\351 \340 d'autres \351l\351ments par l'interm\351diaire de conducteurs.",
"<br>En l'absence de borne, l'élément ne pourra être"
" relié à d'autres éléments par l'intermédiaire de conducteurs.",
"warning description"
)
);
@@ -691,10 +691,10 @@ bool QETElementEditor::checkElement()
if (wrng) {
errors << qMakePair(
tr("Absence de champ texte 'label'", "warning title"),
tr("<br><b>Erreur</b \240> :"
"<br>Les \351l\351ments de type ma\356tres, esclaves, simple et renvoie de folio doivent poss\351der un champ texte comportant le tagg 'label'."
tr("<br><b>Erreur</b > :"
"<br>Les éléments de type maîtres, esclaves, simple et renvoie de folio doivent posséder un champ texte comportant le tagg 'label'."
"<br><b>Solution</b> :"
"<br>Ins\351rer un champ texte et lui attribuer le tagg 'label'", "warning description"));
"<br>Insérer un champ texte et lui attribuer le tagg 'label'", "warning description"));
}
}
@@ -714,16 +714,16 @@ bool QETElementEditor::checkElement()
{
errors << qMakePair (tr("Absence de borne"),
tr("<br><b>Erreur</b> :"
"<br>Les reports de folio doivent poss\351der une seul borne."
"<br>Les reports de folio doivent posséder une seul borne."
"<br><b>Solution</b> :"
"<br>Verifier que l'\351l\351ment ne poss\350de qu'une seul borne"));
"<br>Verifier que l'élément ne possède qu'une seul borne"));
}
}
if (!errors.count() && !warnings.count()) return(true);
// Display warnings
QString dialog_message = tr("La v\351rification de cet \351l\351ment a g\351n\351r\351", "message box content");
QString dialog_message = tr("La vérification de cet élément a généré", "message box content");
if (errors.size())
dialog_message += QString(tr(" %n erreur(s)", "errors", errors.size()));
@@ -742,7 +742,7 @@ bool QETElementEditor::checkElement()
foreach(QETWarning warning, total) {
dialog_message += "<li>";
dialog_message += QString(
tr("<b>%1</b>\240: %2", "warning title: warning description")
tr("<b>%1</b> : %2", "warning title: warning description")
).arg(warning.first).arg(warning.second);
dialog_message += "</li>";
}
@@ -793,7 +793,7 @@ void QETElementEditor::fromFile(const QString &filepath) {
}
if (!state) {
QET::MessageBox::critical(this, tr("Erreur", "toolbar title"), error_message);
QET::QetMessageBox::critical(this, tr("Erreur", "toolbar title"), error_message);
return;
}
@@ -803,10 +803,10 @@ void QETElementEditor::fromFile(const QString &filepath) {
// gestion de la lecture seule
if (!infos_file.isWritable()) {
QET::MessageBox::warning(
QET::QetMessageBox::warning(
this,
tr("\311dition en lecture seule", "message box title"),
tr("Vous n'avez pas les privil\350ges n\351cessaires pour modifier cet \351lement. Il sera donc ouvert en lecture seule.", "message box content")
tr("Édition en lecture seule", "message box title"),
tr("Vous n'avez pas les privilèges nécessaires pour modifier cet élement. Il sera donc ouvert en lecture seule.", "message box content")
);
setReadOnly(true);
} else {
@@ -828,10 +828,10 @@ bool QETElementEditor::toFile(const QString &fn) {
QDomDocument element_xml = ce_scene -> toXml();
bool writing = QET::writeXmlFile(element_xml, fn);
if (!writing) {
QET::MessageBox::warning(
QET::QetMessageBox::warning(
this,
tr("Erreur", "message box title"),
tr("Impossible d'\351crire dans ce fichier", "message box content")
tr("Impossible d'écrire dans ce fichier", "message box content")
);
}
return(writing);
@@ -854,10 +854,10 @@ bool QETElementEditor::toLocation(const ElementsLocation &location) {
}
if (!element) {
QET::MessageBox::critical(
QET::QetMessageBox::critical(
this,
tr("Erreur", "message box title"),
tr("Impossible d'atteindre l'\351l\351ment", "message box content")
tr("Impossible d'atteindre l'élément", "message box content")
);
return(false);
}
@@ -865,10 +865,10 @@ bool QETElementEditor::toLocation(const ElementsLocation &location) {
// enregistre l'element
element -> setXml(ce_scene -> toXml().documentElement());
if (!element -> write()) {
QET::MessageBox::critical(
QET::QetMessageBox::critical(
this,
tr("Erreur", "message box title"),
tr("Impossible d'enregistrer l'\351l\351ment", "message box content")
tr("Impossible d'enregistrer l'élément", "message box content")
);
return(false);
}
@@ -1066,7 +1066,7 @@ void QETElementEditor::openElement(const QString &filepath) {
// we have to test the file existence here because QETApp::openElementFiles()
// will discard non-existent files through QFileInfo::canonicalFilePath()
if (!QFile::exists(filepath)) {
QET::MessageBox::critical(
QET::QetMessageBox::critical(
this,
tr("Impossible d'ouvrir le fichier", "message box title"),
QString(
@@ -1085,10 +1085,10 @@ void QETElementEditor::slot_reload() {
// s'il ya des modifications, on demande a l'utilisateur s'il est certain
// de vouloir recharger
if (!ce_scene -> undoStack().isClean()) {
QMessageBox::StandardButton answer = QET::MessageBox::question(
QMessageBox::StandardButton answer = QET::QetMessageBox::question(
this,
tr("Recharger l'\351l\351ment", "dialog title"),
tr("Vous avez efffectu\351 des modifications sur cet \351l\351ment. Si vous le rechargez, ces modifications seront perdues. Voulez-vous vraiment recharger l'\351l\351ment ?", "dialog content"),
tr("Recharger l'élément", "dialog title"),
tr("Vous avez efffectué des modifications sur cet élément. Si vous le rechargez, ces modifications seront perdues. Voulez-vous vraiment recharger l'élément ?", "dialog content"),
QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel,
QMessageBox::Cancel
);
@@ -1135,7 +1135,7 @@ bool QETElementEditor::slot_save() {
return(result_save);
}
}
QMessageBox::critical(this, tr("Echec de l'enregistrement"), tr("L'enregistrement \340 \351chou\351,\nles conditions requises ne sont pas valides"));
QMessageBox::critical(this, tr("Echec de l'enregistrement"), tr("L'enregistrement à échoué,\nles conditions requises ne sont pas valides"));
return false;
}
@@ -1159,7 +1159,7 @@ bool QETElementEditor::slot_saveAs() {
// retourne un booleen representatif de la reussite de l'enregistrement
return(result_save);
}
QMessageBox::critical(this, tr("Echec de l'enregistrement"), tr("L'enregistrement \340 \351chou\351,\nles conditions requises ne sont pas valides"));
QMessageBox::critical(this, tr("Echec de l'enregistrement"), tr("L'enregistrement à échoué,\nles conditions requises ne sont pas valides"));
return (false);
}
@@ -1175,7 +1175,7 @@ bool QETElementEditor::slot_saveAsFile() {
tr("Enregistrer sous", "dialog title"),
filename_.isEmpty() ? QETApp::customElementsDir() : QDir(filename_).absolutePath(),
tr(
"\311l\351ments QElectroTech (*.elmt)",
"Éléments QElectroTech (*.elmt)",
"filetypes allowed when saving an element file"
)
);
@@ -1194,7 +1194,7 @@ bool QETElementEditor::slot_saveAsFile() {
// retourne un booleen representatif de la reussite de l'enregistrement
return(result_save);
}
QMessageBox::critical(this, tr("Echec de l'enregistrement"), tr("L'enregistrement \340 \351chou\351,\nles conditions requises ne sont pas valides"));
QMessageBox::critical(this, tr("Echec de l'enregistrement"), tr("L'enregistrement à échoué,\nles conditions requises ne sont pas valides"));
return false;
}
@@ -1207,12 +1207,12 @@ bool QETElementEditor::slot_saveAsFile() {
bool QETElementEditor::canClose() {
if (ce_scene -> undoStack().isClean()) return(true);
// demande d'abord a l'utilisateur s'il veut enregistrer l'element en cours
QMessageBox::StandardButton answer = QET::MessageBox::question(
QMessageBox::StandardButton answer = QET::QetMessageBox::question(
this,
tr("Enregistrer l'\351l\351ment en cours ?", "dialog title"),
tr("Enregistrer l'élément en cours ?", "dialog title"),
QString(
tr(
"Voulez-vous enregistrer l'\351l\351ment %1 ?",
"Voulez-vous enregistrer l'élément %1 ?",
"dialog content - %1 is an element name"
)
).arg(ce_scene -> names().name()),
@@ -1310,7 +1310,7 @@ void QETElementEditor::slot_createPartsList() {
}
}
} else {
parts_list -> addItem(new QListWidgetItem(tr("Trop de primitives, liste non g\351n\351r\351e.")));
parts_list -> addItem(new QListWidgetItem(tr("Trop de primitives, liste non générée.")));
}
parts_list -> blockSignals(false);
}
@@ -1404,7 +1404,7 @@ QString QETElementEditor::getOpenElementFileName(QWidget *parent, const QString
tr("Ouvrir un fichier", "dialog title"),
initial_dir.isEmpty() ? QETApp::customElementsDir() : initial_dir,
tr(
"\311l\351ments QElectroTech (*.elmt);;"
"Éléments QElectroTech (*.elmt);;"
"Fichiers XML (*.xml);;"
"Tous les fichiers (*)",
"filetypes allowed when opening an element file"
@@ -1422,19 +1422,19 @@ void QETElementEditor::fromLocation(const ElementsLocation &location) {
ElementsCollectionItem *item = QETApp::collectionItem(location);
ElementDefinition *element = 0;
if (!item) {
QET::MessageBox::critical(
QET::QetMessageBox::critical(
this,
tr("\311l\351ment inexistant.", "message box title"),
tr("L'\351l\351ment n'existe pas.", "message box content")
tr("Élément inexistant.", "message box title"),
tr("L'élément n'existe pas.", "message box content")
);
return;
}
if (!item -> isElement() || !(element = qobject_cast<ElementDefinition *>(item)) || element -> isNull()) {
QET::MessageBox::critical(
QET::QetMessageBox::critical(
this,
tr("\311l\351ment inexistant.", "message box title"),
tr("Le chemin virtuel choisi ne correspond pas \340 un \351l\351ment.", "message box content")
tr("Élément inexistant.", "message box title"),
tr("Le chemin virtuel choisi ne correspond pas à un élément.", "message box content")
);
return;
}
@@ -1450,10 +1450,10 @@ void QETElementEditor::fromLocation(const ElementsLocation &location) {
// gestion de la lecture seule
if (!element -> isWritable()) {
QET::MessageBox::warning(
QET::QetMessageBox::warning(
this,
tr("\311dition en lecture seule", "message box title"),
tr("Vous n'avez pas les privil\350ges n\351cessaires pour modifier cet \351lement. Il sera donc ouvert en lecture seule.", "message box content")
tr("Édition en lecture seule", "message box title"),
tr("Vous n'avez pas les privilèges nécessaires pour modifier cet élement. Il sera donc ouvert en lecture seule.", "message box content")
);
setReadOnly(true);
} else {
@@ -1489,7 +1489,7 @@ void QETElementEditor::pasteFromFile() {
}
if (!error_message.isEmpty()) {
QET::MessageBox::critical(this, tr("Erreur", "toolbar title"), error_message);
QET::QetMessageBox::critical(this, tr("Erreur", "toolbar title"), error_message);
}
copyAndPasteXml(xml_document);
}
@@ -1507,19 +1507,19 @@ void QETElementEditor::pasteFromElement() {
ElementsCollectionItem *item = QETApp::collectionItem(location);
ElementDefinition *element = 0;
if (!item) {
QET::MessageBox::critical(
QET::QetMessageBox::critical(
this,
tr("\311l\351ment inexistant.", "message box title"),
tr("L'\351l\351ment n'existe pas.", "message box content")
tr("Élément inexistant.", "message box title"),
tr("L'élément n'existe pas.", "message box content")
);
return;
}
if (!item -> isElement() || !(element = qobject_cast<ElementDefinition *>(item)) || element -> isNull()) {
QET::MessageBox::critical(
QET::QetMessageBox::critical(
this,
tr("\311l\351ment inexistant.", "message box title"),
tr("Le chemin virtuel choisi ne correspond pas \340 un \351l\351ment.", "message box content")
tr("Élément inexistant.", "message box title"),
tr("Le chemin virtuel choisi ne correspond pas à un élément.", "message box content")
);
return;
}

View File

@@ -17,7 +17,7 @@
*/
#ifndef CUSTOM_ELEMENT_EDITOR_H
#define CUSTOM_ELEMENT_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "qetmainwindow.h"
#include "qet.h"
#include "elementscene.h"

View File

@@ -44,15 +44,15 @@ RectangleEditor::RectangleEditor(QETElementEditor *editor, PartRectangle *rect,
QVBoxLayout *v_layout = new QVBoxLayout(this);
QGridLayout *grid = new QGridLayout();
grid -> addWidget(new QLabel(tr("Coin sup\351rieur gauche\240: ")), 0, 0, 1, 4);
grid -> addWidget(new QLabel(tr("Coin supérieur gauche : ")), 0, 0, 1, 4);
grid -> addWidget(new QLabel("x"), 1, 0, Qt::AlignRight);
grid -> addWidget(x, 1, 1);
grid -> addWidget(new QLabel("y"), 1, 2);
grid -> addWidget(y, 1, 3);
grid -> addWidget(new QLabel(tr("Dimensions\240: ")), 2, 0, 1, 4);
grid -> addWidget(new QLabel(tr("Largeur\240:")), 3, 0);
grid -> addWidget(new QLabel(tr("Dimensions : ")), 2, 0, 1, 4);
grid -> addWidget(new QLabel(tr("Largeur :")), 3, 0);
grid -> addWidget(w, 3, 1);
grid -> addWidget(new QLabel(tr("Hauteur\240:")), 4, 0);
grid -> addWidget(new QLabel(tr("Hauteur :")), 4, 0);
grid -> addWidget(h, 4, 1);
v_layout -> addWidget(style_);
@@ -118,7 +118,7 @@ void RectangleEditor::updateRectangle() {
/// Met a jour l'abscisse du coin superieur gauche du rectangle et cree un objet d'annulation
void RectangleEditor::updateRectangleX() { addChangePartCommand(tr("abscisse"), part, "rectTopLeft", editedTopLeft());}
/// Met a jour l'ordonnee du coin superieur gauche du rectangle et cree un objet d'annulation
void RectangleEditor::updateRectangleY() { addChangePartCommand(tr("ordonn\351e"), part, "rectTopLeft", editedTopLeft());}
void RectangleEditor::updateRectangleY() { addChangePartCommand(tr("ordonnée"), part, "rectTopLeft", editedTopLeft());}
/// Met a jour la largeur du rectangle et cree un objet d'annulation
void RectangleEditor::updateRectangleW() { addChangePartCommand(tr("largeur"), part, "width", w -> value());}
/// Met a jour la hauteur du rectangle et cree un objet d'annulation

View File

@@ -17,7 +17,7 @@
*/
#ifndef RECTANGLE_EDITOR_H
#define RECTANGLE_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class PartRectangle;
class StyleEditor;

View File

@@ -40,7 +40,7 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p,
line_style = new QComboBox(this);
line_style -> addItem(tr("Normal", "element part line style"), CustomElementGraphicPart::NormalStyle);
line_style -> addItem(tr("Tiret", "element part line style"), CustomElementGraphicPart::DashedStyle);
line_style -> addItem(tr("Pointill\351", "element part line style"), CustomElementGraphicPart::DottedStyle);
line_style -> addItem(tr("Pointillé", "element part line style"), CustomElementGraphicPart::DottedStyle);
line_style -> addItem(tr("Traits et points", "element part line style"), CustomElementGraphicPart::DashdottedStyle);
//normal_style -> setChecked(true);
@@ -50,7 +50,7 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p,
size_weight -> addItem(tr("Fine", "element part weight"), CustomElementGraphicPart::ThinWeight);
size_weight -> addItem(tr("Normale", "element part weight"), CustomElementGraphicPart::NormalWeight);
size_weight -> addItem(tr("Forte", "element part weight"), CustomElementGraphicPart::UltraWeight);
size_weight -> addItem(tr("\311lev\351", "element part weight"), CustomElementGraphicPart::BigWeight);
size_weight -> addItem(tr("Élevé", "element part weight"), CustomElementGraphicPart::BigWeight);
// remplissage
filling_color = new QComboBox (this);
@@ -83,14 +83,14 @@ StyleEditor::StyleEditor(QETElementEditor *editor, CustomElementGraphicPart *p,
style_layout -> addWidget(new QLabel(tr("Style : ")), 0, Qt::AlignRight);
style_layout -> addWidget(line_style);
style_layout -> addSpacing(10);
style_layout -> addWidget(new QLabel(tr("\311paisseur : ")), 0, Qt::AlignRight);
style_layout -> addWidget(new QLabel(tr("Épaisseur : ")), 0, Qt::AlignRight);
style_layout -> addWidget(size_weight);
main_layout -> addLayout(style_layout);
main_layout -> addWidget(antialiasing);
main_layout -> addSpacing(10);
main_layout -> addWidget(new QLabel("<u>" + tr("G\351om\351trie :") + "</u> "));
main_layout -> addWidget(new QLabel("<u>" + tr("Géométrie :") + "</u> "));
main_layout -> addStretch();
setLayout(main_layout);
}

View File

@@ -17,7 +17,7 @@
*/
#ifndef STYLE_EDITOR_H
#define STYLE_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class CustomElementGraphicPart;
/**

View File

@@ -115,7 +115,7 @@ void TerminalEditor::updateTerminal() {
/// Met a jour l'abscisse de la position de la borne et cree un objet d'annulation
void TerminalEditor::updateTerminalX() { addChangePartCommand(tr("abscisse"), part, "x", qle_x -> value()); }
/// Met a jour l'ordonnee de la position de la borne et cree un objet d'annulation
void TerminalEditor::updateTerminalY() { addChangePartCommand(tr("ordonn\351e"), part, "y", qle_y -> value()); }
void TerminalEditor::updateTerminalY() { addChangePartCommand(tr("ordonnée"), part, "y", qle_y -> value()); }
/// Met a jour l'orientation de la borne et cree un objet d'annulation
void TerminalEditor::updateTerminalO() { addChangePartCommand(tr("orientation"), part, "orientation", orientation -> itemData(orientation -> currentIndex())); }
/// update Number and name, create cancel object

View File

@@ -17,7 +17,7 @@
*/
#ifndef TERMINAL_EDITOR_H
#define TERMINAL_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class PartTerminal;
/**

View File

@@ -134,7 +134,7 @@ void TextEditor::updateText() {
/// Met a jour l'abscisse de la position du texte et cree un objet d'annulation
void TextEditor::updateTextX() { addChangePartCommand(tr("abscisse"), part, "x", qle_x -> value()); }
/// Met a jour l'ordonnee de la position du texte et cree un objet d'annulation
void TextEditor::updateTextY() { addChangePartCommand(tr("ordonn\351e"), part, "y", qle_y -> value()); }
void TextEditor::updateTextY() { addChangePartCommand(tr("ordonnée"), part, "y", qle_y -> value()); }
/// Met a jour le texte et cree un objet d'annulation
void TextEditor::updateTextT() { addChangePartCommand(tr("contenu"), part, "text", qle_text -> text()); }
/// Met a jour la taille du texte et cree un objet d'annulation

View File

@@ -17,7 +17,7 @@
*/
#ifndef TEXT_EDITOR_H
#define TEXT_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class PartText;
class QTextOrientationSpinBoxWidget;

View File

@@ -34,9 +34,9 @@ TextFieldEditor::TextFieldEditor(QETElementEditor *editor, PartTextField *textfi
qle_text = new QLineEdit();
font_size = new QSpinBox();
font_size -> setRange(0, 144);
rotate = new QCheckBox(tr("Ne pas subir les rotations de l'\351l\351ment parent"));
rotate = new QCheckBox(tr("Ne pas subir les rotations de l'élément parent"));
rotate -> setChecked(true);
QLabel *rotation_angle_label = new QLabel(tr("Angle de rotation par d\351faut : "));
QLabel *rotation_angle_label = new QLabel(tr("Angle de rotation par défaut : "));
rotation_angle_label -> setWordWrap(true);
rotation_angle_ = QETApp::createTextOrientationSpinBoxWidget();
@@ -59,7 +59,7 @@ TextFieldEditor::TextFieldEditor(QETElementEditor *editor, PartTextField *textfi
main_layout -> addLayout(fs);
QHBoxLayout *t = new QHBoxLayout();
t -> addWidget(new QLabel(tr("Texte par d\351faut : ")));
t -> addWidget(new QLabel(tr("Texte par défaut : ")));
t -> addWidget(qle_text);
main_layout -> addLayout(t);
@@ -133,13 +133,13 @@ void TextFieldEditor::updateTextField() {
/// Met a jour l'abscisse de la position du champ de texte et cree un objet d'annulation
void TextFieldEditor::updateTextFieldX() { addChangePartCommand(tr("abscisse"), part, "x", qle_x -> value()); }
/// Met a jour l'ordonnee de la position du champ de texte et cree un objet d'annulation
void TextFieldEditor::updateTextFieldY() { addChangePartCommand(tr("ordonn\351e"), part, "y", qle_y -> value()); }
void TextFieldEditor::updateTextFieldY() { addChangePartCommand(tr("ordonnée"), part, "y", qle_y -> value()); }
/// Met a jour le texte du champ de texte et cree un objet d'annulation
void TextFieldEditor::updateTextFieldT() { addChangePartCommand(tr("contenu"), part, "text", qle_text -> text()); }
/// Met a jour la taille du champ de texte et cree un objet d'annulation
void TextFieldEditor::updateTextFieldS() { addChangePartCommand(tr("taille"), part, "size", font_size -> value()); }
/// Met a jour la taille du champ de texte et cree un objet d'annulation
void TextFieldEditor::updateTextFieldR() { addChangePartCommand(tr("propri\351t\351"), part, "rotate", !rotate -> isChecked()); }
void TextFieldEditor::updateTextFieldR() { addChangePartCommand(tr("propriété"), part, "rotate", !rotate -> isChecked()); }
/// Met a jour l'angle de rotation du champ de texte et cree un objet d'annulation
void TextFieldEditor::updateTextFieldRotationAngle() { addChangePartCommand(tr("angle de rotation"), part, "rotation_angle", rotation_angle_ -> value()); }
void TextFieldEditor::updateTagg() { addChangePartCommand(tr("tagg"), part, "tagg", m_tagg_cb->itemData(m_tagg_cb->currentIndex()).toString());}

View File

@@ -17,7 +17,7 @@
*/
#ifndef TEXTFIELD_EDITOR_H
#define TEXTFIELD_EDITOR_H
#include <QtGui>
#include <QtWidgets>
#include "elementitemeditor.h"
class PartTextField;
class QTextOrientationSpinBoxWidget;

View File

@@ -71,20 +71,20 @@ void ElementPropertiesEditorWidget::upDateInterface() {
void ElementPropertiesEditorWidget::setUpInterface() {
// Type combo box
ui -> m_base_type_cb -> addItem (tr("Simple"), QVariant("simple"));
ui -> m_base_type_cb -> addItem (tr("Ma\356tre"), QVariant("master"));
ui -> m_base_type_cb -> addItem (tr("Maître"), QVariant("master"));
ui -> m_base_type_cb -> addItem (tr("Esclave"), QVariant("slave"));
ui -> m_base_type_cb -> addItem (tr("Renvoi de folio suivant"), QVariant("next_report"));
ui -> m_base_type_cb -> addItem (tr("Renvoi de folio pr\351c\351dent"), QVariant("previous_report"));
ui -> m_base_type_cb -> addItem (tr("Renvoi de folio précédent"), QVariant("previous_report"));
ui -> m_base_type_cb -> addItem (tr("Bornier"), QVariant("terminal"));
// Slave option
ui -> m_state_cb -> addItem(tr("Normalement ouvert"), QVariant("NO"));
ui -> m_state_cb -> addItem(tr("Normalement ferm\351"), QVariant("NC"));
ui -> m_state_cb -> addItem(tr("Normalement fermé"), QVariant("NC"));
ui -> m_state_cb -> addItem(tr("Inverseur"), QVariant("SW"));
ui -> m_type_cb -> addItem(tr("Simple"), QVariant("simple"));
ui -> m_type_cb -> addItem(tr("Puissance"), QVariant("power"));
ui -> m_type_cb -> addItem(tr("Temporis\351 travail"), QVariant("delayOn"));
ui -> m_type_cb -> addItem(tr("Temporis\351 repos"), QVariant("delayOff"));
ui -> m_type_cb -> addItem(tr("Temporisé travail"), QVariant("delayOn"));
ui -> m_type_cb -> addItem(tr("Temporisé repos"), QVariant("delayOff"));
//Master option
ui -> m_master_type_cb -> addItem(tr("Bobine"), QVariant("coil"));