diff --git a/sources/aboutqet.cpp b/sources/aboutqet.cpp index a82622ebd..095249cb6 100644 --- a/sources/aboutqet.cpp +++ b/sources/aboutqet.cpp @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with QElectroTech. If not, see . */ -#include +#include #include "qettabwidget.h" #include "aboutqet.h" #include "qet.h" @@ -27,14 +27,14 @@ */ AboutQET::AboutQET(QWidget *parent) : QDialog(parent) { // Titre, taille, comportement... - setWindowTitle(tr("\300 propos de QElectrotech", "window title")); + setWindowTitle(tr("À propos de QElectrotech", "window title")); setMinimumWidth(680); setMinimumHeight(690); setModal(true); // Trois onglets QETTabWidget *tabs = new QETTabWidget(this); - tabs -> addTab(aboutTab(), tr("\300 &propos", "tab title")); + tabs -> addTab(aboutTab(), tr("À &propos", "tab title")); tabs -> addTab(authorsTab(), tr("A&uteurs", "tab title")); tabs -> addTab(translatorsTab(), tr("&Traducteurs", "tab title")); tabs -> addTab(contributorsTab(), tr("&Contributeurs", "tab title")); @@ -91,13 +91,13 @@ QWidget *AboutQET::title() const { */ QWidget *AboutQET::aboutTab() const { QLabel *about = new QLabel( - tr("QElectroTech, une application de r\351alisation de sch\351mas \351lectriques.", "about tab, description line") + + tr("QElectroTech, une application de réalisation de schémas électriques.", "about tab, description line") + "

" + - tr("\251 2006-2014 Les d\351veloppeurs de QElectroTech", "about tab, developers line") + + tr("2006-2015 Les développeurs de QElectroTech", "about tab, developers line") + "

" "http://qelectrotech.org/" "

" + - tr("Contact\240: qet@lists.tuxfamily.org", "about tab, contact line") + tr("Contact : qet@lists.tuxfamily.org", "about tab, contact line") ); about -> setAlignment(Qt::AlignCenter); about -> setOpenExternalLinks(true); @@ -110,10 +110,10 @@ QWidget *AboutQET::aboutTab() const { */ QWidget *AboutQET::authorsTab() const { QLabel *authors = new QLabel(); - addAuthor(authors, "Beno\356t Ansieau", "benoit@qelectrotech.org", tr("Id\351e originale")); - addAuthor(authors, "Laurent Trinques", "scorpio@qelectrotech.org", tr("D\351veloppement")); - addAuthor(authors, "Joshua Claveau", "Joshua@qelectrotech.org", tr("D\351veloppement")); - addAuthor(authors, "Abhishek Bansal", "abhishek@qelectrotech.org", tr("D\351veloppement")); + addAuthor(authors, "Benoît Ansieau", "benoit@qelectrotech.org", tr("Idée originale")); + addAuthor(authors, "Laurent Trinques", "scorpio@qelectrotech.org", tr("Développement")); + addAuthor(authors, "Joshua Claveau", "Joshua@qelectrotech.org", tr("Développement")); + addAuthor(authors, "Abhishek Bansal", "abhishek@qelectrotech.org", tr("Développement")); authors -> setOpenExternalLinks(true); @@ -133,8 +133,8 @@ QWidget *AboutQET::translatorsTab() const { addAuthor(translators, "Alfredo Carreto", "electronicos_mx@yahoo.com.mx",tr("Traduction en espagnol")); addAuthor(translators, "Yuriy Litkevich", "yuriy@qelectrotech.org", tr("Traduction en russe")); - addAuthor(translators, "Jos\351 Carlos Martins", "jose@qelectrotech.org", tr("Traduction en portugais")); - addAuthor(translators, "Pavel Fric", "pavelfric@seznam.cz", tr("Traduction en tch\350que")); + addAuthor(translators, "José Carlos Martins", "jose@qelectrotech.org", tr("Traduction en portugais")); + addAuthor(translators, "Pavel Fric", "pavelfric@seznam.cz", tr("Traduction en tchèque")); addAuthor(translators, "Paweł Śmiech", "pawel32640@gmail.com", tr("Traduction en polonais")); addAuthor(translators, "Markus Budde", "markus.budde@msn.com", tr("Traduction en allemand")); addAuthor(translators, "Jonas Stein", "news@jonasstein.de", tr("Traduction en allemand")); @@ -145,10 +145,10 @@ QWidget *AboutQET::translatorsTab() const { addAuthor(translators, "Silvio", "silvio@qelectrotech.org", tr("Traduction en italien")); addAuthor(translators, "Mohamed Souabni", "souabnimohamed@yahoo.fr", tr("Traduction en arabe")); addAuthor(translators, "Antun Maraković", "antun.marakovic@lolaribar.hr",tr("Traduction en croate")); - addAuthor(translators, "Eduard Amor\363s", "amoros@marmenuda.com", tr("Traduction en catalan")); + addAuthor(translators, "Eduard Amorós", "amoros@marmenuda.com", tr("Traduction en catalan")); addAuthor(translators, "Nikos Papadopoylos", "231036448@freemail.gr", tr("Traduction en grec")); addAuthor(translators, "Yannis Gyftomitros", "yang@hellug.gr", tr("Traduction en grec")); - addAuthor(translators, "Paul Van Deelen", "shooter@home.nl", tr("Traduction en n\351erlandais")); + addAuthor(translators, "Paul Van Deelen", "shooter@home.nl", tr("Traduction en néerlandais")); addAuthor(translators, "Ronny Desmedt", "r.desmedt@live.be", tr("Traduction en flamand")); @@ -178,12 +178,12 @@ QWidget *AboutQET::contributorsTab() const { addAuthor(contributors, "zloidemon", "", tr("Paquets FreeBSD")); addAuthor(contributors, "Yoann Varenne", "yoann@tuxfamily.org", tr("Paquets MAC OS X")); addAuthor(contributors, "Chipsterjulien", "", tr("Paquets Archlinux AUR")); - addAuthor(contributors, "Nuno Pinheiro", "nuno@nuno-icons.com", tr("Ic\364nes")); - addAuthor(contributors, "Cyril Frausti", "cyril@qelectrotech.org", tr("D\351veloppement")); + addAuthor(contributors, "Nuno Pinheiro", "nuno@nuno-icons.com", tr("Icônes")); + addAuthor(contributors, "Cyril Frausti", "cyril@qelectrotech.org", tr("Développement")); addAuthor(contributors, "Arun Kishore Eswara", "eswara.arun@gmail.com", tr("Documentation")); - addAuthor(contributors, "Ren\351 Negre", "runsys@qelectrotech.org", tr("D\351veloppement")); - addAuthor(contributors, "Ronny Desmedt", "r.desmedt@live.be", tr("D\351veloppement")); - addAuthor(contributors, "Nuri", "nuri@qelectrotech.org", tr("Collection d'\351l\351ments")); + addAuthor(contributors, "René Negre", "runsys@qelectrotech.org", tr("Développement")); + addAuthor(contributors, "Ronny Desmedt", "r.desmedt@live.be", tr("Développement")); + addAuthor(contributors, "Nuri", "nuri@qelectrotech.org", tr("Collection d'éléments")); contributors -> setOpenExternalLinks(true); diff --git a/sources/bordertitleblock.cpp b/sources/bordertitleblock.cpp index 3dede5cf4..0c08e93cd 100644 --- a/sources/bordertitleblock.cpp +++ b/sources/bordertitleblock.cpp @@ -680,7 +680,7 @@ QString BorderTitleBlock::incrementLetters(const QString &string) { QChar last_digit(string.at(string.count() - 1)); if (last_digit != 'Z') { // incremente le dernier digit - last_digit = last_digit.toAscii() + 1; + last_digit = last_digit.toLatin1() + 1; return(first_digits + QString(last_digit)); } else { return(incrementLetters(first_digits) + "A"); diff --git a/sources/conductorproperties.h b/sources/conductorproperties.h index 45744b26c..f8f5f56d0 100644 --- a/sources/conductorproperties.h +++ b/sources/conductorproperties.h @@ -18,7 +18,7 @@ #ifndef CONDUCTOR_PROPERTIES_H #define CONDUCTOR_PROPERTIES_H #include "qet.h" -#include +#include #include /** This class represents the properties of a singleline conductor. diff --git a/sources/configdialog.cpp b/sources/configdialog.cpp index 71e283335..cc92014f2 100644 --- a/sources/configdialog.cpp +++ b/sources/configdialog.cpp @@ -54,7 +54,7 @@ ConfigDialog::ConfigDialog(QWidget *parent) : QDialog(parent) { connect(buttons, SIGNAL(rejected()), this, SLOT(reject())); connect(pages_list, SIGNAL(currentRowChanged(int)), pages_widget, SLOT(setCurrentIndex(int))); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC if (parent) { setWindowFlags(Qt::Sheet); } diff --git a/sources/configpages.cpp b/sources/configpages.cpp index ac4e891e3..878ed268a 100644 --- a/sources/configpages.cpp +++ b/sources/configpages.cpp @@ -69,10 +69,10 @@ NewDiagramPage::NewDiagramPage(QETProject *project, QWidget *parent) : diagram_layout -> addWidget(bpw); diagram_layout -> addWidget(ipw); - tab_widget -> addTab (diagram_widget, tr("Sch\351ma")); + tab_widget -> addTab (diagram_widget, tr("Schéma")); tab_widget -> addTab (cpw, tr("Conducteur")); tab_widget -> addTab (rpw, tr("Reports de folio")); - tab_widget -> addTab (xrefpw, tr("R\351f\351rences crois\351es")); + tab_widget -> addTab (xrefpw, tr("Références croisées")); QVBoxLayout *vlayout1 = new QVBoxLayout(); vlayout1->addWidget(tab_widget); @@ -169,7 +169,7 @@ QIcon NewDiagramPage::icon() const { * @return title of this page */ QString NewDiagramPage::title() const { - if (m_project) return(tr("Nouveau sch\351ma", "configuration page title")); + if (m_project) return(tr("Nouveau schéma", "configuration page title")); return(tr("Nouveau projet", "configuration page title")); } @@ -190,21 +190,21 @@ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) : ConfigPage QString default_element_informations = settings.value("elementeditor/default-informations", "").toString(); appearance_ = new QGroupBox(tr("Apparence"), this); - use_system_colors_ = new QCheckBox(tr("Utiliser les couleurs du syst\350me"), appearance_); + use_system_colors_ = new QCheckBox(tr("Utiliser les couleurs du système"), appearance_); projects_view_mode_ = new QGroupBox(tr("Projets"), this); - windowed_mode_ = new QRadioButton(tr("Utiliser des fen\352tres"), projects_view_mode_); + windowed_mode_ = new QRadioButton(tr("Utiliser des fenêtres"), projects_view_mode_); tabbed_mode_ = new QRadioButton(tr("Utiliser des onglets"), projects_view_mode_); - use_trackpad_ = new QCheckBox(tr("Utiliser les gestes du pav\351 tactile"), projects_view_mode_); - warning_view_mode_ = new QLabel(tr("Ces param\350tres s'appliqueront d\350s la prochaine ouverture d'un \351diteur de sch\351mas.")); + use_trackpad_ = new QCheckBox(tr("Utiliser les gestes du pavé tactile"), projects_view_mode_); + warning_view_mode_ = new QLabel(tr("Ces paramètres s'appliqueront dès la prochaine ouverture d'un éditeur de schémas.")); - elements_management_ = new QGroupBox(tr("Gestion des \351l\351ments"), this); - integrate_elements_ = new QCheckBox(tr("Int\351grer automatiquement les \351l\351ments dans les projets (recommand\351)")); - highlight_integrated_elements_ = new QCheckBox(tr("Mettre en valeur dans le panel les \351l\351ments fra\356chement int\351gr\351s", "configuration option")); + elements_management_ = new QGroupBox(tr("Gestion des éléments"), this); + integrate_elements_ = new QCheckBox(tr("Intégrer automatiquement les éléments dans les projets (recommandé)")); + highlight_integrated_elements_ = new QCheckBox(tr("Mettre en valeur dans le panel les éléments fraîchement intégrés", "configuration option")); default_element_infos_label_ = new QLabel( tr( - "Chaque \351l\351ment embarque des informations sur ses auteurs, sa licence, ou tout autre renseignement que vous jugerez utile dans un champ libre. " - "Vous pouvez sp\351cifier ici la valeur par d\351faut de ce champ pour les \351l\351ments que vous cr\351erez :" + "Chaque élément embarque des informations sur ses auteurs, sa licence, ou tout autre renseignement que vous jugerez utile dans un champ libre. " + "Vous pouvez spécifier ici la valeur par défaut de ce champ pour les éléments que vous créerez :" ) ); default_element_infos_label_ -> setWordWrap(true); @@ -306,7 +306,7 @@ QIcon GeneralConfigurationPage::icon() const { /// @return le titre de cette page QString GeneralConfigurationPage::title() const { - return(tr("G\351n\351ral", "configuration page title")); + return(tr("Général", "configuration page title")); } /** @@ -314,25 +314,25 @@ QString GeneralConfigurationPage::title() const { * fill all available lang in @lang_combo_box */ void GeneralConfigurationPage::fillLang(QSettings &settings) { - lang_combo_box->addItem(QET::Icons::translation, tr("Syst\350me"), "system"); + lang_combo_box->addItem(QET::Icons::translation, tr("Système"), "system"); lang_combo_box->insertSeparator(1); // all lang available on lang directory lang_combo_box->addItem(QET::Icons::ar, tr("Arabe"), "ar"); lang_combo_box->addItem(QET::Icons::catalonia, tr("Catalan"), "ca"); - lang_combo_box->addItem(QET::Icons::cs, tr("Tch\350que"), "cs"); + lang_combo_box->addItem(QET::Icons::cs, tr("Tchèque"), "cs"); lang_combo_box->addItem(QET::Icons::de, tr("Allemand"), "de"); lang_combo_box->addItem(QET::Icons::gr, tr("Grec"), "el"); lang_combo_box->addItem(QET::Icons::en, tr("Anglais"), "en"); lang_combo_box->addItem(QET::Icons::es, tr("Espagnol"), "es"); - lang_combo_box->addItem(QET::Icons::fr, tr("Fran\347ais"), "fr"); + lang_combo_box->addItem(QET::Icons::fr, tr("Français"), "fr"); lang_combo_box->addItem(QET::Icons::hr, tr("Croate"), "hr"); lang_combo_box->addItem(QET::Icons::it, tr("Italien"), "it"); lang_combo_box->addItem(QET::Icons::pl, tr("Polonais"), "pl"); lang_combo_box->addItem(QET::Icons::pt, tr("Portugais"), "pt"); lang_combo_box->addItem(QET::Icons::ro, tr("Roumains"), "ro"); lang_combo_box->addItem(QET::Icons::ru, tr("Russe"), "ru"); - lang_combo_box->addItem(QET::Icons::sl, tr("Slov\350ne"), "sl"); + lang_combo_box->addItem(QET::Icons::sl, tr("Slovène"), "sl"); lang_combo_box->addItem(QET::Icons::nl, tr("Pays-Bas"), "nl"); lang_combo_box->addItem(QET::Icons::be, tr("Belgique-Flemish"), "be"); diff --git a/sources/configpages.h b/sources/configpages.h index 4c18bdbaf..97a472d7d 100644 --- a/sources/configpages.h +++ b/sources/configpages.h @@ -17,7 +17,7 @@ */ #ifndef CONFIG_PAGES_H #define CONFIG_PAGES_H -#include +#include #include "configpage.h" class BorderPropertiesWidget; class ConductorPropertiesWidget; diff --git a/sources/createdxf.h b/sources/createdxf.h index f3cea2728..4ee893e03 100644 --- a/sources/createdxf.h +++ b/sources/createdxf.h @@ -19,7 +19,7 @@ #define CREATEDXF_H #include #include -#include +#include /* This class exports the project to DXF Format */ diff --git a/sources/diagram.cpp b/sources/diagram.cpp index 39eb42578..37695fa7a 100644 --- a/sources/diagram.cpp +++ b/sources/diagram.cpp @@ -59,14 +59,16 @@ Diagram::Diagram(QETProject *project) : setProject(project); qgi_manager_ = new QGIManager(this); setBackgroundBrush(Qt::white); - conductor_setter_ = new QGraphicsLineItem(0, 0); + conductor_setter_ = new QGraphicsLineItem(0); conductor_setter_ -> setZValue(1000000); - QPen t; - t.setColor(Qt::black); - t.setWidthF(1.5); - t.setStyle(Qt::DashLine); - conductor_setter_ -> setPen(t); - conductor_setter_ -> setLine(QLineF(QPointF(0.0, 0.0), QPointF(0.0, 0.0))); +// QPen t; +// t.setColor(Qt::black); +// t.setWidthF(1.5); +// t.setStyle(Qt::DashLine); + QPen pen(Qt::NoBrush, 1.5, Qt::DashLine); + pen.setColor(Qt::black); + conductor_setter_ -> setPen(pen); + //conductor_setter_ -> setLine(QLineF(QPointF(0.0, 0.0), QPointF(0.0, 0.0))); //Init object for manage movement elements_mover_ = new ElementsMover(); @@ -123,12 +125,13 @@ void Diagram::drawBackground(QPainter *p, const QRectF &r) { p -> drawRect(r); if (draw_grid_) { - // dessine les points de la grille - // if background color is black, then grid spots shall be white, else they shall be black in color. - if (Diagram::background_color == Qt::black) - p -> setPen(Qt::white); - else - p -> setPen(Qt::black); + //Draw the point of the grid + // if background color is black, then grid spots shall be white, else they shall be black in color. + QPen pen; + Diagram::background_color == Qt::black? pen.setColor(Qt::white) : pen.setColor(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(); diff --git a/sources/diagram.h b/sources/diagram.h index f0f977f89..5cfbedadf 100644 --- a/sources/diagram.h +++ b/sources/diagram.h @@ -17,7 +17,7 @@ */ #ifndef DIAGRAM_H #define DIAGRAM_H -#include +#include #include #include #include "bordertitleblock.h" diff --git a/sources/diagramcommands.cpp b/sources/diagramcommands.cpp index 3cf3f0418..a0f605546 100644 --- a/sources/diagramcommands.cpp +++ b/sources/diagramcommands.cpp @@ -316,7 +316,7 @@ MoveElementsCommand::MoveElementsCommand( setText( QString( QObject::tr( - "d\351placer %1", + "déplacer %1", "undo caption - %1 is a sentence listing the moved content" ).arg(moved_content_sentence) ) @@ -432,7 +432,7 @@ MoveElementsTextsCommand::MoveElementsTextsCommand( setText( QString( QObject::tr( - "d\351placer %1", + "déplacer %1", "undo caption - %1 is a sentence listing the moved content" ).arg(moved_content_sentence) ) @@ -546,7 +546,7 @@ void MoveConductorsTextsCommand::regenerateTextLabel() { setText( QString( QObject::tr( - "d\351placer %1", + "déplacer %1", "undo caption - %1 is a sentence listing the moved content" ).arg(moved_content_sentence) ) @@ -733,7 +733,7 @@ void RotateTextsCommand::defineCommandName() { setText( QString( QObject::tr( - "orienter %1 \340 %2\260", + "orienter %1 à %2°", "undo caption - %1 looks like '42 texts', %2 is a rotation angle" ) ).arg(QET::ElementsAndConductorsSentence(0, 0, texts_to_rotate.count())) @@ -814,7 +814,7 @@ ResetConductorCommand::ResetConductorCommand( { setText( QObject::tr( - "R\351initialiser %1", + "Réinitialiser %1", "undo caption - %1 is a sentence listing the reset content" ).arg(QET::ElementsAndConductorsSentence(0, cp.count())) ); @@ -894,7 +894,7 @@ void ChangeTitleBlockCommand::redo() { @param parent QUndoCommand parent */ ChangeBorderCommand::ChangeBorderCommand(Diagram *dia, const BorderProperties &old_bp, const BorderProperties &new_bp, QUndoCommand *parent) : - QUndoCommand(QObject::tr("modifier les dimensions du sch\351ma", "undo caption"), parent), + QUndoCommand(QObject::tr("modifier les dimensions du schéma", "undo caption"), parent), diagram(dia), old_properties(old_bp), new_properties(new_bp) @@ -923,7 +923,7 @@ void ChangeBorderCommand::redo() { @param parent QUndoCommand parent */ ChangeConductorPropertiesCommand::ChangeConductorPropertiesCommand(Conductor *c, QUndoCommand *parent) : - QUndoCommand(QObject::tr("modifier les propri\351t\351s d'un conducteur", "undo caption"), parent), + QUndoCommand(QObject::tr("modifier les propriétés d'un conducteur", "undo caption"), parent), conductor(c), old_settings_set(false), new_settings_set(false) @@ -976,7 +976,7 @@ void ChangeConductorPropertiesCommand::redo() { @param parent QUndoCommand parent */ ChangeSeveralConductorsPropertiesCommand::ChangeSeveralConductorsPropertiesCommand(QListc, QUndoCommand *parent) : - QUndoCommand(QObject::tr("modifier les propri\351t\351s de plusieurs conducteurs", "undo caption"), parent), + QUndoCommand(QObject::tr("modifier les propriétés de plusieurs conducteurs", "undo caption"), parent), conductors(c), old_settings_set(false), new_settings_set(false) @@ -1091,8 +1091,8 @@ void ItemResizerCommand::undo() { */ void ItemResizerCommand::redo() { diagram -> showMe(); - if (old_size setScale(new_size); QUndoCommand::redo(); } @@ -1158,7 +1158,7 @@ LinkElementsCommand::LinkElementsCommand(Element *elmt1, Element *elmt2, QUndoCo "title for undo LinkElementsCommand if two elements are folio report")); } else if (element_->linkType() & (Element::Master|Element::Slave)) - setText(QObject::tr("Editer les r\351f\351rence crois\351", "edite the cross reference")); + setText(QObject::tr("Editer les référence croisé", "edite the cross reference")); else setText(QObject::tr("Lier deux éléments")); previous_linked = elmt1->linkedElements(); @@ -1172,7 +1172,7 @@ LinkElementsCommand::LinkElementsCommand(Element *elmt1, QList &elmtL first_redo(true) { if (element_->linkType() & (Element::Master|Element::Slave)) - setText(QObject::tr("Editer les r\351f\351rence crois\351")); + setText(QObject::tr("Editer les référence croisé")); else setText(QObject::tr("Lier deux éléments")); previous_linked = elmt1->linkedElements(); } @@ -1233,7 +1233,7 @@ unlinkElementsCommand::unlinkElementsCommand(Element *elmt1, Element *elmt2, QUn { if (elmt2) elmt_list << elmt2; else elmt_list << elmt1->linkedElements(); - setText(QObject::tr("D\351lier %n \351l\351ment(s)", "", elmt_list.size())); + setText(QObject::tr("Délier %n élément(s)", "", elmt_list.size())); } /** @@ -1248,7 +1248,7 @@ unlinkElementsCommand::unlinkElementsCommand(Element *elmt1, QList &e element_(elmt1), elmt_list(elmtList) { - setText(QObject::tr("D\351lier %n \351l\351ment(s)", "", elmt_list.size())); + setText(QObject::tr("Délier %n élément(s)", "", elmt_list.size())); } /** diff --git a/sources/diagramcommands.h b/sources/diagramcommands.h index 2ac05d41d..c0b4e3009 100644 --- a/sources/diagramcommands.h +++ b/sources/diagramcommands.h @@ -17,7 +17,7 @@ */ #ifndef DIAGRAM_COMMANDS_H #define DIAGRAM_COMMANDS_H -#include +#include #include "borderproperties.h" #include "qetgraphicsitem/conductor.h" #include "conductorproperties.h" diff --git a/sources/diagramprintdialog.cpp b/sources/diagramprintdialog.cpp index d277367ca..539ee963d 100644 --- a/sources/diagramprintdialog.cpp +++ b/sources/diagramprintdialog.cpp @@ -24,6 +24,9 @@ #include "qeticons.h" #include "qetmessagebox.h" +#include +#include + /** Constructeur @param project Schema a imprimer @@ -119,24 +122,31 @@ void DiagramPrintDialog::exec() { if (printer_choice_ -> isChecked()) { // affichage du dialogue d'impression standard pour parametrer l'imprimante QPrintDialog print_dialog(printer_, parentWidget()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC print_dialog.setWindowFlags(Qt::Sheet); #endif print_dialog.setWindowTitle(tr("Options d'impression", "window title")); print_dialog.setEnabledOptions(QAbstractPrintDialog::PrintShowPageSize); if (print_dialog.exec() == QDialog::Rejected) return; - } else if (pdf_choice_ -> isChecked()) { + } + else + { printer_ -> setOutputFormat(QPrinter::PdfFormat); printer_ -> setOutputFileName(filepath_field_ -> text()); - } else { - printer_ -> setOutputFormat(QPrinter::PostScriptFormat); - printer_ -> setOutputFileName(filepath_field_ -> text()); } + //@TODO remove code below + //post script isn't suported anymore in Qt5 +// else +// { +// printer_ -> setOutputFormat(QPrinter::PostScriptFormat); +// printer_ -> setOutputFileName(filepath_field_ -> text()); +// } loadPageSetupForCurrentPrinter(); - // Apercu avant impression -#if defined Q_WS_X11 - // suite a quelques soucis avec xfwm, on se contente d'une fenetre sous X11 + //Preview before print +#if defined Q_OS_LINUX + //Due to some bug with xfwm, we display this dialog has a windows on linux os (X11) + //@TODO see if we must this line with graphic server wayland QETPrintPreviewDialog preview_dialog(project_, printer_, parentWidget(), Qt::Window); #else QETPrintPreviewDialog preview_dialog(project_, printer_, parentWidget()); @@ -211,18 +221,18 @@ int DiagramPrintDialog::verticalPagesCount(Diagram *diagram, const ExportPropert void DiagramPrintDialog::buildPrintTypeDialog() { // initialisation des widgets dialog_ = new QDialog(parentWidget()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC dialog_ -> setWindowFlags(Qt::Sheet); #endif - printtype_label_ = new QLabel(tr("Quel type d'impression d\351sirez-vous effectuer ?")); + printtype_label_ = new QLabel(tr("Quel type d'impression désirez-vous effectuer ?")); printer_icon_ = new QLabel(); pdf_icon_ = new QLabel(); - ps_icon_ = new QLabel(); +// ps_icon_ = new QLabel(); printtype_choice_ = new QButtonGroup(); printer_choice_ = new QRadioButton(tr("Impression sur une imprimante physique", "Print type choice")); pdf_choice_ = new QRadioButton(tr("Impression vers un fichier au format PDF", "Print type choice")); - ps_choice_ = new QRadioButton(tr("Impression vers un fichier au format PostScript (PS)", "Print type choice")); +// ps_choice_ = new QRadioButton(tr("Impression vers un fichier au format PostScript (PS)", "Print type choice")); filepath_field_ = new QLineEdit(); browse_button_ = new QPushButton("..."); buttons_ = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); @@ -230,17 +240,17 @@ void DiagramPrintDialog::buildPrintTypeDialog() { dialog_ -> setWindowTitle(tr("Choix du type d'impression")); printer_icon_ -> setPixmap(QET::Icons::Printer.pixmap(32, 32)); pdf_icon_ -> setPixmap(QET::Icons::PDF.pixmap(32, 32)); - ps_icon_ -> setPixmap(QET::Icons::EPS.pixmap(32, 32)); +// ps_icon_ -> setPixmap(QET::Icons::EPS.pixmap(32, 32)); printtype_choice_ -> addButton(printer_choice_); printtype_choice_ -> addButton(pdf_choice_); - printtype_choice_ -> addButton(ps_choice_); +// printtype_choice_ -> addButton(ps_choice_); printer_choice_ -> setChecked(true); if (!file_name_.isEmpty()) filepath_field_ -> setText(file_name_ + ".pdf"); // connexions signaux / slots connect(printer_choice_, SIGNAL(toggled(bool)), this, SLOT(updatePrintTypeDialog())); connect(pdf_choice_, SIGNAL(toggled(bool)), this, SLOT(updatePrintTypeDialog())); - connect(ps_choice_, SIGNAL(toggled(bool)), this, SLOT(updatePrintTypeDialog())); +// connect(ps_choice_, SIGNAL(toggled(bool)), this, SLOT(updatePrintTypeDialog())); connect(browse_button_, SIGNAL(clicked(bool)), this, SLOT(browseFilePrintTypeDialog())); connect(buttons_, SIGNAL(accepted()), this, SLOT(acceptPrintTypeDialog())); connect(buttons_, SIGNAL(rejected()), dialog_, SLOT(reject())); @@ -256,8 +266,8 @@ void DiagramPrintDialog::buildPrintTypeDialog() { glayout0_ -> addWidget(printer_choice_, 0, 1); glayout0_ -> addWidget(pdf_icon_, 1, 0); glayout0_ -> addWidget(pdf_choice_, 1, 1); - glayout0_ -> addWidget(ps_icon_, 2, 0); - glayout0_ -> addWidget(ps_choice_, 2, 1); +// glayout0_ -> addWidget(ps_icon_, 2, 0); +// glayout0_ -> addWidget(ps_choice_, 2, 1); glayout0_ -> addLayout(hlayout0_, 3, 1); vlayout0_ -> addWidget(printtype_label_); @@ -281,18 +291,23 @@ void DiagramPrintDialog::updatePrintTypeDialog() { browse_button_ -> setEnabled(file_print); // on corrige eventuellement l'extension du fichier deja selectionne - if (file_print) { + if (file_print) + { QString filepath = filepath_field_ -> text(); - if (!filepath.isEmpty()) { - if (pdf_choice_ -> isChecked() && filepath.endsWith(".ps")) { + if (!filepath.isEmpty()) + { + if (pdf_choice_ -> isChecked() && filepath.endsWith(".ps")) + { QRegExp re("\\.ps$", Qt::CaseInsensitive); filepath.replace(re, ".pdf"); filepath_field_ -> setText(filepath); - } else if (ps_choice_ -> isChecked() && filepath.endsWith(".pdf")) { - QRegExp re("\\.pdf$", Qt::CaseInsensitive); - filepath.replace(re, ".ps"); - filepath_field_ -> setText(filepath); } +// else if (ps_choice_ -> isChecked() && filepath.endsWith(".pdf")) +// { +// QRegExp re("\\.pdf$", Qt::CaseInsensitive); +// filepath.replace(re, ".ps"); +// filepath_field_ -> setText(filepath); +// } } } } @@ -306,10 +321,10 @@ void DiagramPrintDialog::acceptPrintTypeDialog() { if (file_print) { // un fichier doit avoir ete entre if (filepath_field_ -> text().isEmpty()) { - QET::MessageBox::information( + QET::QetMessageBox::information( parentWidget(), tr("Fichier manquant", "message box title"), - tr("Vous devez indiquer le chemin du fichier PDF/PS \340 cr\351er.", "message box content") + tr("Vous devez indiquer le chemin du fichier PDF/PS à créer.", "message box content") ); } else dialog_ -> accept(); } else { @@ -326,14 +341,16 @@ void DiagramPrintDialog::browseFilePrintTypeDialog() { QString extension; QString filter; if (printer_choice_ -> isChecked()) return; - else if (pdf_choice_ -> isChecked()) { + else if (pdf_choice_ -> isChecked()) + { extension = ".pdf"; filter = tr("Fichiers PDF (*.pdf)", "file filter"); } - else if (ps_choice_ -> isChecked()) { - extension = ".ps"; - filter = tr("Fichiers PostScript (*.ps)", "file filter"); - } +// else if (ps_choice_ -> isChecked()) +// { +// extension = ".ps"; +// filter = tr("Fichiers PostScript (*.ps)", "file filter"); +// } QString filepath = QFileDialog::getSaveFileName( parentWidget(), @@ -609,8 +626,10 @@ QString DiagramPrintDialog::settingsSectionName(const QPrinter *printer) { return(printer -> printerName().replace(" ", "_")); } else if (printer_format == QPrinter::PdfFormat) { return("QET_PDF_Printing"); - } else if (printer_format == QPrinter::PostScriptFormat) { - return("QET_PS_Printing"); } + //@TODO remove code below +// else if (printer_format == QPrinter::PostScriptFormat) { +// return("QET_PS_Printing"); +// } return(QString()); } diff --git a/sources/diagramprintdialog.h b/sources/diagramprintdialog.h index 58fe4a333..7f2243149 100644 --- a/sources/diagramprintdialog.h +++ b/sources/diagramprintdialog.h @@ -17,15 +17,22 @@ */ #ifndef DIAGRAM_PRINT_DIALOG_H #define DIAGRAM_PRINT_DIALOG_H -#include +#include + #include "qetproject.h" #include "diagram.h" #include "exportproperties.h" + +class QPrinter; + /** This class implements both the dialog allowing users to configure the printing of a project file and the printing itself. */ -class DiagramPrintDialog : public QWidget { +class DiagramPrintDialog : public QWidget +{ + //@TODO Remove definitely the commented lines in this class related to post script + Q_OBJECT // Constructors, destructor public: @@ -75,11 +82,11 @@ class DiagramPrintDialog : public QWidget { QHBoxLayout *hlayout0_; QLabel *printer_icon_; QLabel *pdf_icon_; - QLabel *ps_icon_; +// QLabel *ps_icon_; QButtonGroup *printtype_choice_; QRadioButton *printer_choice_; QRadioButton *pdf_choice_; - QRadioButton *ps_choice_; +// QRadioButton *ps_choice_; QLineEdit *filepath_field_; QPushButton *browse_button_; QDialogButtonBox *buttons_; diff --git a/sources/diagramschooser.cpp b/sources/diagramschooser.cpp index 1ecb09b20..74553b1ee 100644 --- a/sources/diagramschooser.cpp +++ b/sources/diagramschooser.cpp @@ -162,7 +162,7 @@ void DiagramsChooser::updateList() { foreach(Diagram *diagram, project_ -> diagrams()) { // titre du schema QString diagram_title = diagram -> title(); - if (diagram_title.isEmpty()) diagram_title = tr("Sch\351ma sans titre"); + if (diagram_title.isEmpty()) diagram_title = tr("Schéma sans titre"); QCheckBox *checkbox = new QCheckBox(diagram_title); checkbox -> setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum)); diff --git a/sources/diagramschooser.h b/sources/diagramschooser.h index 2be824fc2..96b8516e6 100644 --- a/sources/diagramschooser.h +++ b/sources/diagramschooser.h @@ -17,7 +17,7 @@ */ #ifndef DIAGRAMS_CHOOSER_H #define DIAGRAMS_CHOOSER_H -#include +#include class QETProject; class Diagram; /** diff --git a/sources/diagramview.cpp b/sources/diagramview.cpp index 41e7b7799..15927db5e 100644 --- a/sources/diagramview.cpp +++ b/sources/diagramview.cpp @@ -58,9 +58,9 @@ DiagramView::DiagramView(Diagram *diagram, QWidget *parent) : setInteractive(true); QString whatsthis = tr( - "Ceci est la zone dans laquelle vous concevez vos sch\351mas en y ajoutant" - " des \351l\351ments et en posant des conducteurs entre leurs bornes. Il est" - " \351galement possible d'ajouter des textes ind\351pendants.", + "Ceci est la zone dans laquelle vous concevez vos schémas en y ajoutant" + " des éléments et en posant des conducteurs entre leurs bornes. Il est" + " également possible d'ajouter des textes indépendants.", "\"What's this?\" tip" ); setWhatsThis(whatsthis); @@ -194,10 +194,10 @@ void DiagramView::rotateTexts() { // demande un angle a l'utilisateur QDialog ori_text_dialog(diagramEditor()); ori_text_dialog.setSizeGripEnabled(false); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC ori_text_dialog.setWindowFlags(Qt::Sheet); #endif - ori_text_dialog.setWindowTitle(tr("Orienter les textes s\351lectionn\351s", "window title")); + ori_text_dialog.setWindowTitle(tr("Orienter les textes sélectionnés", "window title")); // ori_text_dialog.setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); @@ -911,12 +911,12 @@ void DiagramView::editSelectionProperties() { } else { - QET::MessageBox::information( + QET::QetMessageBox::information( this, - tr("Propri\351t\351s de la s\351lection"), + tr("Propriétés de la sélection"), QString( tr( - "La s\351lection contient %1.", + "La sélection contient %1.", "%1 is a sentence listing the selected objects" ) ).arg(selection.sentence(DiagramContent::All | DiagramContent::SelectedOnly)) @@ -952,7 +952,7 @@ void DiagramView::editConductorColor(Conductor *edited_conductor) { // prepare a color dialog showing the initial conductor color QColorDialog *color_dialog = new QColorDialog(this); color_dialog -> setWindowTitle(tr("Choisir la nouvelle couleur de ce conducteur")); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC color_dialog -> setWindowFlags(Qt::Sheet); #endif color_dialog -> setCurrentColor(initial_properties.color); @@ -1105,9 +1105,9 @@ void DiagramView::editSelection() { * @brief DiagramView::setEventInterface * Set an event interface to diagram view. */ -void DiagramView::setEventInterface(DVEventInterface *interface) { +void DiagramView::setEventInterface(DVEventInterface *event_interface) { if (m_event_interface) delete m_event_interface; - m_event_interface = interface; + m_event_interface = event_interface; } /** @@ -1115,7 +1115,7 @@ void DiagramView::setEventInterface(DVEventInterface *interface) { @param e Evenement decrivant la demande de menu contextuel */ void DiagramView::contextMenuEvent(QContextMenuEvent *e) { - if (QGraphicsItem *qgi = scene -> itemAt(mapToScene(e -> pos()))) { + if (QGraphicsItem *qgi = scene -> itemAt(mapToScene(e -> pos()), transform())) { if (!qgi -> isSelected()) scene -> clearSelection(); qgi -> setSelected(true); } diff --git a/sources/diagramview.h b/sources/diagramview.h index bef3be9b8..7f5a06d53 100644 --- a/sources/diagramview.h +++ b/sources/diagramview.h @@ -17,7 +17,7 @@ */ #ifndef DIAGRAMVIEW_H #define DIAGRAMVIEW_H -#include +#include #include "elementslocation.h" #include "templatelocation.h" @@ -71,7 +71,7 @@ class DiagramView : public QGraphicsView { bool hasCopiableItems(); bool hasDeletableItems(); void editSelection(); - void setEventInterface (DVEventInterface *interface); + void setEventInterface (DVEventInterface *event_interface); protected: virtual void mouseDoubleClickEvent(QMouseEvent *); diff --git a/sources/dvevent/dveventaddimage.cpp b/sources/dvevent/dveventaddimage.cpp index 9eb99c19e..986e0388f 100644 --- a/sources/dvevent/dveventaddimage.cpp +++ b/sources/dvevent/dveventaddimage.cpp @@ -21,6 +21,7 @@ #include "diagramview.h" #include "diagram.h" #include +#include /** * @brief DVEventAddImage::DVEventAddImage @@ -142,7 +143,7 @@ void DVEventAddImage::openDialog() { if (m_diagram -> isReadOnly()) return; //Open dialog for select image - QString pathPictures = QDesktopServices::storageLocation ( QDesktopServices::PicturesLocation ); + QString pathPictures = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); QString fileName = QFileDialog::getOpenFileName(m_dv, QObject::tr("Selectionner une image..."), pathPictures, QObject::tr("Image Files (*.png *.jpg *.bmp *.svg)")); if (fileName.isEmpty()) return; diff --git a/sources/dvevent/dveventaddshape.cpp b/sources/dvevent/dveventaddshape.cpp index 3735b896f..01918bbec 100644 --- a/sources/dvevent/dveventaddshape.cpp +++ b/sources/dvevent/dveventaddshape.cpp @@ -194,17 +194,17 @@ void DVEventAddShape::updateHelpCross(const QPoint &p) if (!m_help_horiz) { m_help_horiz = new QGraphicsLineItem(m_diagram -> border_and_titleblock.rowsHeaderWidth() + 5, 0, - m_diagram -> border_and_titleblock.diagramWidth() + 5, 0, - 0, m_diagram); + m_diagram -> border_and_titleblock.diagramWidth() + 5, 0); m_help_horiz->setPen(pen); + m_diagram -> addItem(m_help_horiz); } if (!m_help_verti) { m_help_verti = new QGraphicsLineItem(0, m_diagram -> border_and_titleblock.columnsHeaderHeight() + 5, - 0, m_diagram -> border_and_titleblock.diagramHeight() + 5, - 0, m_diagram); + 0, m_diagram -> border_and_titleblock.diagramHeight() + 5); m_help_verti->setPen(pen); + m_diagram -> addItem(m_help_verti); } } diff --git a/sources/editor/arceditor.cpp b/sources/editor/arceditor.cpp index da1c1fb31..dbbcf502f 100644 --- a/sources/editor/arceditor.cpp +++ b/sources/editor/arceditor.cpp @@ -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); } diff --git a/sources/editor/arceditor.h b/sources/editor/arceditor.h index 195fe06a5..1048e117e 100644 --- a/sources/editor/arceditor.h +++ b/sources/editor/arceditor.h @@ -17,7 +17,7 @@ */ #ifndef ARC_EDITOR_H #define ARC_EDITOR_H -#include +#include #include "elementitemeditor.h" class PartArc; class StyleEditor; diff --git a/sources/editor/editorcommands.cpp b/sources/editor/editorcommands.cpp index c292508fa..7970166ed 100644 --- a/sources/editor/editorcommands.cpp +++ b/sources/editor/editorcommands.cpp @@ -227,7 +227,7 @@ MovePartsCommand::MovePartsCommand( const QList 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() {} diff --git a/sources/editor/editorcommands.h b/sources/editor/editorcommands.h index 89ff84605..417752b92 100644 --- a/sources/editor/editorcommands.h +++ b/sources/editor/editorcommands.h @@ -23,7 +23,7 @@ #include "elementscene.h" #include "elementcontent.h" #include "qgimanager.h" -#include +#include /** * @brief The ElementEditionCommand class diff --git a/sources/editor/elementitemeditor.h b/sources/editor/elementitemeditor.h index e5a91a005..5fec353b2 100644 --- a/sources/editor/elementitemeditor.h +++ b/sources/editor/elementitemeditor.h @@ -17,7 +17,7 @@ */ #ifndef ELEMENT_ITEM_EDITOR_H #define ELEMENT_ITEM_EDITOR_H -#include +#include class QETElementEditor; class ElementScene; class CustomElementPart; diff --git a/sources/editor/elementprimitivedecorator.cpp b/sources/editor/elementprimitivedecorator.cpp index 9e7ef1805..b9491553b 100644 --- a/sources/editor/elementprimitivedecorator.cpp +++ b/sources/editor/elementprimitivedecorator.cpp @@ -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); diff --git a/sources/editor/elementscene.cpp b/sources/editor/elementscene.cpp index ee0bcd3ad..c6dd85f86 100644 --- a/sources/editor/elementscene.cpp +++ b/sources/editor/elementscene.cpp @@ -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 diff --git a/sources/editor/elementscene.h b/sources/editor/elementscene.h index 1c5e8d158..67408fe19 100644 --- a/sources/editor/elementscene.h +++ b/sources/editor/elementscene.h @@ -17,7 +17,7 @@ */ #ifndef ELEMENT_SCENE_H #define ELEMENT_SCENE_H -#include +#include #include #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; diff --git a/sources/editor/elementview.cpp b/sources/editor/elementview.cpp index bc216dfec..038c388e0 100644 --- a/sources/editor/elementview.cpp +++ b/sources/editor/elementview.cpp @@ -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(); diff --git a/sources/editor/ellipseeditor.cpp b/sources/editor/ellipseeditor.cpp index 61cbd51b8..3cd3c94c0 100644 --- a/sources/editor/ellipseeditor.cpp +++ b/sources/editor/ellipseeditor.cpp @@ -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 diff --git a/sources/editor/ellipseeditor.h b/sources/editor/ellipseeditor.h index 078d21406..e3d4b13f9 100644 --- a/sources/editor/ellipseeditor.h +++ b/sources/editor/ellipseeditor.h @@ -17,7 +17,7 @@ */ #ifndef ELLIPSE_EDITOR_H #define ELLIPSE_EDITOR_H -#include +#include #include "elementitemeditor.h" class PartEllipse; class StyleEditor; diff --git a/sources/editor/esevent/eseventaddtext.cpp b/sources/editor/esevent/eseventaddtext.cpp index 9f1c523ca..225b24cba 100644 --- a/sources/editor/esevent/eseventaddtext.cpp +++ b/sources/editor/esevent/eseventaddtext.cpp @@ -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; diff --git a/sources/editor/esevent/eseventaddtextfield.cpp b/sources/editor/esevent/eseventaddtextfield.cpp index 06147e0ca..33e097920 100644 --- a/sources/editor/esevent/eseventaddtextfield.cpp +++ b/sources/editor/esevent/eseventaddtextfield.cpp @@ -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; diff --git a/sources/editor/esevent/eseventinterface.cpp b/sources/editor/esevent/eseventinterface.cpp index d51537478..960a9bd49 100644 --- a/sources/editor/esevent/eseventinterface.cpp +++ b/sources/editor/esevent/eseventinterface.cpp @@ -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); } } diff --git a/sources/editor/graphicspart/customelementpart.h b/sources/editor/graphicspart/customelementpart.h index bf99b53fe..23031e5a4 100644 --- a/sources/editor/graphicspart/customelementpart.h +++ b/sources/editor/graphicspart/customelementpart.h @@ -17,7 +17,7 @@ */ #ifndef CUSTOM_ELEMENT_PART_H #define CUSTOM_ELEMENT_PART_H -#include +#include #include #include #include "qet.h" diff --git a/sources/editor/graphicspart/parttext.cpp b/sources/editor/graphicspart/parttext.cpp index b63aa0d51..5d911865e 100644 --- a/sources/editor/graphicspart/parttext.cpp +++ b/sources/editor/graphicspart/parttext.cpp @@ -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 diff --git a/sources/editor/graphicspart/parttext.h b/sources/editor/graphicspart/parttext.h index bbbc3a169..e32891c8d 100644 --- a/sources/editor/graphicspart/parttext.h +++ b/sources/editor/graphicspart/parttext.h @@ -17,7 +17,7 @@ */ #ifndef PART_TEXT_H #define PART_TEXT_H -#include +#include #include "customelementpart.h" #include "qetapp.h" class TextEditor; diff --git a/sources/editor/graphicspart/parttextfield.cpp b/sources/editor/graphicspart/parttextfield.cpp index 5be4c6a3b..3d0a13169 100644 --- a/sources/editor/graphicspart/parttextfield.cpp +++ b/sources/editor/graphicspart/parttextfield.cpp @@ -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(); diff --git a/sources/editor/graphicspart/parttextfield.h b/sources/editor/graphicspart/parttextfield.h index 5fa75d8fb..0e9badd6c 100644 --- a/sources/editor/graphicspart/parttextfield.h +++ b/sources/editor/graphicspart/parttextfield.h @@ -17,7 +17,7 @@ */ #ifndef PART_TEXTFIELD_H #define PART_TEXTFIELD_H -#include +#include #include "customelementpart.h" #include "qetapp.h" class TextFieldEditor; diff --git a/sources/editor/lineeditor.cpp b/sources/editor/lineeditor.cpp index 3632e1bc5..8e2e5d0b0 100644 --- a/sources/editor/lineeditor.cpp +++ b/sources/editor/lineeditor.cpp @@ -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 diff --git a/sources/editor/lineeditor.h b/sources/editor/lineeditor.h index d617cc084..b070be394 100644 --- a/sources/editor/lineeditor.h +++ b/sources/editor/lineeditor.h @@ -17,7 +17,7 @@ */ #ifndef LINE_EDITOR_H #define LINE_EDITOR_H -#include +#include #include "elementitemeditor.h" class PartLine; class StyleEditor; diff --git a/sources/editor/polygoneditor.cpp b/sources/editor/polygoneditor.cpp index c5a8b03a4..663548de6 100644 --- a/sources/editor/polygoneditor.cpp +++ b/sources/editor/polygoneditor.cpp @@ -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 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") diff --git a/sources/editor/qetelementeditor.cpp b/sources/editor/qetelementeditor.cpp index d0e8900e9..729acbb3b 100644 --- a/sources/editor/qetelementeditor.cpp +++ b/sources/editor/qetelementeditor.cpp @@ -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( - "
En l'absence de borne, l'\351l\351ment ne pourra \352tre" - " reli\351 \340 d'autres \351l\351ments par l'interm\351diaire de conducteurs.", + "
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("
Erreur :" - "
Les \351l\351ments de type ma\356tres, esclaves, simple et renvoie de folio doivent poss\351der un champ texte comportant le tagg 'label'." + tr("
Erreur :" + "
Les éléments de type maîtres, esclaves, simple et renvoie de folio doivent posséder un champ texte comportant le tagg 'label'." "
Solution :" - "
Ins\351rer un champ texte et lui attribuer le tagg 'label'", "warning description")); + "
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("
Erreur :" - "
Les reports de folio doivent poss\351der une seul borne." + "
Les reports de folio doivent posséder une seul borne." "
Solution :" - "
Verifier que l'\351l\351ment ne poss\350de qu'une seul borne")); + "
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 += "
  • "; dialog_message += QString( - tr("%1\240: %2", "warning title: warning description") + tr("%1 : %2", "warning title: warning description") ).arg(warning.first).arg(warning.second); dialog_message += "
  • "; } @@ -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(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(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; } diff --git a/sources/editor/qetelementeditor.h b/sources/editor/qetelementeditor.h index 65917f296..9b19f0218 100644 --- a/sources/editor/qetelementeditor.h +++ b/sources/editor/qetelementeditor.h @@ -17,7 +17,7 @@ */ #ifndef CUSTOM_ELEMENT_EDITOR_H #define CUSTOM_ELEMENT_EDITOR_H -#include +#include #include "qetmainwindow.h" #include "qet.h" #include "elementscene.h" diff --git a/sources/editor/rectangleeditor.cpp b/sources/editor/rectangleeditor.cpp index 59c157d89..c9cdbc9f4 100644 --- a/sources/editor/rectangleeditor.cpp +++ b/sources/editor/rectangleeditor.cpp @@ -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 diff --git a/sources/editor/rectangleeditor.h b/sources/editor/rectangleeditor.h index 5329946f6..2bb5d417f 100644 --- a/sources/editor/rectangleeditor.h +++ b/sources/editor/rectangleeditor.h @@ -17,7 +17,7 @@ */ #ifndef RECTANGLE_EDITOR_H #define RECTANGLE_EDITOR_H -#include +#include #include "elementitemeditor.h" class PartRectangle; class StyleEditor; diff --git a/sources/editor/styleeditor.cpp b/sources/editor/styleeditor.cpp index d45e3517e..9a49f74b9 100644 --- a/sources/editor/styleeditor.cpp +++ b/sources/editor/styleeditor.cpp @@ -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("" + tr("G\351om\351trie :") + " ")); + main_layout -> addWidget(new QLabel("" + tr("Géométrie :") + " ")); main_layout -> addStretch(); setLayout(main_layout); } diff --git a/sources/editor/styleeditor.h b/sources/editor/styleeditor.h index 2ecb1c20b..33cdce9dc 100644 --- a/sources/editor/styleeditor.h +++ b/sources/editor/styleeditor.h @@ -17,7 +17,7 @@ */ #ifndef STYLE_EDITOR_H #define STYLE_EDITOR_H -#include +#include #include "elementitemeditor.h" class CustomElementGraphicPart; /** diff --git a/sources/editor/terminaleditor.cpp b/sources/editor/terminaleditor.cpp index bb3a13bbe..20bf3bcc3 100644 --- a/sources/editor/terminaleditor.cpp +++ b/sources/editor/terminaleditor.cpp @@ -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 diff --git a/sources/editor/terminaleditor.h b/sources/editor/terminaleditor.h index 77496e670..a5cdd6799 100644 --- a/sources/editor/terminaleditor.h +++ b/sources/editor/terminaleditor.h @@ -17,7 +17,7 @@ */ #ifndef TERMINAL_EDITOR_H #define TERMINAL_EDITOR_H -#include +#include #include "elementitemeditor.h" class PartTerminal; /** diff --git a/sources/editor/texteditor.cpp b/sources/editor/texteditor.cpp index eda038d8b..faf6e99ca 100644 --- a/sources/editor/texteditor.cpp +++ b/sources/editor/texteditor.cpp @@ -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 diff --git a/sources/editor/texteditor.h b/sources/editor/texteditor.h index d979a7cc7..2ee7baf09 100644 --- a/sources/editor/texteditor.h +++ b/sources/editor/texteditor.h @@ -17,7 +17,7 @@ */ #ifndef TEXT_EDITOR_H #define TEXT_EDITOR_H -#include +#include #include "elementitemeditor.h" class PartText; class QTextOrientationSpinBoxWidget; diff --git a/sources/editor/textfieldeditor.cpp b/sources/editor/textfieldeditor.cpp index 229db9477..1e88b67f6 100644 --- a/sources/editor/textfieldeditor.cpp +++ b/sources/editor/textfieldeditor.cpp @@ -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());} diff --git a/sources/editor/textfieldeditor.h b/sources/editor/textfieldeditor.h index 026f3431b..be6d359e8 100644 --- a/sources/editor/textfieldeditor.h +++ b/sources/editor/textfieldeditor.h @@ -17,7 +17,7 @@ */ #ifndef TEXTFIELD_EDITOR_H #define TEXTFIELD_EDITOR_H -#include +#include #include "elementitemeditor.h" class PartTextField; class QTextOrientationSpinBoxWidget; diff --git a/sources/editor/ui/elementpropertieseditorwidget.cpp b/sources/editor/ui/elementpropertieseditorwidget.cpp index 63345f851..e3bf799ec 100644 --- a/sources/editor/ui/elementpropertieseditorwidget.cpp +++ b/sources/editor/ui/elementpropertieseditorwidget.cpp @@ -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")); diff --git a/sources/elementdefinition.cpp b/sources/elementdefinition.cpp index ddf5da951..aee956143 100644 --- a/sources/elementdefinition.cpp +++ b/sources/elementdefinition.cpp @@ -381,7 +381,7 @@ void ElementDefinition::copy(MoveElementsDescription *mvt_desc) { element_copy = target_category -> createElement(mvt_desc -> finalDestinationInternalName()); if (!element_copy) { if (handler) { - handler -> errorWithAnElement(this, tr("L'\351l\351ment cible n'a pu \352tre cr\351\351.")); + handler -> errorWithAnElement(this, tr("L'élément cible n'a pu être créé.")); } return; } @@ -463,7 +463,7 @@ void ElementDefinition::move(MoveElementsDescription *mvt_desc) { bool element_deletion = remove(); mvt_desc -> setSourceItemDeleted(element_deletion); if (!element_deletion && handler) { - handler -> errorWithAnElement(this, tr("La suppression de cet \351l\351ment a \351chou\351.")); + handler -> errorWithAnElement(this, tr("La suppression de cet élément a échoué.")); } } diff --git a/sources/elementdeleter.cpp b/sources/elementdeleter.cpp index 5419ff155..752f6663d 100644 --- a/sources/elementdeleter.cpp +++ b/sources/elementdeleter.cpp @@ -51,10 +51,10 @@ bool ElementDeleter::exec() { if (!element || !element -> isElement()) return(false); // confirmation #1 - QMessageBox::StandardButton answer_1 = QET::MessageBox::question( + QMessageBox::StandardButton answer_1 = QET::QetMessageBox::question( this, - tr("Supprimer l'\351l\351ment ?", "message box title"), - tr("\312tes-vous s\373r de vouloir supprimer cet \351l\351ment ?\n", "message box content"), + tr("Supprimer l'élément ?", "message box title"), + tr("Êtes-vous s\373r de vouloir supprimer cet élément ?\n", "message box content"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel ); if (answer_1 != QMessageBox::Yes) return(false); @@ -65,10 +65,10 @@ bool ElementDeleter::exec() { // supprime l'element if (!element -> remove()) { - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, - tr("Suppression de l'\351l\351ment", "message box title"), - tr("La suppression de l'\351l\351ment a \351chou\351.", "message box content") + tr("Suppression de l'élément", "message box title"), + tr("La suppression de l'élément a échoué.", "message box content") ); return(false); } diff --git a/sources/elementdeleter.h b/sources/elementdeleter.h index 660bda7a0..76e2a126a 100644 --- a/sources/elementdeleter.h +++ b/sources/elementdeleter.h @@ -19,7 +19,7 @@ #define ELEMENT_DELETER_H #include "elementscategory.h" #include "elementslocation.h" -#include +#include /** This class provides an abstract way to delete an element from its parent collection. Especially, it requires a confirmation from users. diff --git a/sources/elementdialog.cpp b/sources/elementdialog.cpp index ed689177b..7b243e76e 100644 --- a/sources/elementdialog.cpp +++ b/sources/elementdialog.cpp @@ -16,7 +16,7 @@ along with QElectroTech. If not, see . */ #include "elementdialog.h" -#include +#include #include "qetapp.h" #include "elementscategorieslist.h" #include "elementscollectionitem.h" @@ -41,7 +41,7 @@ ElementDialog::ElementDialog(uint mode, QWidget *parentWidget, QObject *parent) { dialog_ = new QDialog(parentWidget); dialog_ -> setWindowModality(Qt::WindowModal); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC dialog_ -> setWindowFlags(Qt::Sheet); #endif buttons_ = new QDialogButtonBox(); @@ -60,17 +60,17 @@ ElementDialog::ElementDialog(uint mode, QWidget *parentWidget, QObject *parent) // titre et label if (!mode) { - title_ = tr("Ouvrir un \351l\351ment", "dialog title"); - label_ = tr("Choisissez l'\351l\351ment que vous souhaitez ouvrir.", "dialog content"); + title_ = tr("Ouvrir un élément", "dialog title"); + label_ = tr("Choisissez l'élément que vous souhaitez ouvrir.", "dialog content"); } else if (mode == 1) { - title_ = tr("Enregistrer un \351l\351ment", "dialog title"); - label_ = tr("Choisissez l'\351l\351ment dans lequel vous souhaitez enregistrer votre d\351finition.", "dialog content"); + title_ = tr("Enregistrer un élément", "dialog title"); + label_ = tr("Choisissez l'élément dans lequel vous souhaitez enregistrer votre définition.", "dialog content"); } else if (mode == 2) { - title_ = tr("Ouvrir une cat\351gorie", "dialog title"); - label_ = tr("Choisissez une cat\351gorie.", "dialog content"); + title_ = tr("Ouvrir une catégorie", "dialog title"); + label_ = tr("Choisissez une catégorie.", "dialog content"); } else { - title_ = tr("Enregistrer une cat\351gorie", "dialog title"); - label_ = tr("Choisissez une cat\351gorie.", "dialog content"); + title_ = tr("Enregistrer une catégorie", "dialog title"); + label_ = tr("Choisissez une catégorie.", "dialog content"); } // mode ouverture / enregistrement @@ -240,10 +240,10 @@ void ElementDialog::checkDialog() { // on verifie d'abord que l'utilisateur a choisi quelque chose ElementsLocation location = list_ -> selectedLocation(); if (location.isNull()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( dialog_, - tr("Pas de s\351lection", "message box title"), - tr("Vous devez s\351lectionner un \351l\351ment.", "message box content") + tr("Pas de sélection", "message box title"), + tr("Vous devez sélectionner un élément.", "message box content") ); return; } @@ -251,20 +251,20 @@ void ElementDialog::checkDialog() { // on verifie donc que la selection existe ElementsCollectionItem *item = QETApp::collectionItem(location); if (!item) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( dialog_, - tr("S\351lection inexistante", "message box title"), - tr("La s\351lection n'existe pas.", "message box content") + tr("Sélection inexistante", "message box title"), + tr("La sélection n'existe pas.", "message box content") ); return; } // puis on verifie qu'il s'agit bien d'un element if (!item -> isElement()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( dialog_, - tr("S\351lection incorrecte", "message box title"), - tr("La s\351lection n'est pas un \351l\351ment.", "message box content") + tr("Sélection incorrecte", "message box title"), + tr("La sélection n'est pas un élément.", "message box content") ); return; } @@ -278,10 +278,10 @@ void ElementDialog::checkDialog() { */ ElementsLocation location = list_ -> selectedLocation(); if (location.isNull()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( dialog_, - tr("Pas de s\351lection", "message box title"), - tr("Vous devez s\351lectionner une cat\351gorie ou un \351l\351ment.", "message box content") + tr("Pas de sélection", "message box title"), + tr("Vous devez sélectionner une catégorie ou un élément.", "message box content") ); return; } @@ -289,10 +289,10 @@ void ElementDialog::checkDialog() { // on verifie donc que la selection existe ElementsCollectionItem *item = QETApp::collectionItem(location); if (!item) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( dialog_, - tr("S\351lection inexistante", "message box title"), - tr("La s\351lection n'existe pas.", "message box content") + tr("Sélection inexistante", "message box title"), + tr("La sélection n'existe pas.", "message box content") ); return; } @@ -302,23 +302,23 @@ void ElementDialog::checkDialog() { QString element_name(textfield_ -> text()); // si on a une categorie (ou une collection), il nous faut un nom d'element if (element_name.isEmpty()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( dialog_, tr("Nom manquant", "message box title"), - tr("Vous devez entrer un nom pour l'\351l\351ment", "message box content") + tr("Vous devez entrer un nom pour l'élément", "message box content") ); return; } // ce nom d'element doit etre valide if (QET::containsForbiddenCharacters(element_name)) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( dialog_, tr("Nom invalide", "message box title"), QString( tr( - "Vous ne pouvez pas utiliser les caract\350res " - "suivants dans le nom de l'\351l\351ment : %1" + "Vous ne pouvez pas utiliser les caractères " + "suivants dans le nom de l'élément : %1" ) ).arg(QET::forbiddenCharactersString(true)) ); @@ -340,10 +340,10 @@ void ElementDialog::checkDialog() { // si l'element existe, on demande confirmation pour son ecrasement if (element_already_exists) { - QMessageBox::StandardButton answer = QET::MessageBox::question( + QMessageBox::StandardButton answer = QET::QetMessageBox::question( dialog_, - tr("\311craser l'\351l\351ment ?", "message box title"), - tr("L'\351l\351ment existe d\351j\340. Voulez-vous l'\351craser ?", "message box content"), + tr("Écraser l'élément ?", "message box title"), + tr("L'élément existe déjà. Voulez-vous l'écraser ?", "message box content"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::No ); diff --git a/sources/elementscategorieslist.h b/sources/elementscategorieslist.h index 8a4dfbfe8..50e22f922 100644 --- a/sources/elementscategorieslist.h +++ b/sources/elementscategorieslist.h @@ -17,7 +17,7 @@ */ #ifndef ELEMENTS_CATEGORIES_LIST_H #define ELEMENTS_CATEGORIES_LIST_H -#include +#include #include "qet.h" #include "elementslocation.h" #include "genericpanel.h" diff --git a/sources/elementscategorieswidget.cpp b/sources/elementscategorieswidget.cpp index 8dc559a65..7f89ce856 100644 --- a/sources/elementscategorieswidget.cpp +++ b/sources/elementscategorieswidget.cpp @@ -31,10 +31,10 @@ ElementsCategoriesWidget::ElementsCategoriesWidget(QWidget *parent) : QWidget(pa elementscategorieslist = new ElementsCategoriesList(false, QET::All, this); // actions - action_reload = new QAction(QET::Icons::ViewRefresh, tr("Recharger les cat\351gories"), this); - action_new = new QAction(QET::Icons::FolderNew, tr("Nouvelle cat\351gorie"), this); - action_open = new QAction(QET::Icons::FolderEdit, tr("\311diter la cat\351gorie"), this); - action_delete = new QAction(QET::Icons::FolderDelete, tr("Supprimer la cat\351gorie"), this); + action_reload = new QAction(QET::Icons::ViewRefresh, tr("Recharger les catégories"), this); + action_new = new QAction(QET::Icons::FolderNew, tr("Nouvelle catégorie"), this); + action_open = new QAction(QET::Icons::FolderEdit, tr("Éditer la catégorie"), this); + action_delete = new QAction(QET::Icons::FolderDelete, tr("Supprimer la catégorie"), this); // initialise la barre d'outils toolbar = new QToolBar(this); diff --git a/sources/elementscategorieswidget.h b/sources/elementscategorieswidget.h index 61967801f..86343d11e 100644 --- a/sources/elementscategorieswidget.h +++ b/sources/elementscategorieswidget.h @@ -17,7 +17,7 @@ */ #ifndef ELEMENTS_CATEGORIES_WIDGET_H #define ELEMENTS_CATEGORIES_WIDGET_H -#include +#include class ElementsCategoriesList; /** This class provides a widget listing available elements categories along diff --git a/sources/elementscategory.cpp b/sources/elementscategory.cpp index 4beb2b2b9..c11d75849 100644 --- a/sources/elementscategory.cpp +++ b/sources/elementscategory.cpp @@ -280,7 +280,7 @@ void ElementsCategory::copy(MoveElementsDescription *mvt_desc) { // verifie que la source et la destination ne sont pas identiques if (target_category == this || target_category -> isChildOf(this)) { if (handler) { - handler -> errorWithACategory(this, tr("La copie d'une cat\351gorie vers elle-m\352me ou vers l'une de ses sous-cat\351gories n\'est pas g\351r\351e.")); + handler -> errorWithACategory(this, tr("La copie d'une catégorie vers elle-même ou vers l'une de ses sous-catégories n\'est pas gérée.")); } return; } @@ -469,13 +469,13 @@ void ElementsCategory::move(MoveElementsDescription *mvt_desc) { // empeche le deplacement s'il s'agit d'une categorie racine if (isRootCategory()) { - if (handler) handler -> errorWithACategory(this, tr("Il n'est pas possible de d\351placer une collection.")); + if (handler) handler -> errorWithACategory(this, tr("Il n'est pas possible de déplacer une collection.")); return; } // empeche le deplacement de la categorie dans une sous-categorie if (target_category == this || target_category -> isChildOf(this)) { - if (handler) handler -> errorWithACategory(this, tr("Le d\351placement d'une cat\351gorie dans une de ses sous-cat\351gories n'est pas possible.")); + if (handler) handler -> errorWithACategory(this, tr("Le déplacement d'une catégorie dans une de ses sous-catégories n'est pas possible.")); return; } @@ -553,7 +553,7 @@ void ElementsCategory::move(MoveElementsDescription *mvt_desc) { bool category_deletion = remove(); mvt_desc -> setSourceItemDeleted(category_deletion); if (!category_deletion && handler) { - handler -> errorWithACategory(this, tr("La suppression de cette cat\351gorie a \351chou\351.")); + handler -> errorWithACategory(this, tr("La suppression de cette catégorie a échoué.")); } } } @@ -580,7 +580,7 @@ void ElementsCategory::deleteUnusedElements(MoveElementsHandler *handler) { if (!parent_project -> usesElement(element -> location())) { bool element_deletion = element -> remove(); if (!element_deletion && handler) { - handler -> errorWithAnElement(element, tr("Impossible de supprimer l'\351l\351ment")); + handler -> errorWithAnElement(element, tr("Impossible de supprimer l'élément")); } } } @@ -601,7 +601,7 @@ void ElementsCategory::deleteEmptyCategories(MoveElementsHandler *handler) { if (!sub_category -> isEmpty()) { bool category_deletion = sub_category -> remove(); if (!category_deletion && handler) { - handler -> errorWithACategory(sub_category, tr("Impossible de supprimer la cat\351gorie")); + handler -> errorWithACategory(sub_category, tr("Impossible de supprimer la catégorie")); } } } diff --git a/sources/elementscategorydeleter.cpp b/sources/elementscategorydeleter.cpp index 8166f30b6..d317e5af5 100644 --- a/sources/elementscategorydeleter.cpp +++ b/sources/elementscategorydeleter.cpp @@ -54,10 +54,10 @@ bool ElementsCategoryDeleter::exec() { // gere le cas ou la suppression d'une collection est demandee if (category -> isCollection()) { - QMessageBox::StandardButton answer_0 = QET::MessageBox::question( + QMessageBox::StandardButton answer_0 = QET::QetMessageBox::question( this, tr("Vider la collection ?", "message box title"), - tr("\312tes-vous s\373r de vouloir vider cette collection ?", "message box content"), + tr("Êtes-vous s\373r de vouloir vider cette collection ?", "message box content"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel ); if (answer_0 != QMessageBox::Yes) return(false); @@ -71,13 +71,13 @@ bool ElementsCategoryDeleter::exec() { // avertissement pour la suppression d'une collection // confirmation #1 - QMessageBox::StandardButton answer_1 = QET::MessageBox::question( + QMessageBox::StandardButton answer_1 = QET::QetMessageBox::question( this, - tr("Supprimer la cat\351gorie ?", "message box title"), + tr("Supprimer la catégorie ?", "message box title"), tr( - "\312tes-vous s\373r de vouloir supprimer la cat\351gorie ?\nTous " - "les \351l\351ments et les cat\351gories contenus dans cette " - "cat\351gorie seront supprim\351s.", + "Êtes-vous s\373r de vouloir supprimer la catégorie ?\nTous " + "les éléments et les catégories contenus dans cette " + "catégorie seront supprimés.", "message box content" ), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel @@ -85,12 +85,12 @@ bool ElementsCategoryDeleter::exec() { if (answer_1 != QMessageBox::Yes) return(false); // confirmation #2 - QMessageBox::StandardButton answer_2 = QET::MessageBox::question( + QMessageBox::StandardButton answer_2 = QET::QetMessageBox::question( this, - tr("Supprimer la cat\351gorie ?", "message box title"), + tr("Supprimer la catégorie ?", "message box title"), tr( - "\312tes-vous vraiment s\373r de vouloir supprimer cette " - "cat\351gorie ?\nLes changements seront d\351finitifs.", + "Êtes-vous vraiment s\373r de vouloir supprimer cette " + "catégorie ?\nLes changements seront définitifs.", "message box content" ), QMessageBox::Yes|QMessageBox::No|QMessageBox::Cancel @@ -99,10 +99,10 @@ bool ElementsCategoryDeleter::exec() { // supprime la categorie if (!category -> remove()) { - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, - tr("Suppression de la cat\351gorie", "message box title"), - tr("La suppression de la cat\351gorie a \351chou\351.", "message box content") + tr("Suppression de la catégorie", "message box title"), + tr("La suppression de la catégorie a échoué.", "message box content") ); return(false); } diff --git a/sources/elementscategorydeleter.h b/sources/elementscategorydeleter.h index 04c420266..a5981f720 100644 --- a/sources/elementscategorydeleter.h +++ b/sources/elementscategorydeleter.h @@ -19,7 +19,7 @@ #define ELEMENTS_CATEGORY_DELETER_H #include "fileelementscategory.h" #include "elementslocation.h" -#include +#include /** This class provide an abstract way to delete an elements category along with its child elements and subcategories. It always requires a double confirmation diff --git a/sources/elementscategoryeditor.cpp b/sources/elementscategoryeditor.cpp index 41ac58a1e..de5abbd69 100644 --- a/sources/elementscategoryeditor.cpp +++ b/sources/elementscategoryeditor.cpp @@ -42,10 +42,10 @@ ElementsCategoryEditor::ElementsCategoryEditor(const ElementsLocation &category_ if (category_item) category_item = category_item -> toCategory(); if (!category_item || !category_item -> isCategory()) { - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, - tr("Cat\351gorie inexistante", "message box title"), - tr("La cat\351gorie demand\351e n'existe pas. Abandon.", "message box content") + tr("Catégorie inexistante", "message box title"), + tr("La catégorie demandée n'existe pas. Abandon.", "message box content") ); return; } else { @@ -53,7 +53,7 @@ ElementsCategoryEditor::ElementsCategoryEditor(const ElementsLocation &category_ } if (mode_edit) { - setWindowTitle(tr("\311diter une cat\351gorie", "window title")); + setWindowTitle(tr("Éditer une catégorie", "window title")); connect(buttons, SIGNAL(accepted()), this, SLOT(acceptUpdate())); // edition de categorie = affichage des noms deja existants @@ -61,21 +61,21 @@ ElementsCategoryEditor::ElementsCategoryEditor(const ElementsLocation &category_ internal_name_ -> setText(category -> pathName()); internal_name_ -> setReadOnly(true); } else { - setWindowTitle(tr("Cr\351er une nouvelle cat\351gorie", "window title")); + setWindowTitle(tr("Créer une nouvelle catégorie", "window title")); connect(buttons, SIGNAL(accepted()), this, SLOT(acceptCreation())); // nouvelle categorie = une ligne pre-machee NamesList cat_names; - cat_names.addName(QLocale::system().name().left(2), tr("Nom de la nouvelle cat\351gorie", "default name when creating a new category")); + cat_names.addName(QLocale::system().name().left(2), tr("Nom de la nouvelle catégorie", "default name when creating a new category")); names_list -> setNames(cat_names); } // gestion de la lecture seule if (!category -> 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 cette cat\351gorie. Elle sera donc ouverte 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 cette catégorie. Elle sera donc ouverte en lecture seule.", "message box content") ); names_list -> setReadOnly(true); internal_name_ -> setReadOnly(true); @@ -107,7 +107,7 @@ void ElementsCategoryEditor::buildDialog() { internal_name_layout -> addWidget(internal_name_); editor_layout -> addLayout(internal_name_layout); - editor_layout -> addWidget(new QLabel(tr("Vous pouvez sp\351cifier un nom par langue pour la cat\351gorie."))); + editor_layout -> addWidget(new QLabel(tr("Vous pouvez spécifier un nom par langue pour la catégorie."))); editor_layout -> addWidget(names_list); editor_layout -> addWidget(buttons); } @@ -124,10 +124,10 @@ void ElementsCategoryEditor::acceptCreation() { // exige un nom de dossier de la part de l'utilisateur if (!internal_name_ -> isValid()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Nom interne manquant", "message box title"), - tr("Vous devez sp\351cifier un nom interne.", "message box content") + tr("Vous devez spécifier un nom interne.", "message box content") ); return; } @@ -135,12 +135,12 @@ void ElementsCategoryEditor::acceptCreation() { // verifie que le nom interne n'est pas deja pris if (category -> category(dirname)) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, - tr("Nom interne d\351j\340 utilis\351", "message box title"), + tr("Nom interne déjà utilisé", "message box title"), tr( - "Le nom interne que vous avez choisi est d\351j\340 utilis\351 " - "par une cat\351gorie existante. Veuillez en choisir un autre.", + "Le nom interne que vous avez choisi est déjà utilisé " + "par une catégorie existante. Veuillez en choisir un autre.", "message box content" ) ); @@ -150,10 +150,10 @@ void ElementsCategoryEditor::acceptCreation() { // cree la nouvelle categorie ElementsCategory *new_category = category -> createCategory(dirname); if (!new_category) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Erreur", "message box title"), - tr("Impossible de cr\351er la cat\351gorie", "message box content") + tr("Impossible de créer la catégorie", "message box content") ); return; } @@ -166,10 +166,10 @@ void ElementsCategoryEditor::acceptCreation() { // ecriture de la if (!new_category -> write()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Erreur", "message box title"), - tr("Impossible d'enregistrer la cat\351gorie", "message box content") + tr("Impossible d'enregistrer la catégorie", "message box content") ); return; } diff --git a/sources/elementscategoryeditor.h b/sources/elementscategoryeditor.h index 4f82b9353..d09eb9984 100644 --- a/sources/elementscategoryeditor.h +++ b/sources/elementscategoryeditor.h @@ -17,7 +17,7 @@ */ #ifndef ELEMENTS_CATEGORY_EDITOR_H #define ELEMENTS_CATEGORY_EDITOR_H -#include +#include #include "elementslocation.h" class ElementsCategory; class NamesListWidget; diff --git a/sources/elementscollection.cpp b/sources/elementscollection.cpp index 12f8480a5..d7b0da3c2 100644 --- a/sources/elementscollection.cpp +++ b/sources/elementscollection.cpp @@ -148,7 +148,7 @@ ElementsCollectionItem *ElementsCollection::copy(ElementsCategory *target_catego ElementsCollectionItem *ElementsCollection::move(ElementsCategory *, MoveElementsHandler *handler) { if (ElementsCategory *root = rootCategory()) { if (handler) { - handler -> errorWithACategory(root, tr("Il n'est pas possible de d\351placer une collection.")); + handler -> errorWithACategory(root, tr("Il n'est pas possible de déplacer une collection.")); } } return(0); diff --git a/sources/elementscollectioncache.cpp b/sources/elementscollectioncache.cpp index a1cabcba4..5ba16e6c7 100644 --- a/sources/elementscollectioncache.cpp +++ b/sources/elementscollectioncache.cpp @@ -96,7 +96,7 @@ QString ElementsCollectionCache::locale() const { @return True if the format change was accepted, false otherwise. */ bool ElementsCollectionCache::setPixmapStorageFormat(const QString &format) { - if (QImageWriter::supportedImageFormats().contains(format.toAscii())) { + if (QImageWriter::supportedImageFormats().contains(format.toLatin1())) { pixmap_storage_format_= format; return(true); } diff --git a/sources/elementspanel.cpp b/sources/elementspanel.cpp index f682c06c1..867ca8879 100644 --- a/sources/elementspanel.cpp +++ b/sources/elementspanel.cpp @@ -287,10 +287,10 @@ void ElementsPanel::startElementDrag(const ElementsLocation &location) { mimeData -> setText(location_string); if (selected_item -> isCategory() || selected_item -> isCollection()) { - mimeData -> setData("application/x-qet-category-uri", location_string.toAscii()); + mimeData -> setData("application/x-qet-category-uri", location_string.toLatin1()); drag -> setPixmap(QET::Icons::Folder.pixmap(22, 22)); } else if (selected_item -> isElement()) { - mimeData -> setData("application/x-qet-element-uri", location_string.toAscii()); + mimeData -> setData("application/x-qet-element-uri", location_string.toLatin1()); // element temporaire pour fournir un apercu int elmt_creation_state; @@ -335,7 +335,7 @@ void ElementsPanel::startTitleBlockTemplateDrag(const TitleBlockTemplateLocation QMimeData *mime_data = new QMimeData(); mime_data -> setText(location_string); - mime_data -> setData("application/x-qet-titleblock-uri", location_string.toAscii()); + mime_data -> setData("application/x-qet-titleblock-uri", location_string.toLatin1()); QDrag *drag = new QDrag(this); drag -> setMimeData(mime_data); @@ -415,7 +415,7 @@ QTreeWidgetItem *ElementsPanel::addProject(QETProject *project) { } } - qtwi_project -> setStatusTip(0, tr("Double-cliquez pour r\351duire ou d\351velopper ce projet", "Status tip")); + qtwi_project -> setStatusTip(0, tr("Double-cliquez pour réduire ou développer ce projet", "Status tip")); return(qtwi_project); } @@ -438,8 +438,8 @@ QTreeWidgetItem *ElementsPanel::addCollection(ElementsCollection *collection) { QTreeWidgetItem *ElementsPanel::updateTemplatesCollectionItem(QTreeWidgetItem *tbt_collection_qtwi, TitleBlockTemplatesCollection *tbt_collection, PanelOptions options, bool freshly_created) { QTreeWidgetItem *tbtc_qtwi = GenericPanel::updateTemplatesCollectionItem(tbt_collection_qtwi, tbt_collection, options, freshly_created); if (tbt_collection && tbt_collection -> parentProject()) { - tbtc_qtwi -> setText(0, tr("Cartouches embarqu\351s")); - tbtc_qtwi -> setStatusTip(0, tr("Double-cliquez pour r\351duire ou d\351velopper cette collection de cartouches embarqu\351e", "Status tip")); + tbtc_qtwi -> setText(0, tr("Cartouches embarqués")); + tbtc_qtwi -> setStatusTip(0, tr("Double-cliquez pour réduire ou développer cette collection de cartouches embarquée", "Status tip")); } return(tbtc_qtwi); } @@ -449,7 +449,7 @@ QTreeWidgetItem *ElementsPanel::updateTemplateItem(QTreeWidgetItem *tb_template_ item -> setStatusTip( 0, tr( - "Cliquer-d\351posez ce mod\350le de cartouche sur un sch\351ma pour l'y appliquer.", + "Cliquer-déposez ce modèle de cartouche sur un schéma pour l'y appliquer.", "Status tip displayed when selecting a title block template" ) ); @@ -461,7 +461,7 @@ QTreeWidgetItem *ElementsPanel::updateElementsCategoryItem(QTreeWidgetItem *cate item -> setStatusTip( 0, tr( - "Double-cliquez pour r\351duire ou d\351velopper cette cat\351gorie d'\351l\351ments", + "Double-cliquez pour réduire ou développer cette catégorie d'éléments", "Status tip displayed by elements category" ) ); @@ -472,8 +472,8 @@ QTreeWidgetItem *ElementsPanel::updateElementsCategoryItem(QTreeWidgetItem *cate QTreeWidgetItem *ElementsPanel::updateElementsCollectionItem(QTreeWidgetItem *collection_qtwi, ElementsCollection *collection, PanelOptions options, bool freshly_created) { QTreeWidgetItem *c_qtwi = GenericPanel::updateElementsCollectionItem(collection_qtwi, collection, options, freshly_created); if (collection && collection -> project()) { - c_qtwi -> setText(0, tr("Collection embarqu\351e")); - c_qtwi -> setStatusTip(0, tr("Double-cliquez pour r\351duire ou d\351velopper cette collection d'\351l\351ments embarqu\351e", "Status tip")); + c_qtwi -> setText(0, tr("Collection embarquée")); + c_qtwi -> setStatusTip(0, tr("Double-cliquez pour réduire ou développer cette collection d'éléments embarquée", "Status tip")); } return(c_qtwi); } @@ -482,7 +482,7 @@ QTreeWidgetItem *ElementsPanel::updateElementItem(QTreeWidgetItem *element_qtwi, QTreeWidgetItem *item = GenericPanel::updateElementItem(element_qtwi, element, options, freshly_created); QString status_tip = tr( - "Cliquer-d\351posez cet \351l\351ment sur un sch\351ma pour y ins\351rer un \351l\351ment \253 %1 \273, double-cliquez dessus pour l'\351diter", + "Cliquer-déposez cet élément sur un schéma pour y insérer un élément « %1 », double-cliquez dessus pour l'éditer", "Status tip displayed in the status bar when selecting an element" ); item -> setStatusTip(0, status_tip.arg(item -> text(0))); @@ -587,8 +587,8 @@ void ElementsPanel::reload(bool reload_collections) { TitleBlockTemplatesCollection *common_tbt_collection = QETApp::commonTitleBlockTemplatesCollection(); common_tbt_collection_item_ = addTemplatesCollection(common_tbt_collection, invisibleRootItem()); common_tbt_collection_item_ -> setIcon(0, system_icon); - common_tbt_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour r\351duire ou d\351velopper la collection de cartouches QElectroTech", "Status tip")); - common_tbt_collection_item_ -> setWhatsThis(0, tr("Ceci est la collection de cartouches fournie avec QElectroTech. Install\351e en tant que composant syst\350me, vous ne pouvez normalement pas la personnaliser.", "\"What's this\" tip")); + common_tbt_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour réduire ou développer la collection de cartouches QElectroTech", "Status tip")); + common_tbt_collection_item_ -> setWhatsThis(0, tr("Ceci est la collection de cartouches fournie avec QElectroTech. Installée en tant que composant système, vous ne pouvez normalement pas la personnaliser.", "\"What's this\" tip")); if (first_reload_) common_tbt_collection_item_ -> setExpanded(true); // load the common elements collection @@ -596,8 +596,8 @@ void ElementsPanel::reload(bool reload_collections) { // first check local QETApp::commonElementsCollection()->cache()->setLocale(QETApp::langFromSetting()); common_collection_item_ = addCollection(QETApp::commonElementsCollection()); - common_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour r\351duire ou d\351velopper la collection d'\351l\351ments QElectroTech", "Status tip")); - common_collection_item_ -> setWhatsThis(0, tr("Ceci est la collection d'\351l\351ments fournie avec QElectroTech. Install\351e en tant que composant syst\350me, vous ne pouvez normalement pas la personnaliser.", "\"What's this\" tip")); + common_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour réduire ou développer la collection d'éléments QElectroTech", "Status tip")); + common_collection_item_ -> setWhatsThis(0, tr("Ceci est la collection d'éléments fournie avec QElectroTech. Installée en tant que composant système, vous ne pouvez normalement pas la personnaliser.", "\"What's this\" tip")); if (first_reload_) common_collection_item_ -> setExpanded(true); } @@ -605,8 +605,8 @@ void ElementsPanel::reload(bool reload_collections) { TitleBlockTemplatesCollection *custom_tbt_collection = QETApp::customTitleBlockTemplatesCollection(); custom_tbt_collection_item_ = addTemplatesCollection(custom_tbt_collection, invisibleRootItem()); custom_tbt_collection_item_ -> setIcon(0, user_icon); - custom_tbt_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour r\351duire ou d\351velopper votre collection personnelle de cartouches", "Status tip")); - custom_tbt_collection_item_ -> setWhatsThis(0, tr("Ceci est votre collection personnelle de cartouches -- utilisez-la pour cr\351er, stocker et \351diter vos propres cartouches.", "\"What's this\" tip")); + custom_tbt_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour réduire ou développer votre collection personnelle de cartouches", "Status tip")); + custom_tbt_collection_item_ -> setWhatsThis(0, tr("Ceci est votre collection personnelle de cartouches -- utilisez-la pour créer, stocker et éditer vos propres cartouches.", "\"What's this\" tip")); if (first_reload_) custom_tbt_collection_item_ -> setExpanded(true); // load the custom elements collection @@ -614,8 +614,8 @@ void ElementsPanel::reload(bool reload_collections) { // first check local QETApp::customElementsCollection()->cache()->setLocale(QETApp::langFromSetting()); custom_collection_item_ = addCollection(QETApp::customElementsCollection()); - custom_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour r\351duire ou d\351velopper votre collection personnelle d'\351l\351ments", "Status tip")); - custom_collection_item_ -> setWhatsThis(0, tr("Ceci est votre collection personnelle d'\351l\351ments -- utilisez-la pour cr\351er, stocker et \351diter vos propres \351l\351ments.", "\"What's this\" tip")); + custom_collection_item_ -> setStatusTip(0, tr("Double-cliquez pour réduire ou développer votre collection personnelle d'éléments", "Status tip")); + custom_collection_item_ -> setWhatsThis(0, tr("Ceci est votre collection personnelle d'éléments -- utilisez-la pour créer, stocker et éditer vos propres éléments.", "\"What's this\" tip")); if (first_reload_) custom_collection_item_ -> setExpanded(true); } diff --git a/sources/elementspanel.h b/sources/elementspanel.h index 47622b759..9a632c5d4 100644 --- a/sources/elementspanel.h +++ b/sources/elementspanel.h @@ -17,7 +17,7 @@ */ #ifndef PANELAPPAREILS_H #define PANELAPPAREILS_H -#include +#include #include "genericpanel.h" #include "elementslocation.h" #include "templatelocation.h" diff --git a/sources/elementspanelwidget.cpp b/sources/elementspanelwidget.cpp index 3dcbc5955..d74c06351 100644 --- a/sources/elementspanelwidget.cpp +++ b/sources/elementspanelwidget.cpp @@ -54,31 +54,31 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) { // initialise les actions open_directory = new QAction(QET::Icons::DocumentOpen, tr("Ouvrir le dossier correspondant"), this); - copy_path = new QAction(QET::Icons::CopyFile, tr("Copier le chemin"), this); + copy_path = new QAction(QET::Icons::IC_CopyFile, tr("Copier le chemin"), this); reload = new QAction(QET::Icons::ViewRefresh, tr("Recharger les collections"), this); - new_category = new QAction(QET::Icons::FolderNew, tr("Nouvelle cat\351gorie"), this); - edit_category = new QAction(QET::Icons::FolderEdit, tr("\311diter la cat\351gorie"), this); - delete_category = new QAction(QET::Icons::FolderDelete, tr("Supprimer la cat\351gorie"), this); + new_category = new QAction(QET::Icons::FolderNew, tr("Nouvelle catégorie"), this); + edit_category = new QAction(QET::Icons::FolderEdit, tr("Éditer la catégorie"), this); + delete_category = new QAction(QET::Icons::FolderDelete, tr("Supprimer la catégorie"), this); delete_collection = new QAction(QET::Icons::FolderDelete, tr("Vider la collection"), this); - new_element = new QAction(QET::Icons::ElementNew, tr("Nouvel \351l\351ment"), this); - edit_element = new QAction(QET::Icons::ElementEdit, tr("\311diter l'\351l\351ment"), this); - delete_element = new QAction(QET::Icons::ElementDelete, tr("Supprimer l'\351l\351ment"), this); - open_element = new QAction(QET::Icons::DocumentImport, tr("Ouvrir un fichier \351l\351ment"), this); + new_element = new QAction(QET::Icons::ElementNew, tr("Nouvel élément"), this); + edit_element = new QAction(QET::Icons::ElementEdit, tr("Éditer l'élément"), this); + delete_element = new QAction(QET::Icons::ElementDelete, tr("Supprimer l'élément"), this); + open_element = new QAction(QET::Icons::DocumentImport, tr("Ouvrir un fichier élément"), this); prj_activate = new QAction(QET::Icons::ProjectFile, tr("Basculer vers ce projet"), this); prj_close = new QAction(QET::Icons::DocumentClose, tr("Fermer ce projet"), this); - prj_edit_prop = new QAction(QET::Icons::DialogInformation, tr("Propri\351t\351s du projet"), this); - prj_prop_diagram = new QAction(QET::Icons::DialogInformation, tr("Propri\351t\351s du sch\351ma"), this); - prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un sch\351ma"), this); - prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer ce sch\351ma"), this); - prj_move_diagram_up = new QAction(QET::Icons::GoUp, tr("Remonter ce sch\351ma"), this); - prj_move_diagram_down = new QAction(QET::Icons::GoDown, tr("Abaisser ce sch\351ma"), this); - prj_move_diagram_upx10 = new QAction(QET::Icons::GoUp, tr("Remonter ce sch\351ma x10"), this); - prj_move_diagram_downx10 = new QAction(QET::Icons::GoDown, tr("Abaisser ce sch\351ma x10"), this); - tbt_add = new QAction(QET::Icons::TitleBlock, tr("Nouveau mod\350le"), this); - tbt_edit = new QAction(QET::Icons::TitleBlock, tr("\311diter ce mod\350le"), this); - tbt_remove = new QAction(QET::Icons::TitleBlock, tr("Supprimer ce mod\350le"), this); - move_elements_ = new QAction(QET::Icons::MoveFile, tr("D\351placer dans cette cat\351gorie"), this); - copy_elements_ = new QAction(QET::Icons::CopyFile, tr("Copier dans cette cat\351gorie"), this); + prj_edit_prop = new QAction(QET::Icons::DialogInformation, tr("Propriétés du projet"), this); + prj_prop_diagram = new QAction(QET::Icons::DialogInformation, tr("Propriétés du schéma"), this); + prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un schéma"), this); + prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer ce schéma"), this); + prj_move_diagram_up = new QAction(QET::Icons::GoUp, tr("Remonter ce schéma"), this); + prj_move_diagram_down = new QAction(QET::Icons::GoDown, tr("Abaisser ce schéma"), this); + prj_move_diagram_upx10 = new QAction(QET::Icons::GoUp, tr("Remonter ce schéma x10"), this); + prj_move_diagram_downx10 = new QAction(QET::Icons::GoDown, tr("Abaisser ce schéma x10"), this); + tbt_add = new QAction(QET::Icons::TitleBlock, tr("Nouveau modèle"), this); + tbt_edit = new QAction(QET::Icons::TitleBlock, tr("Éditer ce modèle"), this); + tbt_remove = new QAction(QET::Icons::TitleBlock, tr("Supprimer ce modèle"), this); + move_elements_ = new QAction(QET::Icons::IC_MoveFile, tr("Déplacer dans cette catégorie"), this); + copy_elements_ = new QAction(QET::Icons::IC_CopyFile, tr("Copier dans cette catégorie"), this); cancel_elements_ = new QAction(QET::Icons::Cancel, tr("Annuler"), this); erase_textfield = new QAction(QET::Icons::EditClearLocationBar, tr("Effacer le filtre"), this); @@ -92,12 +92,13 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) { filter_toolbar -> addWidget(filter_label); filter_toolbar -> addWidget(filter_textfield); + //@TODO remove the commented code below // ajoute une petite marge a la droite du champ pour filtrer lorsque le style CleanLooks est utilise - if (qobject_cast(QApplication::style())) { - int l, t, r, b; - filter_toolbar -> getContentsMargins(&l, &t, &r, &b); - filter_toolbar -> setContentsMargins (l, t, r + 4, b); - } +// if (qobject_cast(QApplication::style())) { +// int l, t, r, b; +// filter_toolbar -> getContentsMargins(&l, &t, &r, &b); +// filter_toolbar -> setContentsMargins (l, t, r + 4, b); +// } context_menu = new QMenu(this); @@ -497,10 +498,10 @@ void ElementsPanelWidget::setElementsActionEnabled(bool enable) { int ElementsPanelWidget::launchCategoriesManager() { QDialog new_category_dialog(this); new_category_dialog.setMinimumSize(480, 280); - new_category_dialog.setWindowTitle(tr("Gestionnaire de cat\351gories", "window title")); + new_category_dialog.setWindowTitle(tr("Gestionnaire de catégories", "window title")); QVBoxLayout *layout = new QVBoxLayout(&new_category_dialog); - QLabel *explication = new QLabel(tr("Vous pouvez utiliser ce gestionnaire pour ajouter, supprimer ou modifier les cat\351gories.")); + QLabel *explication = new QLabel(tr("Vous pouvez utiliser ce gestionnaire pour ajouter, supprimer ou modifier les catégories.")); explication -> setAlignment(Qt::AlignJustify | Qt::AlignVCenter); explication -> setWordWrap(true); layout -> addWidget(explication); diff --git a/sources/elementspanelwidget.h b/sources/elementspanelwidget.h index 1bb868446..73e4fdb6f 100644 --- a/sources/elementspanelwidget.h +++ b/sources/elementspanelwidget.h @@ -17,7 +17,7 @@ */ #ifndef ELEMENTS_PANEL_WIDGET_H #define ELEMENTS_PANEL_WIDGET_H -#include +#include #include "elementspanel.h" /** This class embeds an elements panel under a toolbar providing various actions diff --git a/sources/elementtextsmover.h b/sources/elementtextsmover.h index 3b4951e9e..b0b7f875e 100644 --- a/sources/elementtextsmover.h +++ b/sources/elementtextsmover.h @@ -17,7 +17,7 @@ */ #ifndef ELEMENT_TEXTS_MOVER_H #define ELEMENT_TEXTS_MOVER_H -#include +#include #include "diagramcontent.h" class ElementTextItem; class Diagram; diff --git a/sources/exportdialog.cpp b/sources/exportdialog.cpp index 66d839c97..b2ae834bd 100644 --- a/sources/exportdialog.cpp +++ b/sources/exportdialog.cpp @@ -57,7 +57,7 @@ ExportDialog::ExportDialog(QETProject *project, QWidget *parent) : QDialog(paren // la taille minimale du dialogue est fixee setMinimumSize(800, 390); resize(minimumSize()); - setWindowTitle(tr("Exporter les sch\351mas du projet", "window title")); + setWindowTitle(tr("Exporter les schémas du projet", "window title")); // options d'export, dans le widget epw epw = new ExportPropertiesWidget(default_export_properties); @@ -72,11 +72,11 @@ ExportDialog::ExportDialog(QETProject *project, QWidget *parent) : QDialog(paren // disposition des elements QHBoxLayout *hLayout = new QHBoxLayout(); - hLayout -> addWidget(new QLabel(tr("Choisissez les sch\351mas que vous d\351sirez exporter ainsi que leurs dimensions :"))); + hLayout -> addWidget(new QLabel(tr("Choisissez les schémas que vous désirez exporter ainsi que leurs dimensions :"))); selectAll = new QPushButton(); deSelectAll = new QPushButton(); selectAll -> setText(tr("Tout cocher")); - deSelectAll -> setText(tr("Tout d\351cocher")); + deSelectAll -> setText(tr("Tout décocher")); hLayout -> addWidget(selectAll); hLayout -> addWidget(deSelectAll); connect(selectAll, SIGNAL(clicked()), this, SLOT(slot_selectAllClicked())); @@ -138,7 +138,7 @@ QWidget *ExportDialog::initDiagramsListPart() { diagrams_list_layout_ = new QGridLayout(); int line_count = 0; - diagrams_list_layout_ -> addWidget(new QLabel(tr("Sch\351ma")), line_count, 1, Qt::AlignHCenter | Qt::AlignVCenter); + diagrams_list_layout_ -> addWidget(new QLabel(tr("Schéma")), line_count, 1, Qt::AlignHCenter | Qt::AlignVCenter); diagrams_list_layout_ -> addWidget(new QLabel(tr("Nom de fichier")), line_count, 2, Qt::AlignHCenter | Qt::AlignVCenter); diagrams_list_layout_ -> addWidget(new QLabel(tr("Dimensions")), line_count, 3, Qt::AlignHCenter | Qt::AlignVCenter); @@ -764,12 +764,12 @@ void ExportDialog::slot_export() { } } if (filenames.count() != diagrams_to_export.count()) { - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, tr("Noms des fichiers cibles", "message box title"), tr( "Vous devez entrer un nom de fichier non vide et unique pour chaque " - "sch\351ma \340 exporter.", + "schéma à exporter.", "message box content" ) ); @@ -780,10 +780,10 @@ void ExportDialog::slot_export() { QDir target_dir_path(epw -> exportProperties().destination_directory); if (!target_dir_path.exists()) { - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, - tr("Dossier non sp\351cifi\351", "message box title"), - tr("Vous devez sp\351cifier le chemin du dossier dans lequel seront enregistr\351s les fichiers images.", "message box content"), + tr("Dossier non spécifié", "message box title"), + tr("Vous devez spécifier le chemin du dossier dans lequel seront enregistrés les fichiers images.", "message box content"), QMessageBox::Ok ); return; @@ -822,13 +822,13 @@ void ExportDialog::exportDiagram(ExportDiagramLine *diagram_line) { // verifie qu'il est possible d'ecrire dans le fichier en question if (file_infos.exists() && !file_infos.isWritable()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, - tr("Impossible d'\351crire dans ce fichier", "message box title"), + tr("Impossible d'écrire dans ce fichier", "message box title"), QString( tr( "Il semblerait que vous n'ayez pas les permissions " - "n\351cessaires pour \351crire dans le fichier %1.", + "nécessaires pour écrire dans le fichier %1.", "message box content" ) ).arg(diagram_path), @@ -942,7 +942,7 @@ void ExportDialog::slot_previewDiagram(int diagram_id) { // initialise un dialogue QDialog preview_dialog; - preview_dialog.setWindowTitle(tr("Aper\347u")); + preview_dialog.setWindowTitle(tr("Aperçu")); preview_dialog.setWindowState(preview_dialog.windowState() | Qt::WindowMaximized); QGraphicsScene *preview_scene = new QGraphicsScene(); @@ -1031,7 +1031,7 @@ ExportDialog::ExportDiagramLine::ExportDiagramLine(Diagram *dia, QSize diagram_s // titre et nom de fichier du schema QString diagram_title = diagram -> title(); - if (diagram_title.isEmpty()) diagram_title = QObject::tr("Sch\351ma sans titre"); + if (diagram_title.isEmpty()) diagram_title = QObject::tr("Schéma sans titre"); QString diagram_filename = diagram -> title(); if (diagram_filename.isEmpty()) diagram_filename = QObject::tr("schema"); diagram_filename = QET::stringToFileName(diagram_filename); @@ -1062,14 +1062,14 @@ ExportDialog::ExportDiagramLine::ExportDiagramLine(Diagram *dia, QSize diagram_s reset_size = new QPushButton(); reset_size -> setIcon(QET::Icons::Start); - reset_size -> setToolTip(QObject::tr("R\351initialiser les dimensions")); + reset_size -> setToolTip(QObject::tr("Réinitialiser les dimensions")); preview = new QPushButton(); preview -> setIcon(QET::Icons::ZoomOriginal); - preview -> setToolTip(QObject::tr("Aper\347u")); + preview -> setToolTip(QObject::tr("Aperçu")); clipboard = new QPushButton(); - clipboard -> setIcon(QET::Icons::CopyFile); + clipboard -> setIcon(QET::Icons::IC_CopyFile); clipboard -> setToolTip(QObject::tr("Exporter vers le presse-papier")); } diff --git a/sources/exportdialog.h b/sources/exportdialog.h index bf895782c..005d05eef 100644 --- a/sources/exportdialog.h +++ b/sources/exportdialog.h @@ -17,7 +17,7 @@ */ #ifndef EXPORTDIALOG_H #define EXPORTDIALOG_H -#include +#include #include "diagram.h" #include "qetproject.h" class QSvgGenerator; diff --git a/sources/exportproperties.cpp b/sources/exportproperties.cpp index f7d1f2c82..949f37969 100644 --- a/sources/exportproperties.cpp +++ b/sources/exportproperties.cpp @@ -16,9 +16,10 @@ along with QElectroTech. If not, see . */ #include "exportproperties.h" -#include #include "qetapp.h" +#include + /** Constructeur par defaut : * le repertoire de destination est le Bureau de l'utilisateur @@ -28,7 +29,7 @@ * la zone exportee est le schema avec son cadre et son cartouche */ ExportProperties::ExportProperties() : - destination_directory(QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)), + destination_directory(QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)), format("PNG"), draw_grid(false), draw_border(true), @@ -67,7 +68,7 @@ void ExportProperties::toSettings(QSettings &settings, const QString &prefix) co @param prefix prefixe a ajouter devant les noms des parametres */ void ExportProperties::fromSettings(QSettings &settings, const QString &prefix) { - QString desktop_path = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); + QString desktop_path = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); destination_directory.setPath(settings.value(prefix + "path", desktop_path).toString()); if (!destination_directory.exists()) destination_directory.setPath(desktop_path); diff --git a/sources/exportpropertieswidget.cpp b/sources/exportpropertieswidget.cpp index 076358dff..eca86b530 100644 --- a/sources/exportpropertieswidget.cpp +++ b/sources/exportpropertieswidget.cpp @@ -157,7 +157,7 @@ void ExportPropertiesWidget::build() { export_border = new QRadioButton(tr("Exporter le cadre"), groupbox_options); optionshlayout -> addWidget(export_border, 0, 0); exported_content_choices -> addButton(export_border); - export_elements = new QRadioButton(tr("Exporter les \351l\351ments"), groupbox_options); + export_elements = new QRadioButton(tr("Exporter les éléments"), groupbox_options); optionshlayout -> addWidget(export_elements, 0, 1); exported_content_choices -> addButton(export_elements); diff --git a/sources/exportpropertieswidget.h b/sources/exportpropertieswidget.h index d00df9d82..6629c28ad 100644 --- a/sources/exportpropertieswidget.h +++ b/sources/exportpropertieswidget.h @@ -17,7 +17,7 @@ */ #ifndef EXPORT_PROPERTIES_WIDGET_H #define EXPORT_PROPERTIES_WIDGET_H -#include +#include #include "exportproperties.h" /** diff --git a/sources/genericpanel.cpp b/sources/genericpanel.cpp index f6fcdc43d..0a81fe985 100644 --- a/sources/genericpanel.cpp +++ b/sources/genericpanel.cpp @@ -239,7 +239,7 @@ QTreeWidgetItem *GenericPanel::updateProjectItem(QTreeWidgetItem *project_qtwi, ); } project_qtwi -> setToolTip(0, final_tooltip); - QString project_whatsthis = tr("Ceci est un projet QElectroTech, c'est-\340-dire un fichier d'extension .qet regroupant plusieurs sch\351mas/folios. Il embarque \351galement les \351l\351ments et mod\350les de cartouches utilis\351s dans ces sch\351mas/folios.", "\"What's this\" tip"); + QString project_whatsthis = tr("Ceci est un projet QElectroTech, c'est-à-dire un fichier d'extension .qet regroupant plusieurs schémas/folios. Il embarque également les éléments et modèles de cartouches utilisés dans ces schémas/folios.", "\"What's this\" tip"); project_qtwi -> setWhatsThis(0, project_whatsthis); return(updateItem(project_qtwi, options, freshly_created)); } @@ -301,12 +301,12 @@ QTreeWidgetItem *GenericPanel::fillProjectItem(QTreeWidgetItem *project_qtwi, QE project_qtwi, options ); - QString collection_whatsthis = tr("Ceci est une collection embarqu\351e dans un fichier projet. Elle permet de stocker et g\351rer les \351l\351ments utilis\351s dans les sch\351mas du projet parent.", "\"What's this\" tip"); + QString collection_whatsthis = tr("Ceci est une collection embarquée dans un fichier projet. Elle permet de stocker et gérer les éléments utilisés dans les schémas du projet parent.", "\"What's this\" tip"); collection_qtwi -> setWhatsThis(0, collection_whatsthis); // special instructions for the integration category if (QTreeWidgetItem *integration_qtwi = itemForElementsCategory(project -> integrationCategory())) { - QString integration_whats_this = tr("Cette cat\351gorie d'\351l\351ments est utilis\351e pour int\351grer automatiquement dans le projet tout \351l\351ment utilis\351 sur un des sch\351mas de ce projet.", "\"What's this\" tip"); + QString integration_whats_this = tr("Cette catégorie d'éléments est utilisée pour intégrer automatiquement dans le projet tout élément utilisé sur un des schémas de ce projet.", "\"What's this\" tip"); integration_qtwi -> setWhatsThis(0, integration_whats_this); } @@ -365,7 +365,7 @@ QTreeWidgetItem *GenericPanel::updateDiagramItem(QTreeWidgetItem *diagram_qtwi, QString displayed_title = diagram -> title(); if (displayed_title.isEmpty()) { - displayed_title = tr("Sch\351ma sans titre", "Fallback label when a diagram has no title"); + displayed_title = tr("Schéma sans titre", "Fallback label when a diagram has no title"); } QString displayed_label; @@ -451,7 +451,7 @@ QTreeWidgetItem *GenericPanel::getItemForTemplatesCollection(TitleBlockTemplates QTreeWidgetItem *GenericPanel::updateTemplatesCollectionItem(QTreeWidgetItem *tbt_collection_qtwi, TitleBlockTemplatesCollection *tbt_collection, PanelOptions options, bool freshly_created) { Q_UNUSED(options) QString label = tbt_collection -> title(); - if (label.isEmpty()) label = tr("Mod\350les de cartouche"); + if (label.isEmpty()) label = tr("Modèles de cartouche"); tbt_collection_qtwi -> setText(0, label); tbt_collection_qtwi -> setToolTip(0, tbt_collection -> location().toString()); @@ -541,9 +541,9 @@ QTreeWidgetItem *GenericPanel::getItemForTemplate(const TitleBlockTemplateLocati */ QTreeWidgetItem *GenericPanel::updateTemplateItem(QTreeWidgetItem *tb_template_qtwi, const TitleBlockTemplateLocation &tb_template, PanelOptions options, bool freshly_created) { Q_UNUSED(options) - tb_template_qtwi -> setText(0, tr("Mod\350le \"%1\"", "used to display a title block template").arg(tb_template.name())); + tb_template_qtwi -> setText(0, tr("Modèle \"%1\"", "used to display a title block template").arg(tb_template.name())); QString tbt_whatsthis = tr( - "Ceci est un mod\350le de cartouche, qui peut \352tre appliqu\351 \340 un sch\351ma.", + "Ceci est un modèle de cartouche, qui peut être appliqué à un schéma.", "\"What's this\" tip" ); tb_template_qtwi -> setWhatsThis(0, tbt_whatsthis); @@ -728,7 +728,7 @@ QTreeWidgetItem *GenericPanel::updateElementsCategoryItem(QTreeWidgetItem *categ Q_UNUSED(options) if (!category || !category_qtwi) return(0); QString category_whatsthis = tr( - "Ceci est une cat\351gorie d'\351l\351ments, un simple container permettant d'organiser les collections d'\351l\351ments", + "Ceci est une catégorie d'éléments, un simple container permettant d'organiser les collections d'éléments", "\"What's this\" tip" ); category_qtwi -> setWhatsThis(0, category_whatsthis); @@ -881,7 +881,7 @@ QTreeWidgetItem *GenericPanel::updateElementItem(QTreeWidgetItem *element_qtwi, ElementsLocation element_location = element -> location(); element_qtwi -> setText(0, cache -> name()); - QString element_whatsthis = tr("Ceci est un \351l\351ment que vous pouvez ins\351rer dans un sch\351ma.", "\"What's this\" tip"); + QString element_whatsthis = tr("Ceci est un élément que vous pouvez insérer dans un schéma.", "\"What's this\" tip"); element_qtwi -> setWhatsThis(0, element_whatsthis); if (options & DisplayElementsPreview) { element_qtwi -> setIcon(0, QIcon(cache -> pixmap())); @@ -1167,7 +1167,7 @@ void GenericPanel::markItemAsUnused(QTreeWidgetItem *qtwi) { t.setColorAt(0, QColor("#ffc0c0")); t.setColorAt(1, QColor("#ffffff")); qtwi -> setBackground(0, QBrush(t)); - qtwi -> setToolTip(0, QString(tr("%1 [non utilis\351 dans le projet]")).arg(qtwi -> toolTip(0))); + qtwi -> setToolTip(0, QString(tr("%1 [non utilisé dans le projet]")).arg(qtwi -> toolTip(0))); } /** @@ -1226,7 +1226,7 @@ void GenericPanel::removeObsoleteItems(const QList &expected_items, QTreeWidg */ template T GenericPanel::valueForItem(QTreeWidgetItem *item) const { - return(qVariantValue(item -> data(0, GenericPanel::Item))); + return item -> data(0, GenericPanel::Item).value(); } template TitleBlockTemplateLocation GenericPanel::valueForItem(QTreeWidgetItem *item) const; diff --git a/sources/integrationmoveelementshandler.cpp b/sources/integrationmoveelementshandler.cpp index 62a102218..542882460 100644 --- a/sources/integrationmoveelementshandler.cpp +++ b/sources/integrationmoveelementshandler.cpp @@ -16,7 +16,7 @@ along with QElectroTech. If not, see . */ #include "integrationmoveelementshandler.h" -#include +#include #include "elementscategory.h" #include "elementdefinition.h" #include "qfilenameedit.h" @@ -118,14 +118,14 @@ QET::Action IntegrationMoveElementsHandler::askUser(ElementDefinition *src, Elem void IntegrationMoveElementsHandler::initDialog() { if (integ_dialog_) return; integ_dialog_ = new QDialog(parent_widget_); - integ_dialog_ -> setWindowTitle(tr("Int\351gration d'un \351l\351ment")); + integ_dialog_ -> setWindowTitle(tr("Intégration d'un élément")); dialog_label_ = new QLabel( QString( tr( - "L'\351l\351ment a d\351j\340 \351t\351 " - "int\351gr\351 dans le projet. Toutefois, la version que vous " - "tentez de poser semble diff\351rente. Que souhaitez-vous " + "L'élément a déjà été " + "intégré dans le projet. Toutefois, la version que vous " + "tentez de poser semble différente. Que souhaitez-vous " "faire ?", "dialog content - %1 is an element's path name" ) @@ -135,7 +135,7 @@ void IntegrationMoveElementsHandler::initDialog() { use_existing_elmt_ = new QRadioButton( QString( tr( - "Utiliser l'\351l\351ment d\351j\340 int\351gr\351", + "Utiliser l'élément déjà intégré", "dialog content" ) ) @@ -144,7 +144,7 @@ void IntegrationMoveElementsHandler::initDialog() { integrate_new_element_ = new QRadioButton( QString( tr( - "Int\351grer l'\351l\351ment d\351pos\351", + "Intégrer l'élément déposé", "dialog content" ) ) @@ -154,7 +154,7 @@ void IntegrationMoveElementsHandler::initDialog() { erase_element_ = new QRadioButton( QString( tr( - "\311craser l'\351l\351ment d\351j\340 int\351gr\351", + "Écraser l'élément déjà intégré", "dialog content" ) ) @@ -164,7 +164,7 @@ void IntegrationMoveElementsHandler::initDialog() { integrate_both_ = new QRadioButton( QString( tr( - "Faire cohabiter les deux \351l\351ments", + "Faire cohabiter les deux éléments", "dialog content" ) ) diff --git a/sources/integrationmoveelementshandler.h b/sources/integrationmoveelementshandler.h index 6f9ee7e02..c7678dc05 100644 --- a/sources/integrationmoveelementshandler.h +++ b/sources/integrationmoveelementshandler.h @@ -18,7 +18,7 @@ #ifndef INTEGRATION_MOVE_ELEMENTS_HANDLER_H #define INTEGRATION_MOVE_ELEMENTS_HANDLER_H #include "basicmoveelementshandler.h" -#include +#include /** This class implements the MoveElementsHandler Strategy class. It acts like a BasiMoveElementsHandler configured to answer QET::Abort to any question. diff --git a/sources/interactivemoveelementshandler.cpp b/sources/interactivemoveelementshandler.cpp index 26cb85f7c..b90452c73 100644 --- a/sources/interactivemoveelementshandler.cpp +++ b/sources/interactivemoveelementshandler.cpp @@ -16,7 +16,7 @@ along with QElectroTech. If not, see . */ #include "interactivemoveelementshandler.h" -#include +#include #include "elementscategory.h" #include "elementdefinition.h" #include "qfilenameedit.h" @@ -68,7 +68,7 @@ QET::Action InteractiveMoveElementsHandler::categoryAlreadyExists(ElementsCatego QLabel *question_label = new QLabel( QString( tr( - "La cat\351gorie \253\240%1\240\273 (%2) existe d\351j\340. " + "La catégorie « %1 » (%2) existe déjà. " "Que souhaitez-vous faire ?", "dialog content" ) @@ -116,7 +116,7 @@ QET::Action InteractiveMoveElementsHandler::elementAlreadyExists(ElementDefiniti QLabel *question_label = new QLabel( QString( tr( - "L'\351l\351ment \253\240%1\240\273 existe d\351j\340. " + "L'élément « %1 » existe déjà. " "Que souhaitez-vous faire ?", "dialog content" ) @@ -149,7 +149,7 @@ QET::Action InteractiveMoveElementsHandler::elementAlreadyExists(ElementDefiniti @return QET::Retry, QET::Ignore ou QET::Abort */ QET::Action InteractiveMoveElementsHandler::categoryIsNotReadable(ElementsCategory *category) { - QString message = QString(tr("La cat\351gorie %1 n'est pas accessible en lecture.", "message box content")).arg(category -> location().toString()); + QString message = QString(tr("La catégorie %1 n'est pas accessible en lecture.", "message box content")).arg(category -> location().toString()); return(retryErrorMessage(message)); } @@ -159,7 +159,7 @@ QET::Action InteractiveMoveElementsHandler::categoryIsNotReadable(ElementsCatego @return QET::Retry, QET::Ignore ou QET::Abort */ QET::Action InteractiveMoveElementsHandler::elementIsNotReadable(ElementDefinition *element) { - QString message = QString(tr("L'\351l\351ment %1 n'est pas accessible en lecture.", "message box content")).arg(element -> location().toString()); + QString message = QString(tr("L'élément %1 n'est pas accessible en lecture.", "message box content")).arg(element -> location().toString()); return(retryErrorMessage(message)); } @@ -169,7 +169,7 @@ QET::Action InteractiveMoveElementsHandler::elementIsNotReadable(ElementDefiniti @return QET::Retry, QET::Ignore ou QET::Abort */ QET::Action InteractiveMoveElementsHandler::categoryIsNotWritable(ElementsCategory *category) { - QString message = QString(tr("La cat\351gorie %1 n'est pas accessible en \351criture.", "message box content")).arg(category -> location().toString()); + QString message = QString(tr("La catégorie %1 n'est pas accessible en écriture.", "message box content")).arg(category -> location().toString()); return(retryErrorMessage(message)); } @@ -179,7 +179,7 @@ QET::Action InteractiveMoveElementsHandler::categoryIsNotWritable(ElementsCatego @return QET::Retry, QET::Ignore ou QET::Abort */ QET::Action InteractiveMoveElementsHandler::elementIsNotWritable(ElementDefinition *element) { - QString message = QString(tr("L'\351l\351ment %1 n'est pas accessible en \351criture.", "message box content")).arg(element -> location().toString()); + QString message = QString(tr("L'élément %1 n'est pas accessible en écriture.", "message box content")).arg(element -> location().toString()); return(retryErrorMessage(message)); } @@ -191,7 +191,7 @@ QET::Action InteractiveMoveElementsHandler::elementIsNotWritable(ElementDefiniti */ QET::Action InteractiveMoveElementsHandler::errorWithACategory(ElementsCategory *category, const QString &message) { QString category_location = category -> location().toString(); - QString error_message = QString("Une erreur s'est produite avec la cat\351gorie %1\240: %2").arg(category_location).arg(message); + QString error_message = QString("Une erreur s'est produite avec la catégorie %1 : %2").arg(category_location).arg(message); simpleErrorMessage(error_message); return(QET::Ignore); } @@ -204,7 +204,7 @@ QET::Action InteractiveMoveElementsHandler::errorWithACategory(ElementsCategory */ QET::Action InteractiveMoveElementsHandler::errorWithAnElement(ElementDefinition *element, const QString &message) { QString element_location = element -> location().toString(); - QString error_message = QString("Une erreur s'est produite avec l'\351l\351ment %1\240: %2").arg(element_location).arg(message); + QString error_message = QString("Une erreur s'est produite avec l'élément %1 : %2").arg(element_location).arg(message); simpleErrorMessage(error_message); return(QET::Ignore); } @@ -240,8 +240,8 @@ void InteractiveMoveElementsHandler::initConflictDialog() { // initialisation des boutons rename_button_ = new QPushButton(tr("Renommer")); - erase_button_ = new QPushButton(tr("\311craser")); - erase_all_button_ = new QPushButton(tr("\311craser tout")); + erase_button_ = new QPushButton(tr("Écraser")); + erase_all_button_ = new QPushButton(tr("Écraser tout")); ignore_button_ = new QPushButton(tr("Ignorer")); ignore_all_button_ = new QPushButton(tr("Ignorer tout")); abort_button_ = new QPushButton(tr("Annuler")); @@ -357,7 +357,7 @@ QWidget *InteractiveMoveElementsHandler::conflictDialogMainWidget() const { @return L'action choisie par l'utilisateur */ QET::Action InteractiveMoveElementsHandler::retryErrorMessage(const QString &message) const { - int todo = QET::MessageBox::critical( + int todo = QET::QetMessageBox::critical( parent_widget_, tr("Erreur", "message box title"), message, @@ -379,7 +379,7 @@ QET::Action InteractiveMoveElementsHandler::retryErrorMessage(const QString &mes @param message Message d'erreur a afficher */ void InteractiveMoveElementsHandler::simpleErrorMessage(const QString &message) const { - QET::MessageBox::critical( + QET::QetMessageBox::critical( parent_widget_, tr("Erreur", "message box title"), message, diff --git a/sources/nameslistwidget.cpp b/sources/nameslistwidget.cpp index 76cdc3244..7e04a5779 100644 --- a/sources/nameslistwidget.cpp +++ b/sources/nameslistwidget.cpp @@ -35,11 +35,11 @@ NamesListWidget::NamesListWidget(QWidget *parent) : QWidget(parent), read_only(f tree_names -> setHeaderLabels(headers); tree_names -> setWhatsThis( tr( - "Cette liste vous permet de saisir un court texte de fa\347on \340 ce" + "Cette liste vous permet de saisir un court texte de façon à ce" " qu'il soit traduisible dans d'autres langues. Pour ce faire, elle" " associe des codes ISO 639-1 de langues (ex. : \"fr\" pour" - " fran\347ais) aux traductions du texte en question dans ces" - " m\352mes langues.", + " français) aux traductions du texte en question dans ces" + " mêmes langues.", "\"What's this\" tip" ) ); @@ -83,7 +83,7 @@ void NamesListWidget::addLine() { bool NamesListWidget::checkOneName() { updateHash(); if (!hash_names.count()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Il doit y avoir au moins un nom.", "message box title"), tr("Vous devez entrer au moins un nom.", "message box content") diff --git a/sources/nameslistwidget.h b/sources/nameslistwidget.h index 2a6ee7895..aebf2968b 100644 --- a/sources/nameslistwidget.h +++ b/sources/nameslistwidget.h @@ -17,7 +17,7 @@ */ #ifndef NAMES_LIST_WIDGET_H #define NAMES_LIST_WIDGET_H -#include +#include #include "nameslist.h" /** This class provides a widget enabling users to enter localized names for diff --git a/sources/newelementwizard.cpp b/sources/newelementwizard.cpp index 4301992e4..571ab7712 100644 --- a/sources/newelementwizard.cpp +++ b/sources/newelementwizard.cpp @@ -39,14 +39,14 @@ NewElementWizard::NewElementWizard(QWidget *parent, Qt::WindowFlags f) : { setOptions(options() & ~QWizard::NoCancelButton); -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN setWizardStyle(QWizard::AeroStyle); -#elif defined(Q_WS_MAC) +#elif defined(Q_OS_MAC) setWizardStyle(QWizard::MacStyle); #endif setPixmap(LogoPixmap, QPixmap(":/ico/256x256/qelectrotech.png").scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation)); - setWindowTitle(tr("Cr\351er un nouvel \351l\351ment : Assistant", "window title")); + setWindowTitle(tr("Créer un nouvel élément : Assistant", "window title")); setButtonText(QWizard::NextButton, tr("&Suivant >")); addPage(buildStep1()); addPage(buildStep2()); @@ -94,8 +94,8 @@ bool NewElementWizard::preselectCategory(ElementsCategory *category) { QWizardPage *NewElementWizard::buildStep1() { QWizardPage *page = new QWizardPage(); page -> setProperty("WizardState", Category); - page -> setTitle(tr("\311tape 1/3 : Cat\351gorie parente", "wizard page title")); - page -> setSubTitle(tr("S\351lectionnez une cat\351gorie dans laquelle enregistrer le nouvel \351l\351ment.", "wizard page subtitle")); + page -> setTitle(tr("Étape 1/3 : Catégorie parente", "wizard page title")); + page -> setSubTitle(tr("Sélectionnez une catégorie dans laquelle enregistrer le nouvel élément.", "wizard page subtitle")); QVBoxLayout *layout = new QVBoxLayout(); categories_list = new ElementsCategoriesWidget(); @@ -111,13 +111,13 @@ QWizardPage *NewElementWizard::buildStep1() { QWizardPage *NewElementWizard::buildStep2() { QWizardPage *page = new QWizardPage(); page -> setProperty("WizardState", Filename); - page -> setTitle(tr("\311tape 2/3 : Nom du fichier", "wizard page title")); - page -> setSubTitle(tr("Indiquez le nom du fichier dans lequel enregistrer le nouvel \351l\351ment.", "wizard page subtitle")); + page -> setTitle(tr("Étape 2/3 : Nom du fichier", "wizard page title")); + page -> setSubTitle(tr("Indiquez le nom du fichier dans lequel enregistrer le nouvel élément.", "wizard page subtitle")); QVBoxLayout *layout = new QVBoxLayout(); qle_filename = new QFileNameEdit(tr("nouvel_element")); qle_filename -> selectAll(); - QLabel *explication2 = new QLabel(tr("Vous n'\352tes pas oblig\351 de pr\351ciser l'extension *.elmt. Elle sera ajout\351e automatiquement.")); + QLabel *explication2 = new QLabel(tr("Vous n'êtes pas obligé de préciser l'extension *.elmt. Elle sera ajoutée automatiquement.")); explication2 -> setAlignment(Qt::AlignJustify | Qt::AlignVCenter); explication2 -> setWordWrap(true); layout -> addWidget(qle_filename); @@ -134,13 +134,13 @@ QWizardPage *NewElementWizard::buildStep2() { QWizardPage *NewElementWizard::buildStep3() { QWizardPage *page = new QWizardPage(); page -> setProperty("WizardState", Names); - page -> setTitle(tr("\311tape 3/3 : Noms de l'\351l\351ment", "wizard page title")); - page -> setSubTitle(tr("Indiquez le ou les noms de l'\351l\351ment.", "wizard page subtitle")); + page -> setTitle(tr("Étape 3/3 : Noms de l'élément", "wizard page title")); + page -> setSubTitle(tr("Indiquez le ou les noms de l'élément.", "wizard page subtitle")); QVBoxLayout *layout = new QVBoxLayout(); element_names = new NamesListWidget(); NamesList hash_name; - hash_name.addName(QLocale::system().name().left(2), tr("Nom du nouvel \351l\351ment", "default name when creating a new element")); + hash_name.addName(QLocale::system().name().left(2), tr("Nom du nouvel élément", "default name when creating a new element")); element_names -> setNames(hash_name); layout -> addWidget(element_names); @@ -179,10 +179,10 @@ bool NewElementWizard::validStep1() { } if (!step1_ok) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( parentWidget(), tr("Erreur", "message box title"), - tr("Vous devez s\351lectionner une cat\351gorie.", "message box content") + tr("Vous devez sélectionner une catégorie.", "message box content") ); } return(step1_ok); @@ -199,7 +199,7 @@ bool NewElementWizard::validStep2() { // un nom doit avoir ete entre if (file_name.isEmpty()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Erreur", "message box title"), tr("Vous devez entrer un nom de fichier", "message box content") @@ -211,20 +211,20 @@ bool NewElementWizard::validStep2() { // le nom de fichier contient peut etre des caracteres interdits if (QET::containsForbiddenCharacters(file_name)) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Erreur", "message box title"), - tr("Merci de ne pas utiliser les caract\350res suivants : \\ / : * ? \" < > |", "message box content") + tr("Merci de ne pas utiliser les caractères suivants : \\ / : * ? \" < > |", "message box content") ); return(false); } // le fichier existe peut etre deja if (chosen_category -> element(file_name)) { - QMessageBox::StandardButton answer = QET::MessageBox::question( + QMessageBox::StandardButton answer = QET::QetMessageBox::question( this, - "\311craser le fichier ?", - "Le fichier existe d\351j\340. Souhaitez-vous l'\351craser ?", + "Écraser le fichier ?", + "Le fichier existe déjà. Souhaitez-vous l'écraser ?", QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::No ); diff --git a/sources/newelementwizard.h b/sources/newelementwizard.h index 13c517522..52c3772aa 100644 --- a/sources/newelementwizard.h +++ b/sources/newelementwizard.h @@ -17,7 +17,7 @@ */ #ifndef NEW_ELEMENT_WIZARD_H #define NEW_ELEMENT_WIZARD_H -#include +#include class ElementsCategoriesWidget; class ElementsCategory; class NamesListWidget; diff --git a/sources/nomenclature.cpp b/sources/nomenclature.cpp index b98caf9fa..27b093de3 100644 --- a/sources/nomenclature.cpp +++ b/sources/nomenclature.cpp @@ -81,7 +81,7 @@ bool nomenclature::saveToCSVFile() { QString nomenclature::getNomenclature() { //Process... QString data = tr("NOMENCLATURE : ") + m_project -> title() + "\n\n"; - data += tr("Folio") +";"+ tr("Sch\351ma") +";"+ tr("D\351signation qet")+";"+ tr("Label") +";"+ tr("D\351signation")+";"+ tr("Commentaire") +";"+ tr("Fabricant") +";"+ tr("Reference") +";"+ tr("Machine-reference")+"\n"; + data += tr("Folio") +";"+ tr("Schéma") +";"+ tr("Désignation qet")+";"+ tr("Label") +";"+ tr("Désignation")+";"+ tr("Commentaire") +";"+ tr("Fabricant") +";"+ tr("Reference") +";"+ tr("Machine-reference")+"\n"; if(m_list_diagram.isEmpty()) return data; diff --git a/sources/nomenclature.h b/sources/nomenclature.h index caaef7504..0b88e5c1b 100644 --- a/sources/nomenclature.h +++ b/sources/nomenclature.h @@ -18,7 +18,7 @@ #ifndef NOMENCLATURE_H #define NOMENCLATURE_H -#include +#include #include "qetproject.h" #include "diagram.h" diff --git a/sources/projectconfigpages.cpp b/sources/projectconfigpages.cpp index d3d769927..76f1414ec 100644 --- a/sources/projectconfigpages.cpp +++ b/sources/projectconfigpages.cpp @@ -22,7 +22,7 @@ #include "conductorpropertieswidget.h" #include "diagramcontextwidget.h" #include "titleblockpropertieswidget.h" -#include +#include #include "ui/reportpropertiewidget.h" #include "ui/xrefpropertieswidget.h" #include "selectautonumw.h" @@ -114,7 +114,7 @@ ProjectMainConfigPage::~ProjectMainConfigPage() { @return the title for this page */ QString ProjectMainConfigPage::title() const { - return(tr("G\351n\351ral", "configuration page title")); + return(tr("Général", "configuration page title")); } /** @@ -158,12 +158,12 @@ QString ProjectMainConfigPage::projectTitle() const { Initialize widgets displayed by the page. */ void ProjectMainConfigPage::initWidgets() { - title_label_ = new QLabel(tr("Titre du projet\240:", "label when configuring")); + title_label_ = new QLabel(tr("Titre du projet :", "label when configuring")); title_value_ = new QLineEdit(); - title_information_ = new QLabel(tr("Ce titre sera disponible pour tous les sch\351mas de ce projet en tant que %projecttitle.", "informative label")); + title_information_ = new QLabel(tr("Ce titre sera disponible pour tous les schémas de ce projet en tant que %projecttitle.", "informative label")); project_variables_label_ = new QLabel( tr( - "Vous pouvez d\351finir ci-dessous des propri\351t\351s personnalis\351es qui seront disponibles pour tous les sch\351mas de ce projet (typiquement pour les cartouches).", + "Vous pouvez définir ci-dessous des propriétés personnalisées qui seront disponibles pour tous les schémas de ce projet (typiquement pour les cartouches).", "informative label" ) ); @@ -250,14 +250,14 @@ void ProjectAutoNumConfigPage::applyProjectConf() {} * Init some widget of this page */ void ProjectAutoNumConfigPage::initWidgets() { - m_label = new QLabel(tr("Num\351rotations disponibles :", "availables numerotations"), this); + m_label = new QLabel(tr("Numérotations disponibles :", "availables numerotations"), this); m_context_cb = new QComboBox(this); m_context_cb->setEditable(true); - m_context_cb->addItem(tr("Nom de la nouvelle num\351rotation")); + m_context_cb->addItem(tr("Nom de la nouvelle numérotation")); m_remove_pb = new QPushButton(QET::Icons::EditDelete, QString(), this); - m_remove_pb -> setToolTip(tr("Supprimer la num\351rotation")); + m_remove_pb -> setToolTip(tr("Supprimer la numérotation")); m_saw = new SelectAutonumW(this); } @@ -311,7 +311,7 @@ void ProjectAutoNumConfigPage::buildConnections() { * @param str, key of context stored in project */ void ProjectAutoNumConfigPage::updateContext(QString str) { - if (str == tr("Nom de la nouvelle num\351rotation")) m_saw -> setContext(NumerotationContext()); + if (str == tr("Nom de la nouvelle numérotation")) m_saw -> setContext(NumerotationContext()); else m_saw ->setContext(project_->conductorAutoNum(str)); } @@ -322,7 +322,7 @@ void ProjectAutoNumConfigPage::updateContext(QString str) { void ProjectAutoNumConfigPage::saveContext() { // If the text is the default text "Name of new numerotation" save the edited context // With the the name "No name" - if (m_context_cb -> currentText() == tr("Nom de la nouvelle num\351rotation")) { + if (m_context_cb -> currentText() == tr("Nom de la nouvelle numérotation")) { project_->addConductorAutoNum (tr("Sans nom"), m_saw -> toNumContext()); m_context_cb -> addItem(tr("Sans nom")); } @@ -343,7 +343,7 @@ void ProjectAutoNumConfigPage::saveContext() { */ void ProjectAutoNumConfigPage::removeContext() { //if default text, return - if ( m_context_cb -> currentText() == tr("Nom de la nouvelle num\351rotation") ) return; + if ( m_context_cb -> currentText() == tr("Nom de la nouvelle numérotation") ) return; project_ -> removeConductorAutonum (m_context_cb -> currentText() ); m_context_cb -> removeItem (m_context_cb -> currentIndex() ); } diff --git a/sources/projectview.cpp b/sources/projectview.cpp index edebd9654..dcefdf132 100644 --- a/sources/projectview.cpp +++ b/sources/projectview.cpp @@ -234,7 +234,7 @@ int ProjectView::tryClosingDiagrams() { if (title.isEmpty()) title = "QElectroTech "; int close_dialog = QMessageBox::question(this, title, - tr("Le projet \340 \351t\351 modifi\351.\n" + tr("Le projet à été modifié.\n" "Voulez-vous enregistrer les modifications ?"), QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, @@ -260,7 +260,7 @@ QString ProjectView::askUserForFilePath(bool assign) { this, tr("Enregistrer sous", "dialog title"), project_ -> currentDir(), - tr("Sch\351ma QElectroTech (*.qet)", "filetypes allowed when saving a diagram file") + tr("Schéma QElectroTech (*.qet)", "filetypes allowed when saving a diagram file") ); // if no filepath is provided, return an empty string @@ -282,7 +282,7 @@ QString ProjectView::askUserForFilePath(bool assign) { view is not associated to any project. */ QETResult ProjectView::noProjectResult() const { - QETResult no_project(tr("aucun projet affich\351", "error message"), false); + QETResult no_project(tr("aucun projet affiché", "error message"), false); return(no_project); } @@ -366,10 +366,10 @@ void ProjectView::removeDiagram(DiagramView *diagram_view) { //Ask confirmation to user. - int answer = QET::MessageBox::question( + int answer = QET::QetMessageBox::question( this, - tr("Supprimer le sch\351ma ?", "message box title"), - tr("\312tes-vous s\373r de vouloir supprimer ce sch\351ma du projet ? Ce changement est irr\351versible.", "message box content"), + tr("Supprimer le schéma ?", "message box title"), + tr("Êtes-vous s\373r de vouloir supprimer ce schéma du projet ? Ce changement est irréversible.", "message box content"), QMessageBox::Yes | QMessageBox::No | QMessageBox::Cancel, QMessageBox::No ); @@ -581,7 +581,7 @@ void ProjectView::exportProject() { if (!project_) return; ExportDialog ed(project_, parentWidget()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC ed.setWindowFlags(Qt::Sheet); #endif ed.exec(); @@ -668,7 +668,7 @@ int ProjectView::cleanProject() { // s'assure que le schema n'est pas en lecture seule if (project_ -> isReadOnly()) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Projet en lecture seule", "message box title"), tr("Ce projet est en lecture seule. Il n'est donc pas possible de le nettoyer.", "message box content") @@ -677,9 +677,9 @@ int ProjectView::cleanProject() { } // construit un petit dialogue pour parametrer le nettoyage - QCheckBox *clean_tbt = new QCheckBox(tr("Supprimer les mod\350les de cartouche inutilis\351s dans le projet")); - QCheckBox *clean_elements = new QCheckBox(tr("Supprimer les \351l\351ments inutilis\351s dans le projet")); - QCheckBox *clean_categories = new QCheckBox(tr("Supprimer les cat\351gories vides")); + QCheckBox *clean_tbt = new QCheckBox(tr("Supprimer les modèles de cartouche inutilisés dans le projet")); + QCheckBox *clean_elements = new QCheckBox(tr("Supprimer les éléments inutilisés dans le projet")); + QCheckBox *clean_categories = new QCheckBox(tr("Supprimer les catégories vides")); QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); clean_tbt -> setChecked(true); @@ -687,7 +687,7 @@ int ProjectView::cleanProject() { clean_categories -> setChecked(true); QDialog clean_dialog(parentWidget()); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC clean_dialog.setWindowFlags(Qt::Sheet); #endif @@ -727,7 +727,7 @@ int ProjectView::cleanProject() { Initialize actions for this widget. */ void ProjectView::initActions() { - add_new_diagram_ = new QAction(QET::Icons::Add, tr("Ajouter un sch\351ma"), this); + add_new_diagram_ = new QAction(QET::Icons::Add, tr("Ajouter un schéma"), this); connect(add_new_diagram_, SIGNAL(triggered()), this, SLOT(addNewDiagram())); } @@ -742,7 +742,7 @@ void ProjectView::initWidgets() { fallback_widget_ = new QWidget(); fallback_label_ = new QLabel( tr( - "Ce projet ne contient aucun sch\351ma", + "Ce projet ne contient aucun schéma", "label displayed when a project contains no diagram" ) ); @@ -775,7 +775,7 @@ void ProjectView::initLayout() { fallback_widget_layout_ -> addWidget(fallback_label_); layout_ = new QVBoxLayout(this); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC layout_ -> setContentsMargins(0, 8, 0, 0); #else layout_ -> setContentsMargins(0, 0, 0, 0); diff --git a/sources/projectview.h b/sources/projectview.h index 530ca6b75..b83c59b38 100644 --- a/sources/projectview.h +++ b/sources/projectview.h @@ -17,7 +17,7 @@ */ #ifndef PROJECT_VIEW_H #define PROJECT_VIEW_H -#include +#include #include "templatelocation.h" #include "qetresult.h" class QETProject; diff --git a/sources/qet.cpp b/sources/qet.cpp index 05ea31cc1..97d0b5725 100644 --- a/sources/qet.cpp +++ b/sources/qet.cpp @@ -236,7 +236,7 @@ QString QET::ElementsAndConductorsSentence(int elements_count, int conductors_co QString text; if (elements_count) { text += QObject::tr( - "%n \351l\351ment(s)", + "%n élément(s)", "part of a sentence listing the content of a diagram", elements_count ); @@ -359,11 +359,11 @@ QString QET::license() { QString txt_license; // verifie que le fichier existe if (!file_license -> exists()) { - txt_license = QString(QObject::tr("Le fichier texte contenant la licence GNU/GPL est introuvable - bon bah de toute fa\347on, vous la connaissez par coeur non ?")); + txt_license = QString(QObject::tr("Le fichier texte contenant la licence GNU/GPL est introuvable - bon bah de toute façon, vous la connaissez par coeur non ?")); } else { // ouvre le fichier en mode texte et en lecture seule if (!file_license -> open(QIODevice::ReadOnly | QIODevice::Text)) { - txt_license = QString(QObject::tr("Le fichier texte contenant la licence GNU/GPL existe mais n'a pas pu \352tre ouvert - bon bah de toute fa\347on, vous la connaissez par coeur non ?")); + txt_license = QString(QObject::tr("Le fichier texte contenant la licence GNU/GPL existe mais n'a pas pu être ouvert - bon bah de toute façon, vous la connaissez par coeur non ?")); } else { // charge le contenu du fichier dans une QString QTextStream in(file_license); @@ -602,7 +602,7 @@ bool QET::compareCanonicalFilePaths(const QString &first, const QString &second) QString second_canonical_path = QFileInfo(second).canonicalFilePath(); if (second_canonical_path.isEmpty()) return(false); -#ifdef Q_WS_WIN +#ifdef Q_OS_WIN // sous Windows, on ramene les chemins en minuscules first_canonical_path = first_canonical_path.toLower(); second_canonical_path = second_canonical_path.toLower(); @@ -642,7 +642,7 @@ bool QET::writeXmlFile(QDomDocument &xml_doc, const QString &filepath, QString * if (error_message) { *error_message = QString( QObject::tr( - "Impossible d'ouvrir le fichier %1 en \351criture, erreur %2 rencontr\351e.", + "Impossible d'ouvrir le fichier %1 en écriture, erreur %2 rencontrée.", "error message when attempting to write an XML file" ) ).arg(filepath).arg(file.error()); diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index 0953e6323..df00b5fb0 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -103,7 +103,7 @@ QETApp::QETApp(int &argc, char **argv) : setQuitOnLastWindowClosed(false); connect(this, SIGNAL(lastWindowClosed()), this, SLOT(checkRemainingWindows())); - setSplashScreenStep(tr("Chargement... Initialisation du cache des collections d'\351l\351ments", "splash screen caption")); + setSplashScreenStep(tr("Chargement... Initialisation du cache des collections d'éléments", "splash screen caption")); if (!collections_cache_) { QString cache_path = QETApp::configDir() + "/elements_cache.sqlite"; collections_cache_ = new ElementsCollectionCache(cache_path, this); @@ -111,14 +111,14 @@ QETApp::QETApp(int &argc, char **argv) : } // loads known collections into memory (this does not include items rendering made in elements panels) - setSplashScreenStep(tr("Chargement... Lecture des collections d'\351l\351ments", "splash screen caption")); + setSplashScreenStep(tr("Chargement... Lecture des collections d'éléments", "splash screen caption")); foreach(ElementsCollection *collection, availableCollections()) { collection -> reload(); } // on ouvre soit les fichiers passes en parametre soit un nouvel editeur de projet if (qet_arguments_.files().isEmpty()) { - setSplashScreenStep(tr("Chargement... \311diteur de sch\351mas", "splash screen caption")); + setSplashScreenStep(tr("Chargement... Éditeur de schémas", "splash screen caption")); new QETDiagramEditor(); } else { setSplashScreenStep(tr("Chargement... Ouverture des fichiers", "splash screen caption")); @@ -363,10 +363,10 @@ QStringList QETApp::elementInfoKeys() { QString QETApp::elementTranslatedInfoKey(QString &info) { if (info == "label") return tr("Label"); else if (info == "comment") return tr("Commentaire"); - else if (info == "designation") return tr("D\351signation"); + else if (info == "designation") return tr("Désignation"); else if (info == "manufacturer") return tr("Fabricant"); - else if (info == "manufacturer-reference") return tr("R\351f\351rence fabricant"); - else if (info == "machine-manufacturer-reference") return tr("R\351f\351rence fabricant machine"); + else if (info == "manufacturer-reference") return tr("Référence fabricant"); + else if (info == "machine-manufacturer-reference") return tr("Référence fabricant machine"); return (info); } @@ -943,9 +943,9 @@ void QETApp::invertMainWindowVisibility(QWidget *window) { Autodetec Windows style @param Windows style */ -#if defined(Q_WS_WIN) && defined(Q_WS_WINCE) +#if defined(Q_OS_WIN) && defined(Q_OS_WINCE) -if defined(Q_WS_WIN) +if defined(Q_OS_WIN) if ((QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA && QSysInfo::WindowsVersion < QSysInfo::WV_NT_based)) style = QLatin1String("WindowsVista"); @@ -1255,7 +1255,7 @@ void QETApp::aboutQET() { // associe le dialogue a un eventuel widget parent if (parent_widget) { -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC about_dialog_ -> setWindowFlags(Qt::Sheet); #endif about_dialog_ -> setParent(parent_widget, about_dialog_ -> windowFlags()); @@ -1373,11 +1373,12 @@ void QETApp::initLanguage() { */ void QETApp::initStyle() { initial_palette_ = palette(); - - // lorsque le style Plastique est active, on le remplace par une version amelioree - if (qobject_cast(style())) { - setStyle(new QETStyle()); - } + + //@TODO remove the code below +// // lorsque le style Plastique est active, on le remplace par une version amelioree +// if (qobject_cast(style())) { +// setStyle(new QETStyle()); +// } // applique ou non les couleurs de l'environnement useSystemPalette(settings().value("usesystemcolors", true).toBool()); @@ -1416,24 +1417,24 @@ void QETApp::initConfiguration() { Construit l'icone dans le systray et son menu */ void QETApp::initSystemTray() { - setSplashScreenStep(tr("Chargement... ic\364ne du systray", "splash screen caption")); + setSplashScreenStep(tr("Chargement... icône du systray", "splash screen caption")); // initialisation des menus de l'icone dans le systray menu_systray = new QMenu(tr("QElectroTech", "systray menu title")); quitter_qet = new QAction(QET::Icons::ApplicationExit, tr("&Quitter"), this); reduce_appli = new QAction(QET::Icons::Hide, tr("&Masquer"), this); restore_appli = new QAction(QET::Icons::Restore, tr("&Restaurer"), this); - reduce_diagrams = new QAction(QET::Icons::Hide, tr("&Masquer tous les \351diteurs de sch\351ma"), this); - restore_diagrams = new QAction(QET::Icons::Restore, tr("&Restaurer tous les \351diteurs de sch\351ma"), this); - reduce_elements = new QAction(QET::Icons::Hide, tr("&Masquer tous les \351diteurs d'\351l\351ment"), this); - restore_elements = new QAction(QET::Icons::Restore, tr("&Restaurer tous les \351diteurs d'\351l\351ment"), this); - reduce_templates = new QAction(QET::Icons::Hide, tr("&Masquer tous les \351diteurs de cartouche", "systray submenu entry"), this); - restore_templates = new QAction(QET::Icons::Restore, tr("&Restaurer tous les \351diteurs de cartouche", "systray submenu entry"), this); - new_diagram = new QAction(QET::Icons::WindowNew, tr("&Nouvel \351diteur de sch\351ma"), this); - new_element = new QAction(QET::Icons::WindowNew, tr("&Nouvel \351diteur d'\351l\351ment"), this); + reduce_diagrams = new QAction(QET::Icons::Hide, tr("&Masquer tous les éditeurs de schéma"), this); + restore_diagrams = new QAction(QET::Icons::Restore, tr("&Restaurer tous les éditeurs de schéma"), this); + reduce_elements = new QAction(QET::Icons::Hide, tr("&Masquer tous les éditeurs d'élément"), this); + restore_elements = new QAction(QET::Icons::Restore, tr("&Restaurer tous les éditeurs d'élément"), this); + reduce_templates = new QAction(QET::Icons::Hide, tr("&Masquer tous les éditeurs de cartouche", "systray submenu entry"), this); + restore_templates = new QAction(QET::Icons::Restore, tr("&Restaurer tous les éditeurs de cartouche", "systray submenu entry"), this); + new_diagram = new QAction(QET::Icons::WindowNew, tr("&Nouvel éditeur de schéma"), this); + new_element = new QAction(QET::Icons::WindowNew, tr("&Nouvel éditeur d'élément"), this); quitter_qet -> setStatusTip(tr("Ferme l'application QElectroTech")); - reduce_appli -> setToolTip(tr("R\351duire QElectroTech dans le systray")); + reduce_appli -> setToolTip(tr("Réduire QElectroTech dans le systray")); restore_appli -> setToolTip(tr("Restaurer QElectroTech")); connect(quitter_qet, SIGNAL(triggered()), this, SLOT(quitQET())); @@ -1519,7 +1520,7 @@ void QETApp::buildSystemTrayMenu() { menu_systray -> addAction(every_editor_reduced ? restore_appli : reduce_appli); // ajoute les editeurs de schemas dans un sous-menu - QMenu *diagrams_submenu = menu_systray -> addMenu(tr("\311diteurs de sch\351mas")); + QMenu *diagrams_submenu = menu_systray -> addMenu(tr("Éditeurs de schémas")); diagrams_submenu -> addAction(reduce_diagrams); diagrams_submenu -> addAction(restore_diagrams); diagrams_submenu -> addAction(new_diagram); @@ -1528,7 +1529,7 @@ void QETApp::buildSystemTrayMenu() { addWindowsListToMenu(diagrams_submenu, diagrams); // ajoute les editeurs d'elements au menu - QMenu *elements_submenu = menu_systray -> addMenu(tr("\311diteurs d'\351l\351ment")); + QMenu *elements_submenu = menu_systray -> addMenu(tr("Éditeurs d'élément")); elements_submenu -> addAction(reduce_elements); elements_submenu -> addAction(restore_elements); elements_submenu -> addAction(new_element); @@ -1538,7 +1539,7 @@ void QETApp::buildSystemTrayMenu() { addWindowsListToMenu(elements_submenu, elements); // add title block template editors in a submenu - QMenu *tbtemplates_submenu = menu_systray -> addMenu(tr("\311diteurs de cartouche", "systray menu entry")); + QMenu *tbtemplates_submenu = menu_systray -> addMenu(tr("Éditeurs de cartouche", "systray menu entry")); tbtemplates_submenu -> addAction(reduce_templates); tbtemplates_submenu -> addAction(restore_templates); reduce_templates -> setEnabled(!tbtemplates.isEmpty() && !every_template_reduced); @@ -1604,7 +1605,7 @@ bool QETApp::event(QEvent *e) { void QETApp::printHelp() { QString help( tr("Usage : ") + QFileInfo(applicationFilePath()).fileName() + tr(" [options] [fichier]...\n\n") + - tr("QElectroTech, une application de r\351alisation de sch\351mas \351lectriques.\n\n" + tr("QElectroTech, une application de réalisation de schémas électriques.\n\n" "Options disponibles : \n" " --help Afficher l'aide sur les options\n" " -v, --version Afficher la version\n" @@ -1637,50 +1638,51 @@ void QETApp::printLicense() { std::cout << qPrintable(QET::license()) << std::endl; } -/// Constructeur -QETStyle::QETStyle() : QPlastiqueStyle() { -} +//@TODO remove code below +///// Constructeur +//QETStyle::QETStyle() : QPlastiqueStyle() { +//} -/// Destructeur -QETStyle::~QETStyle() { -} +///// Destructeur +//QETStyle::~QETStyle() { +//} -/// Gere les parametres de style -int QETStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returndata) const { - if (hint == QStyle::SH_DialogButtonBox_ButtonsHaveIcons) { - return(int(true)); - } else { - return(QPlastiqueStyle::styleHint(hint, option, widget, returndata)); - } -} +///// Gere les parametres de style +//int QETStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returndata) const { +// if (hint == QStyle::SH_DialogButtonBox_ButtonsHaveIcons) { +// return(int(true)); +// } else { +// return(QPlastiqueStyle::styleHint(hint, option, widget, returndata)); +// } +//} -/// Gere les icones standard -QIcon QETStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget* widget) const { - switch(standardIcon) { - case QStyle::SP_DialogSaveButton: - return(QET::Icons::DocumentSave); - case QStyle::SP_DialogOpenButton: - return(QET::Icons::DocumentOpen); - case QStyle::SP_DialogCancelButton: - return(QET::Icons::DialogCancel); - case QStyle::SP_DialogOkButton: - case QStyle::SP_DialogApplyButton: - return(QET::Icons::DialogOk); - case QStyle::SP_DialogCloseButton: - return(QET::Icons::DocumentClose); - case QStyle::SP_DialogYesButton: - return(QET::Icons::Allowed); - case QStyle::SP_DialogNoButton: - return(QET::Icons::Forbidden); - case QStyle::SP_DialogResetButton: - return(QET::Icons::EditUndo); - case QStyle::SP_DialogHelpButton: - case QStyle::SP_DialogDiscardButton: - return(QIcon()); - default: - return(QPlastiqueStyle::standardIconImplementation(standardIcon, option, widget)); - } -} +///// Gere les icones standard +//QIcon QETStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option, const QWidget* widget) const { +// switch(standardIcon) { +// case QStyle::SP_DialogSaveButton: +// return(QET::Icons::DocumentSave); +// case QStyle::SP_DialogOpenButton: +// return(QET::Icons::DocumentOpen); +// case QStyle::SP_DialogCancelButton: +// return(QET::Icons::DialogCancel); +// case QStyle::SP_DialogOkButton: +// case QStyle::SP_DialogApplyButton: +// return(QET::Icons::DialogOk); +// case QStyle::SP_DialogCloseButton: +// return(QET::Icons::DocumentClose); +// case QStyle::SP_DialogYesButton: +// return(QET::Icons::Allowed); +// case QStyle::SP_DialogNoButton: +// return(QET::Icons::Forbidden); +// case QStyle::SP_DialogResetButton: +// return(QET::Icons::EditUndo); +// case QStyle::SP_DialogHelpButton: +// case QStyle::SP_DialogDiscardButton: +// return(QIcon()); +// default: +// return(QPlastiqueStyle::standardIconImplementation(standardIcon, option, widget)); +// } +//} /// @return une reference vers les parametres de QElectroTEch QSettings &QETApp::settings() { diff --git a/sources/qetapp.h b/sources/qetapp.h index 054be8228..d9375a92a 100644 --- a/sources/qetapp.h +++ b/sources/qetapp.h @@ -19,7 +19,7 @@ #define QET_APP_H #include "qetsingleapplication.h" #include -#include +#include #include "elementslocation.h" #include "templatelocation.h" #include "qetarguments.h" @@ -236,18 +236,19 @@ class QETApp : public QETSingleApplication { static QETProject *projectFromString(const QString &); }; -/** - This class represents the custom QElectroTech style. - It implements simple modification such as extra standard icons. -*/ -class QETStyle : public QPlastiqueStyle { - Q_OBJECT - public: - QETStyle(); - virtual ~QETStyle(); - virtual int styleHint(StyleHint hint, const QStyleOption * = 0, const QWidget * = 0, QStyleHintReturn * = 0) const; +//TODO remove code below +///** +// This class represents the custom QElectroTech style. +// It implements simple modification such as extra standard icons. +//*/ +//class QETStyle : public QPlastiqueStyle { +// Q_OBJECT +// public: +// QETStyle(); +// virtual ~QETStyle(); +// virtual int styleHint(StyleHint hint, const QStyleOption * = 0, const QWidget * = 0, QStyleHintReturn * = 0) const; - protected slots: - virtual QIcon standardIconImplementation(StandardPixmap, const QStyleOption * = 0, const QWidget * = 0) const; -}; +// protected slots: +// virtual QIcon standardIconImplementation(StandardPixmap, const QStyleOption * = 0, const QWidget * = 0) const; +//}; #endif diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 236a5b323..9c7657519 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -43,6 +43,7 @@ #include "ui/dialogautonum.h" #include +#include /** @@ -59,7 +60,7 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) : m_selection_actions_group (this), m_row_column_actions_group (this), m_file_actions_group (this), - open_dialog_dir (QDesktopServices::storageLocation(QDesktopServices::DesktopLocation)) + open_dialog_dir (QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)) { //Setup the mdi area at center of application setCentralWidget(&workspace); @@ -123,7 +124,7 @@ QETDiagramEditor::~QETDiagramEditor() { */ void QETDiagramEditor::setUpElementsPanel() { //Add the element panel as a QDockWidget - qdw_pa = new QDockWidget(tr("Panel d'\351l\351ments", "dock title"), this); + qdw_pa = new QDockWidget(tr("Panel d'éléments", "dock title"), this); qdw_pa -> setObjectName ("elements panel"); qdw_pa -> setAllowedAreas (Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); @@ -156,8 +157,8 @@ void QETDiagramEditor::setUpUndoStack() { QUndoView *undo_view = new QUndoView(&undo_group, this); undo_view -> setEmptyLabel (tr("Aucune modification")); - undo_view -> setStatusTip (tr("Cliquez sur une action pour revenir en arri\350re dans l'\351dition de votre sch\351ma", "Status tip")); - undo_view -> setWhatsThis (tr("Ce panneau liste les diff\351rentes actions effectu\351es sur le sch\351ma courant. Cliquer sur une action permet de revenir \340 l'\351tat du sch\351ma juste apr\350s son application.", "\"What's this\" tip")); + undo_view -> setStatusTip (tr("Cliquez sur une action pour revenir en arrière dans l'édition de votre schéma", "Status tip")); + undo_view -> setWhatsThis (tr("Ce panneau liste les différentes actions effectuées sur le schéma courant. Cliquer sur une action permet de revenir à l'état du schéma juste après son application.", "\"What's this\" tip")); qdw_undo = new QDockWidget(tr("Annulations", "dock title"), this); qdw_undo -> setObjectName("diagram_undo"); @@ -187,29 +188,29 @@ void QETDiagramEditor::setUpActions() { 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); - conductor_reset = new QAction(QET::Icons::ConductorSettings, tr("R\351initialiser les conducteurs"), this); + conductor_reset = new QAction(QET::Icons::ConductorSettings, tr("Réinitialiser les conducteurs"), this); - m_auto_conductor = new QAction (QET::Icons::Autoconnect, tr("Cr\351ation automatique de conducteur(s)","Tool tip of auto conductor"), this); - m_auto_conductor -> setStatusTip (tr("Utiliser la cr\351ation automatique de conducteur(s) quand cela est possible", "Status tip of auto conductor")); + m_auto_conductor = new QAction (QET::Icons::Autoconnect, tr("Création automatique de conducteur(s)","Tool tip of auto conductor"), this); + m_auto_conductor -> setStatusTip (tr("Utiliser la création automatique de conducteur(s) quand cela est possible", "Status tip of auto conductor")); m_auto_conductor -> setCheckable (true); m_auto_conductor -> setDisabled (true); connect(m_auto_conductor, SIGNAL(triggered(bool)), this, SLOT(slot_autoConductor(bool))); - infos_diagram = new QAction(QET::Icons::DialogInformation, tr("Propri\351t\351s du sch\351ma"), this); - prj_edit_prop = new QAction(QET::Icons::DialogInformation, tr("Propri\351t\351s du projet"), this); - prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un sch\351ma"), this); - prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer le sch\351ma"), this); + infos_diagram = new QAction(QET::Icons::DialogInformation, tr("Propriétés du schéma"), this); + prj_edit_prop = new QAction(QET::Icons::DialogInformation, tr("Propriétés du projet"), this); + prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un schéma"), this); + prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer le schéma"), this); prj_clean = new QAction(QET::Icons::EditClear, tr("Nettoyer le projet"), this); prj_diagramList = new QAction(QET::Icons::listDrawings, tr("Ajouter un sommaire"), this); prj_nomenclature = new QAction(QET::Icons::DocumentExport, tr("Exporter une nomenclature"), this); tabbed_view_mode = new QAction( tr("en utilisant des onglets"), this); - windowed_view_mode= new QAction( tr("en utilisant des fen\352tres"), this); + windowed_view_mode= new QAction( tr("en utilisant des fenêtres"), this); mode_selection = new QAction(QET::Icons::PartSelect, tr("Mode Selection"), this); mode_visualise = new QAction(QET::Icons::ViewMove, tr("Mode Visualisation"), this); - tile_window = new QAction( tr("&Mosa\357que"), this); + tile_window = new QAction( tr("&Mosaïque"), this); cascade_window = new QAction( tr("&Cascade"), this); next_window = new QAction( tr("Projet suivant"), this); - prev_window = new QAction( tr("Projet pr\351c\351dent"), this); + prev_window = new QAction( tr("Projet précédent"), this); ///Files action/// QAction *new_file = m_file_actions_group.addAction( QET::Icons::DocumentNew, tr("&Nouveau") ); @@ -223,10 +224,10 @@ void QETDiagramEditor::setUpActions() { close_file -> setShortcut( QKeySequence::Close ); save_file -> setShortcut( QKeySequence::Save ); - new_file -> setStatusTip( tr("Cr\351e un nouveau sch\351ma", "status bar tip") ); - open_file -> setStatusTip( tr("Ouvre un sch\351ma existant", "status bar tip") ); - close_file -> setStatusTip( tr("Ferme le sch\351ma courant", "status bar tip") ); - save_file -> setStatusTip( tr("Enregistre le projet courant et tous ses sch\351mas", "status bar tip") ); + new_file -> setStatusTip( tr("Crée un nouveau schéma", "status bar tip") ); + open_file -> setStatusTip( tr("Ouvre un schéma existant", "status bar tip") ); + close_file -> setStatusTip( tr("Ferme le schéma courant", "status bar tip") ); + save_file -> setStatusTip( tr("Enregistre le projet courant et tous ses schémas", "status bar tip") ); save_file_as -> setStatusTip( tr("Enregistre le project courant avec un autre nom de fichier", "status bar tip") ); connect(save_file_as, SIGNAL( triggered() ), this, SLOT( saveAs() ) ); @@ -241,10 +242,10 @@ void QETDiagramEditor::setUpActions() { QAction *add_row = m_row_column_actions_group.addAction( QET::Icons::EditTableInsertRowUnder, tr("Ajouter une ligne") ); QAction *remove_row = m_row_column_actions_group.addAction( QET::Icons::EditTableDeleteRow, tr("Enlever une ligne") ); - add_column -> setStatusTip( tr("Ajoute une colonne au sch\351ma", "status bar tip") ); - remove_column -> setStatusTip( tr("Enl\350ve une colonne au sch\351ma", "status bar tip") ); - add_row -> setStatusTip( tr("Agrandit le sch\351ma en hauteur", "status bar tip") ); - remove_row -> setStatusTip( tr("R\351tr\351cit le sch\351ma en hauteur", "status bar tip") ); + add_column -> setStatusTip( tr("Ajoute une colonne au schéma", "status bar tip") ); + remove_column -> setStatusTip( tr("Enlève une colonne au schéma", "status bar tip") ); + add_row -> setStatusTip( tr("Agrandit le schéma en hauteur", "status bar tip") ); + remove_row -> setStatusTip( tr("Rétrécit le schéma en hauteur", "status bar tip") ); connect(add_column, SIGNAL( triggered() ), this, SLOT( slot_addColumn() ) ); connect(remove_column, SIGNAL( triggered() ), this, SLOT( slot_removeColumn() ) ); @@ -256,9 +257,9 @@ void QETDiagramEditor::setUpActions() { rotate_selection = m_selection_actions_group.addAction( QET::Icons::ObjectRotateRight, tr("Pivoter") ); rotate_texts = m_selection_actions_group.addAction( QET::Icons::ObjectRotateRight, tr("Orienter les textes") ); find_element = m_selection_actions_group.addAction( tr("Retrouver dans le panel") ); - edit_selection = m_selection_actions_group.addAction( QET::Icons::ElementEdit, tr("\311diter l'item s\351lectionn\351") ); + edit_selection = m_selection_actions_group.addAction( QET::Icons::ElementEdit, tr("Éditer l'item sélectionné") ); -#ifndef Q_WS_MAC +#ifndef Q_OS_MAC delete_selection -> setShortcut( QKeySequence( Qt::Key_Delete) ); #else delete_selection -> setShortcut( QKeySequence( tr("Backspace") ) ); @@ -270,10 +271,10 @@ void QETDiagramEditor::setUpActions() { infos_diagram -> setShortcut( QKeySequence( tr("Ctrl+L") ) ); edit_selection -> setShortcut( QKeySequence( tr("Ctrl+E") ) ); - delete_selection -> setStatusTip( tr("Enl\350ve les \351l\351ments s\351lectionn\351s du sch\351ma", "status bar tip") ); - rotate_selection -> setStatusTip( tr("Pivote les \351l\351ments et textes s\351lectionn\351s", "status bar tip") ); - rotate_texts -> setStatusTip( tr("Pivote les textes s\351lectionn\351s \340 un angle pr\351cis", "status bar tip") ); - find_element -> setStatusTip( tr("Retrouve l'\351l\351ment s\351lectionn\351 dans le panel", "status bar tip") ); + delete_selection -> setStatusTip( tr("Enlève les éléments sélectionnés du schéma", "status bar tip") ); + rotate_selection -> setStatusTip( tr("Pivote les éléments et textes sélectionnés", "status bar tip") ); + rotate_texts -> setStatusTip( tr("Pivote les textes sélectionnés à un angle précis", "status bar tip") ); + find_element -> setStatusTip( tr("Retrouve l'élément sélectionné dans le panel", "status bar tip") ); connect(delete_selection, SIGNAL( triggered() ), this, SLOT( slot_delete() ) ); connect(rotate_selection, SIGNAL( triggered() ), this, SLOT( slot_rotate() ) ); @@ -282,17 +283,17 @@ void QETDiagramEditor::setUpActions() { connect(edit_selection, SIGNAL( triggered() ), this, SLOT( slot_editSelection() ) ); ///Select Action/// - QAction *select_all = m_select_actions_group.addAction( QET::Icons::EditSelectAll, tr("Tout s\351lectionner") ); - QAction *select_nothing = m_select_actions_group.addAction( tr("D\351s\351lectionner tout") ); - QAction *select_invert = m_select_actions_group.addAction( tr("Inverser la s\351lection") ); + QAction *select_all = m_select_actions_group.addAction( QET::Icons::EditSelectAll, tr("Tout sélectionner") ); + QAction *select_nothing = m_select_actions_group.addAction( tr("Désélectionner tout") ); + QAction *select_invert = m_select_actions_group.addAction( tr("Inverser la sélection") ); select_all -> setShortcut( QKeySequence::SelectAll ); select_nothing -> setShortcut( QKeySequence( tr("Ctrl+Shift+A") ) ); select_invert -> setShortcut( QKeySequence( tr("Ctrl+I") ) ); - select_all -> setStatusTip( tr("S\351lectionne tous les \351l\351ments du sch\351ma", "status bar tip") ); - select_nothing -> setStatusTip( tr("D\351s\351lectionne tous les \351l\351ments du sch\351ma", "status bar tip") ); - select_invert -> setStatusTip( tr("D\351s\351lectionne les \351l\351ments s\351lectionn\351s et s\351lectionne les \351l\351ments non s\351lectionn\351s", "status bar tip") ); + select_all -> setStatusTip( tr("Sélectionne tous les éléments du schéma", "status bar tip") ); + select_nothing -> setStatusTip( tr("Désélectionne tous les éléments du schéma", "status bar tip") ); + select_invert -> setStatusTip( tr("Désélectionne les éléments sélectionnés et sélectionne les éléments non sélectionnés", "status bar tip") ); connect(select_all, SIGNAL( triggered() ), this, SLOT( slot_selectAll() ) ); connect(select_nothing, SIGNAL( triggered() ), this, SLOT( slot_selectNothing() ) ); @@ -300,9 +301,9 @@ void QETDiagramEditor::setUpActions() { ///Zoom actions/// QAction *zoom_in = m_zoom_actions_group.addAction( QET::Icons::ZoomIn, tr("Zoom avant") ); - QAction *zoom_out = m_zoom_actions_group.addAction( QET::Icons::ZoomOut, tr("Zoom arri\350re") ); + QAction *zoom_out = m_zoom_actions_group.addAction( QET::Icons::ZoomOut, tr("Zoom arrière") ); QAction *zoom_content = m_zoom_actions_group.addAction( QET::Icons::ZoomDraw, tr("Zoom sur le contenu") ); - QAction *zoom_fit = m_zoom_actions_group.addAction( QET::Icons::ZoomFitBest, tr("Zoom adapt\351") ); + QAction *zoom_fit = m_zoom_actions_group.addAction( QET::Icons::ZoomFitBest, tr("Zoom adapté") ); QAction *zoom_reset = m_zoom_actions_group.addAction( QET::Icons::ZoomOriginal, tr("Pas de zoom") ); m_zoom_action_toolBar << zoom_content << zoom_fit << zoom_reset; @@ -312,11 +313,11 @@ void QETDiagramEditor::setUpActions() { zoom_fit -> setShortcut( QKeySequence( tr("Ctrl+9") ) ); zoom_reset -> setShortcut( QKeySequence( tr("Ctrl+0") ) ); - zoom_in -> setStatusTip(tr("Agrandit le sch\351ma", "status bar tip")); - zoom_out -> setStatusTip(tr("R\351tr\351cit le sch\351ma", "status bar tip")); - zoom_content -> setStatusTip(tr("Adapte le zoom de fa\347on \340 afficher tout le contenu ind\351pendamment du cadre")); - zoom_fit -> setStatusTip(tr("Adapte la taille du sch\351ma afin qu'il soit enti\350rement visible", "status bar tip")); - zoom_reset -> setStatusTip(tr("Restaure le zoom par d\351faut", "status bar tip")); + zoom_in -> setStatusTip(tr("Agrandit le schéma", "status bar tip")); + zoom_out -> setStatusTip(tr("Rétrécit le schéma", "status bar tip")); + zoom_content -> setStatusTip(tr("Adapte le zoom de façon à afficher tout le contenu indépendamment du cadre")); + zoom_fit -> setStatusTip(tr("Adapte la taille du schéma afin qu'il soit entièrement visible", "status bar tip")); + zoom_reset -> setStatusTip(tr("Restaure le zoom par défaut", "status bar tip")); connect( zoom_in, SIGNAL( triggered() ), this, SLOT( slot_zoomIn() ) ); connect( zoom_out, SIGNAL( triggered() ), this, SLOT( slot_zoomOut() ) ); @@ -359,27 +360,27 @@ void QETDiagramEditor::setUpActions() { prev_window -> setShortcut(QKeySequence::PreviousChild); // affichage dans la barre de statut - export_diagram -> setStatusTip(tr("Exporte le sch\351ma courant dans un autre format", "status bar tip")); - print -> setStatusTip(tr("Imprime le sch\351ma courant", "status bar tip")); + export_diagram -> setStatusTip(tr("Exporte le schéma courant dans un autre format", "status bar tip")); + print -> setStatusTip(tr("Imprime le schéma courant", "status bar tip")); quit_editor -> setStatusTip(tr("Ferme l'application QElectroTech", "status bar tip")); - undo -> setStatusTip(tr("Annule l'action pr\351c\351dente", "status bar tip")); - redo -> setStatusTip(tr("Restaure l'action annul\351e", "status bar tip")); - cut -> setStatusTip(tr("Transf\350re les \351l\351ments s\351lectionn\351s dans le presse-papier", "status bar tip")); - copy -> setStatusTip(tr("Copie les \351l\351ments s\351lectionn\351s dans le presse-papier", "status bar tip")); - paste -> setStatusTip(tr("Place les \351l\351ments du presse-papier sur le sch\351ma", "status bar tip")); + undo -> setStatusTip(tr("Annule l'action précédente", "status bar tip")); + redo -> setStatusTip(tr("Restaure l'action annulée", "status bar tip")); + cut -> setStatusTip(tr("Transfère les éléments sélectionnés dans le presse-papier", "status bar tip")); + copy -> setStatusTip(tr("Copie les éléments sélectionnés dans le presse-papier", "status bar tip")); + paste -> setStatusTip(tr("Place les éléments du presse-papier sur le schéma", "status bar tip")); conductor_reset -> setStatusTip(tr("Recalcule les chemins des conducteurs sans tenir compte des modifications", "status bar tip")); - infos_diagram -> setStatusTip(tr("\311dite les informations affich\351es par le cartouche", "status bar tip")); + infos_diagram -> setStatusTip(tr("Édite les informations affichées par le cartouche", "status bar tip")); - windowed_view_mode -> setStatusTip(tr("Pr\351sente les diff\351rents projets ouverts dans des sous-fen\352tres", "status bar tip")); - tabbed_view_mode -> setStatusTip(tr("Pr\351sente les diff\351rents projets ouverts des onglets", "status bar tip")); + windowed_view_mode -> setStatusTip(tr("Présente les différents projets ouverts dans des sous-fenêtres", "status bar tip")); + tabbed_view_mode -> setStatusTip(tr("Présente les différents projets ouverts des onglets", "status bar tip")); - mode_selection -> setStatusTip(tr("Permet de s\351lectionner les \351l\351ments", "status bar tip")); - mode_visualise -> setStatusTip(tr("Permet de visualiser le sch\351ma sans pouvoir le modifier", "status bar tip")); + mode_selection -> setStatusTip(tr("Permet de sélectionner les éléments", "status bar tip")); + mode_visualise -> setStatusTip(tr("Permet de visualiser le schéma sans pouvoir le modifier", "status bar tip")); - tile_window -> setStatusTip(tr("Dispose les fen\352tres en mosa\357que", "status bar tip")); - cascade_window -> setStatusTip(tr("Dispose les fen\352tres en cascade", "status bar tip")); + tile_window -> setStatusTip(tr("Dispose les fenêtres en mosaïque", "status bar tip")); + cascade_window -> setStatusTip(tr("Dispose les fenêtres en cascade", "status bar tip")); next_window -> setStatusTip(tr("Active le projet suivant", "status bar tip")); - prev_window -> setStatusTip(tr("Active le projet pr\351c\351dent", "status bar tip")); + prev_window -> setStatusTip(tr("Active le projet précédent", "status bar tip")); //mode_visualise -> setShortcut( QKeySequence( tr("Ctrl+Shift") ) ); // traitements speciaux @@ -434,7 +435,7 @@ void QETDiagramEditor::setUpToolBar() { view_bar = new QToolBar(tr("Affichage"), this); view_bar -> setObjectName("display"); - diagram_bar = new QToolBar(tr("Sch\351ma"), this); + diagram_bar = new QToolBar(tr("Schéma"), this); diagram_bar -> setObjectName("diagram"); main_bar -> addActions(m_file_actions_group.actions()); @@ -477,11 +478,11 @@ void QETDiagramEditor::setUpToolBar() { void QETDiagramEditor::setUpMenu() { QMenu *menu_fichier = new QMenu(tr("&Fichier")); - QMenu *menu_edition = new QMenu(tr("&\311dition")); + QMenu *menu_edition = new QMenu(tr("&Édition")); QMenu *menu_project = new QMenu(tr("&Projet")); QMenu *menu_affichage = new QMenu(tr("Afficha&ge")); //QMenu *menu_outils = new QMenu(tr("O&utils")); - windows_menu = new QMenu(tr("Fe&n\352tres")); + windows_menu = new QMenu(tr("Fe&nêtres")); insertMenu(settings_menu_, menu_fichier); insertMenu(settings_menu_, menu_edition); @@ -490,7 +491,7 @@ void QETDiagramEditor::setUpMenu() { insertMenu(help_menu_, windows_menu); // File menu - QMenu *recentfile = menu_fichier -> addMenu(QET::Icons::DocumentOpenRecent, tr("&R\351cemment ouverts")); + QMenu *recentfile = menu_fichier -> addMenu(QET::Icons::DocumentOpenRecent, tr("&Récemment ouverts")); recentfile->addActions(QETApp::projectsRecentFiles()->menu()->actions()); connect(QETApp::projectsRecentFiles(), SIGNAL(fileOpeningRequested(const QString &)), this, SLOT(openRecentFile(const QString &))); menu_fichier -> addActions(m_file_actions_group.actions()); @@ -530,7 +531,7 @@ void QETDiagramEditor::setUpMenu() { main_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils principale")); view_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Affichage")); - diagram_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Sch\351ma")); + diagram_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Schéma")); qdw_pa -> toggleViewAction() -> setStatusTip(tr("Affiche ou non le panel d'appareils")); qdw_undo -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la liste des modifications")); @@ -630,7 +631,7 @@ void QETDiagramEditor::save() { QString title = (project_view -> project() -> title ()); if (title.isEmpty()) title = "QElectroTech "; QString filePath = (project_view -> project() -> filePath ()); - statusBar()-> showMessage(tr("Projet %1 enregistr\351 dans le repertoire: %2.").arg(title).arg (filePath), 2000); + statusBar()-> showMessage(tr("Projet %1 enregistré dans le repertoire: %2.").arg(title).arg (filePath), 2000); } else { showError(saved); @@ -651,7 +652,7 @@ void QETDiagramEditor::saveAs() { QString title = (project_view -> project() -> title ()); if (title.isEmpty()) title = "QElectroTech "; QString filePath = (project_view -> project() -> filePath ()); - statusBar()->showMessage(tr("Projet %1 enregistr\351 dans le repertoire: %2.").arg(title).arg (filePath), 2000); + statusBar()->showMessage(tr("Projet %1 enregistré dans le repertoire: %2.").arg(title).arg (filePath), 2000); } else { showError(save_file); @@ -705,7 +706,7 @@ bool QETDiagramEditor::openProject() { this, tr("Ouvrir un fichier"), open_dialog_dir.absolutePath(), - tr("Sch\351mas QElectroTech (*.qet);;Fichiers XML (*.xml);;Tous les fichiers (*)") + tr("Schémas QElectroTech (*.qet);;Fichiers XML (*.xml);;Tous les fichiers (*)") ); if (filepath.isEmpty()) return(false); @@ -788,7 +789,7 @@ bool QETDiagramEditor::openAndAddProject(const QString &filepath, bool interacti // check the file exists if (!filepath_info.exists()) { if (interactive) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Impossible d'ouvrir le fichier", "message box title"), QString( @@ -803,12 +804,12 @@ bool QETDiagramEditor::openAndAddProject(const QString &filepath, bool interacti // verifie que le fichier est accessible en lecture if (!filepath_info.isReadable()) { if (interactive) { - QET::MessageBox::critical( + QET::QetMessageBox::critical( this, tr("Impossible d'ouvrir le fichier", "message box title"), tr("Il semblerait que le fichier que vous essayez d'ouvrir ne " "soit pas accessible en lecture. Il est donc impossible de " - "l'ouvrir. Veuillez v\351rifier les permissions du fichier.") + "l'ouvrir. Veuillez vérifier les permissions du fichier.") ); } return(false); @@ -817,11 +818,11 @@ bool QETDiagramEditor::openAndAddProject(const QString &filepath, bool interacti // gere le fait que le fichier puisse etre en lecture seule if (!filepath_info.isWritable()) { if (interactive) { - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, tr("Ouverture du projet en lecture seule", "message box title"), tr("Il semblerait que le projet que vous essayez d'ouvrir ne " - "soit pas accessible en \351criture. Il sera donc ouvert en " + "soit pas accessible en écriture. Il sera donc ouvert en " "lecture seule.") ); } @@ -831,13 +832,13 @@ bool QETDiagramEditor::openAndAddProject(const QString &filepath, bool interacti QETProject *project = new QETProject(filepath); if (project -> state() != QETProject::Ok) { if (interactive && project -> state() != QETProject::FileOpenDiscard) { - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, - tr("\311chec de l'ouverture du projet", "message box title"), + tr("Échec de l'ouverture du projet", "message box title"), QString( tr( "Il semblerait que le fichier %1 ne soit pas un fichier" - " projet QElectroTech. Il ne peut donc \352tre ouvert.", + " projet QElectroTech. Il ne peut donc être ouvert.", "message box content" ) ).arg(filepath) @@ -1254,32 +1255,32 @@ void QETDiagramEditor::slot_updateComplexActions() { //edit element if (selected_elements_count) { - edit_selection -> setText(tr("\311diter l'\351lement", "edit element")); + edit_selection -> setText(tr("Éditer l'élement", "edit element")); edit_selection -> setIcon(QET::Icons::ElementEdit); } //edit text field else if (selected_texts) { - edit_selection -> setText(tr("\311diter le champ de texte", "edit text field")); + edit_selection -> setText(tr("Éditer le champ de texte", "edit text field")); edit_selection -> setIcon(QET::Icons::EditText); } //edit image else if (selected_image) { - edit_selection -> setText(tr("\311diter l'image", "edit image")); + edit_selection -> setText(tr("Éditer l'image", "edit image")); edit_selection -> setIcon(QET::Icons::resize_image); } //edit conductor else if (selected_conductors_count) { - edit_selection -> setText(tr("\311diter le conducteur", "edit conductor")); + edit_selection -> setText(tr("Éditer le conducteur", "edit conductor")); edit_selection -> setIcon(QET::Icons::ElementEdit); } } //not an editable item else { - edit_selection -> setText(tr("\311diter l'objet s\351lectionn\351", "edit selected item")); + edit_selection -> setText(tr("Éditer l'objet sélectionné", "edit selected item")); edit_selection -> setIcon(QET::Icons::ElementEdit); edit_selection -> setEnabled(false); } @@ -1450,7 +1451,7 @@ void QETDiagramEditor::slot_updateWindowsMenu() { QString pv_title = project_view -> windowTitle(); QAction *action = windows_menu -> addAction(pv_title); windows_actions -> addAction(action); - action -> setStatusTip(QString(tr("Active le projet \253\240%1\240\273")).arg(pv_title)); + action -> setStatusTip(QString(tr("Active le projet « %1 »")).arg(pv_title)); action -> setCheckable(true); action -> setChecked(project_view == currentProject()); connect(action, SIGNAL(triggered()), &windowMapper, SLOT(map())); @@ -1961,13 +1962,13 @@ void QETDiagramEditor::findElementInPanel(const ElementsLocation &location) { // peut-etre vient-il d'un projet ouvert dans un autre editeur ? if (location.project() && !findProject(location.project())) { statusBar() -> showMessage( - tr("Impossible de retrouver cet \351l\351ment dans le panel car il semble \351dit\351 dans une autre fen\352tre"), + tr("Impossible de retrouver cet élément dans le panel car il semble édité dans une autre fenêtre"), 10000 ); } else { // il devrait etre affiche : on tente de recharger le panel statusBar() -> showMessage( - tr("Impossible de retrouver cet \351l\351ment dans le panel... rechargement du panel..."), + tr("Impossible de retrouver cet élément dans le panel... rechargement du panel..."), 10000 ); pa -> reloadAndFilter(); @@ -1979,7 +1980,7 @@ void QETDiagramEditor::findElementInPanel(const ElementsLocation &location) { if (!element_found) { statusBar() -> showMessage( - tr("Impossible de retrouver cet \351l\351ment dans le panel"), + tr("Impossible de retrouver cet élément dans le panel"), 10000 ); } @@ -2026,7 +2027,7 @@ void QETDiagramEditor::showError(const QETResult &result) { */ void QETDiagramEditor::showError(const QString &error) { if (error.isEmpty()) return; - QET::MessageBox::critical(this, tr("Erreur", "message box title"), error); + QET::QetMessageBox::critical(this, tr("Erreur", "message box title"), error); } /** diff --git a/sources/qetdiagrameditor.h b/sources/qetdiagrameditor.h index d00f0c688..4ec7c3233 100644 --- a/sources/qetdiagrameditor.h +++ b/sources/qetdiagrameditor.h @@ -17,7 +17,7 @@ */ #ifndef QET_DIAGRAM_EDITOR_H #define QET_DIAGRAM_EDITOR_H -#include +#include #include "qetmainwindow.h" class QETProject; diff --git a/sources/qetgraphicsitem/conductor.cpp b/sources/qetgraphicsitem/conductor.cpp index 42395f9f0..ebe50dc82 100644 --- a/sources/qetgraphicsitem/conductor.cpp +++ b/sources/qetgraphicsitem/conductor.cpp @@ -87,7 +87,7 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) : // calcul du rendu du conducteur generateConductorPath(terminal1 -> dockConductor(), terminal1 -> orientation(), terminal2 -> dockConductor(), terminal2 -> orientation()); setFlags(QGraphicsItem::ItemIsSelectable); - setAcceptsHoverEvents(true); + setAcceptHoverEvents(true); // ajout du champ de texte editable text_item = new ConductorTextItem(properties_.text, this); @@ -477,7 +477,7 @@ void Conductor::paint(QPainter *qp, const QStyleOptionGraphicsItem *options, QWi } // decalage ideal pour le rendu centre d'un carre / cercle de 2.0 px de cote / diametre - qreal pretty_offset = (options -> levelOfDetail == 1 ? 1.0 : 1.0); + qreal pretty_offset = 1.0; // dessin des points d'accroche du conducteur si celui-ci est selectionne if (isSelected()) { @@ -1396,7 +1396,7 @@ void Conductor::displayedTextChanged() { { qmbreturn = QMessageBox::question(diagramEditor(), tr("Textes de conducteurs"), tr("Voulez-vous appliquer le nouveau texte \n" - "\340 l'ensemble des conducteurs de ce potentiel ?"), + "à l'ensemble des conducteurs de ce potentiel ?"), QMessageBox::No| QMessageBox::Yes, QMessageBox::Yes); if (qmbreturn == QMessageBox::Yes) { diff --git a/sources/qetgraphicsitem/conductortextitem.cpp b/sources/qetgraphicsitem/conductortextitem.cpp index 123de764f..406b1394b 100644 --- a/sources/qetgraphicsitem/conductortextitem.cpp +++ b/sources/qetgraphicsitem/conductortextitem.cpp @@ -31,7 +31,7 @@ ConductorTextItem::ConductorTextItem(Conductor *parent_conductor) : moved_by_user_(false), rotate_by_user_(false) { - setAcceptsHoverEvents(true); + setAcceptHoverEvents(true); } /** @@ -208,13 +208,13 @@ void ConductorTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) { /** When mouse over element - change bMouseOver to true (used in paint() function ) + change m_mouse_hover to true (used in paint() function ) @param e QGraphicsSceneHoverEvent */ void ConductorTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) { Q_UNUSED(e); - bMouseOver = true; + m_mouse_hover = true; QString str_ToolTip = toPlainText(); setToolTip( str_ToolTip ); update(); @@ -222,13 +222,13 @@ void ConductorTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) { /** When mouse over element leave the position - change bMouseOver to false(used in paint() function ) + change m_mouse_hover to false(used in paint() function ) @param e QGraphicsSceneHoverEvent */ void ConductorTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) { Q_UNUSED(e); //qDebug() << "Leave mouse over"; - bMouseOver = false; + m_mouse_hover = false; update(); } diff --git a/sources/qetgraphicsitem/customelement.cpp b/sources/qetgraphicsitem/customelement.cpp index 2596acc6a..88ce4a143 100644 --- a/sources/qetgraphicsitem/customelement.cpp +++ b/sources/qetgraphicsitem/customelement.cpp @@ -117,9 +117,9 @@ bool CustomElement::buildFromXml(const QDomElement &xml_def_elmt, int *state) { qreal element_version = xml_def_elmt.attribute("version").toDouble(&conv_ok); if (conv_ok && QET::version.toDouble() < element_version) { std::cerr << qPrintable( - QObject::tr("Avertissement : l'\351l\351ment " - " a \351t\351 enregistr\351 avec une version" - " ult\351rieure de QElectroTech.") + QObject::tr("Avertissement : l'élément " + " a été enregistré avec une version" + " ultérieure de QElectroTech.") ) << std::endl; } } diff --git a/sources/qetgraphicsitem/diagramimageitem.cpp b/sources/qetgraphicsitem/diagramimageitem.cpp index 93bf29d70..f3bd1ae72 100644 --- a/sources/qetgraphicsitem/diagramimageitem.cpp +++ b/sources/qetgraphicsitem/diagramimageitem.cpp @@ -108,7 +108,7 @@ void DiagramImageItem::editProperty() { //the dialog QDialog property_dialog(diagram()->views().at(0)); - property_dialog.setWindowTitle(tr("\311diter les propri\351t\351s d'une image", "window title")); + property_dialog.setWindowTitle(tr("Éditer les propriétés d'une image", "window title")); //the main layout QVBoxLayout dialog_layout(&property_dialog); @@ -201,7 +201,7 @@ bool DiagramImageItem::fromXml(const QDomElement &e) { //load xml image to QByteArray QByteArray array; - array = QByteArray::fromBase64(e.text().toAscii()); + array = QByteArray::fromBase64(e.text().toLatin1()); //Set QPixmap from the @array QPixmap pixmap; diff --git a/sources/qetgraphicsitem/diagramtextitem.cpp b/sources/qetgraphicsitem/diagramtextitem.cpp index 80176a4a7..cc6575e77 100644 --- a/sources/qetgraphicsitem/diagramtextitem.cpp +++ b/sources/qetgraphicsitem/diagramtextitem.cpp @@ -28,12 +28,12 @@ */ DiagramTextItem::DiagramTextItem(QGraphicsItem *parent) : QGraphicsTextItem(parent), - bMouseOver(false), + m_mouse_hover(false), previous_text_(), rotation_angle_(0.0), m_first_move (true) { - setAcceptsHoverEvents(true); + setAcceptHoverEvents(true); build(); } @@ -45,12 +45,12 @@ DiagramTextItem::DiagramTextItem(QGraphicsItem *parent) : */ DiagramTextItem::DiagramTextItem(const QString &text, QGraphicsItem *parent) : QGraphicsTextItem(text, parent), - bMouseOver(false), + m_mouse_hover(false), previous_text_(text), rotation_angle_(0.0) { build(); - setAcceptsHoverEvents(true); + setAcceptHoverEvents(true); } /// Destructeur @@ -68,7 +68,7 @@ void DiagramTextItem::build() { setFont(QETApp::diagramTextsFont()); setFlags(QGraphicsItem::ItemIsSelectable|QGraphicsItem::ItemIsMovable); setNoEditable(false); - setToolTip(tr("Maintenir ctrl pour un d\351placement libre")); + setToolTip(tr("Maintenir ctrl pour un déplacement libre")); #if QT_VERSION >= 0x040600 setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); #endif @@ -205,31 +205,35 @@ void DiagramTextItem::setFontSize(int &s) { } /** - Dessine le champ de texte. - Cette methode delegue simplement le travail a QGraphicsTextItem::paint apres - avoir desactive l'antialiasing. - @param painter Le QPainter a utiliser pour dessiner le champ de texte - @param option Les options de style pour le champ de texte - @param widget Le QWidget sur lequel on dessine -*/ -void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + * @brief DiagramTextItem::paint + * Draw this text field. This method draw the text by calling QGraphicsTextItem::paint. + * If text is hovered, this method draw the bounding rect in grey + * @param painter : painter to use + * @param option : style option + * @param widget : widget where must to draw + */ +void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ painter -> setRenderHint(QPainter::Antialiasing, false); QGraphicsTextItem::paint(painter, option, widget); - if ( bMouseOver ) { + if (m_mouse_hover && !isSelected()) + { painter -> save(); - // Annulation des renderhints + + //Disable renderhints painter -> setRenderHint(QPainter::Antialiasing, false); painter -> setRenderHint(QPainter::TextAntialiasing, false); painter -> setRenderHint(QPainter::SmoothPixmapTransform, false); - // Dessin du cadre de selection en gris + + //Draw the selected rect in grey QPen t; t.setColor(Qt::gray); t.setStyle(Qt::DashDotLine); + t.setCosmetic(true); painter -> setPen(t); - // Le dessin se fait a partir du rectangle delimitant - //painter -> drawRoundRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10); - painter -> drawRoundRect(boundingRect().adjusted(0, 0, 0, 0), 10, 10); + painter -> drawRoundRect(boundingRect(), 10, 10); + painter -> restore(); } @@ -392,13 +396,13 @@ void DiagramTextItem::edit() { /** When mouse over element - change bMouseOver to true (used in paint() function ) + change m_mouse_hover to true (used in paint() function ) @param e QGraphicsSceneHoverEvent */ void DiagramTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) { Q_UNUSED(e); - bMouseOver = true; + m_mouse_hover = true; QString str_ToolTip = toPlainText(); setToolTip( str_ToolTip ); update(); @@ -406,13 +410,13 @@ void DiagramTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent *e) { /** When mouse over element leave the position - change bMouseOver to false (used in paint() function ) + change m_mouse_hover to false (used in paint() function ) @param e QGraphicsSceneHoverEvent */ void DiagramTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) { Q_UNUSED(e); //qDebug() << "Leave mouse over"; - bMouseOver = false; + m_mouse_hover = false; update(); } diff --git a/sources/qetgraphicsitem/diagramtextitem.h b/sources/qetgraphicsitem/diagramtextitem.h index e09890421..739fa493d 100644 --- a/sources/qetgraphicsitem/diagramtextitem.h +++ b/sources/qetgraphicsitem/diagramtextitem.h @@ -82,7 +82,7 @@ class DiagramTextItem : public QGraphicsTextItem { virtual void applyRotation(const qreal &); - bool bMouseOver; + bool m_mouse_hover; signals: /// signal emitted when the text field loses focus void lostFocus(); diff --git a/sources/qetgraphicsitem/element.cpp b/sources/qetgraphicsitem/element.cpp index 86f6133fc..859395e03 100644 --- a/sources/qetgraphicsitem/element.cpp +++ b/sources/qetgraphicsitem/element.cpp @@ -39,7 +39,7 @@ Element::Element(QGraphicsItem *parent) : uuid_ = QUuid::createUuid(); setZValue(10); setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable); - setAcceptsHoverEvents(true); + setAcceptHoverEvents(true); } /** @@ -83,7 +83,7 @@ void Element::setHighlighted(bool hl) { */ void Element::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) { -#ifndef Q_WS_WIN +#ifndef Q_OS_WIN // corrige un bug de rendu ne se produisant que lors du rendu sur QGraphicsScene sous X11 au zoom par defaut static bool must_correct_rendering_bug = QETApp::settings().value("correct-rendering", false).toBool(); if (must_correct_rendering_bug) { @@ -256,6 +256,7 @@ void Element::drawSelection(QPainter *painter, const QStyleOptionGraphicsItem *o QPen t; t.setColor(Qt::gray); t.setStyle(Qt::DashDotLine); + t.setCosmetic(true); painter -> setPen(t); // Le dessin se fait a partir du rectangle delimitant painter -> drawRoundRect(boundingRect().adjusted(1, 1, -1, -1), 10, 10); diff --git a/sources/qetgraphicsitem/ghostelement.cpp b/sources/qetgraphicsitem/ghostelement.cpp index 8253934a0..f428409a5 100644 --- a/sources/qetgraphicsitem/ghostelement.cpp +++ b/sources/qetgraphicsitem/ghostelement.cpp @@ -34,7 +34,7 @@ GhostElement::GhostElement( CustomElement(location, qgi) { QString tooltip_string = QString( - tr("\311l\351ment manquant\240: %1") + tr("Élément manquant : %1") ).arg(location_.toString()); setToolTip(tooltip_string); } diff --git a/sources/qetgraphicsitem/qetshapeitem.cpp b/sources/qetgraphicsitem/qetshapeitem.cpp index 50c84cb3a..a5da07223 100644 --- a/sources/qetgraphicsitem/qetshapeitem.cpp +++ b/sources/qetgraphicsitem/qetshapeitem.cpp @@ -361,7 +361,7 @@ void QetShapeItem::editProperty() //the dialog QDialog property_dialog(diagram()->views().at(0)); - property_dialog.setWindowTitle(tr("\311diter les propri\351t\351s d'une shape, Zone ", "window title")); + property_dialog.setWindowTitle(tr("Éditer les propriétés d'une shape, Zone ", "window title")); //the main layout QVBoxLayout dialog_layout(&property_dialog); @@ -373,7 +373,7 @@ void QetShapeItem::editProperty() QComboBox style_combo(&property_dialog); style_combo.addItem(QObject::tr("Normal")); style_combo.addItem(QObject::tr("Tiret")); - style_combo.addItem(QObject::tr("Pointill\351")); + style_combo.addItem(QObject::tr("Pointillé")); style_combo.addItem(QObject::tr("Traits et points")); style_combo.addItem(QObject::tr("Traits points points")); @@ -388,7 +388,7 @@ void QetShapeItem::editProperty() dialog_layout.addWidget(&cb); //GroupBox for Scaling - QGroupBox scale_groupe(QObject::tr("\311chelle", "shape scale")); + QGroupBox scale_groupe(QObject::tr("Échelle", "shape scale")); dialog_layout.addWidget(&scale_groupe); QHBoxLayout scale_layout(&scale_groupe); @@ -449,7 +449,7 @@ QString QetShapeItem::name() const { return tr("un rectangle"); break; case Ellipse: - return tr("une \351llipse"); + return tr("une éllipse"); break; case Polyline: return tr("une polyligne"); diff --git a/sources/qetgraphicsitem/terminal.cpp b/sources/qetgraphicsitem/terminal.cpp index 0854fa8ef..8ba2f8582 100644 --- a/sources/qetgraphicsitem/terminal.cpp +++ b/sources/qetgraphicsitem/terminal.cpp @@ -64,7 +64,7 @@ void Terminal::init(QPointF pf, Qet::Orientation o, QString number, QString name br_ = new QRectF(); previous_terminal_ = 0; // divers - setAcceptsHoverEvents(true); + setAcceptHoverEvents(true); setAcceptedMouseButtons(Qt::LeftButton); hovered_ = false; setToolTip(QObject::tr("Borne", "tooltip")); @@ -228,7 +228,7 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg p -> save(); -#ifndef Q_WS_WIN +#ifndef Q_OS_WIN // corrige un bug de rendu ne se produisant que lors du rendu sur QGraphicsScene sous X11 au zoom par defaut static bool must_correct_rendering_bug = QETApp::settings().value("correct-rendering", false).toBool(); if (must_correct_rendering_bug) { @@ -588,7 +588,7 @@ void Terminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) d -> setConductor(false); //Get item under cursor - QGraphicsItem *qgi = d -> itemAt(e -> scenePos()); + QGraphicsItem *qgi = d -> itemAt(e -> scenePos(), QTransform()); if (!qgi) return; //Element must be a terminal diff --git a/sources/qetgraphicsitem/terminal.h b/sources/qetgraphicsitem/terminal.h index f3d0855ab..811946739 100644 --- a/sources/qetgraphicsitem/terminal.h +++ b/sources/qetgraphicsitem/terminal.h @@ -17,7 +17,7 @@ */ #ifndef TERMINAL_H #define TERMINAL_H -#include +#include #include #include "qet.h" class Conductor; diff --git a/sources/qeticons.cpp b/sources/qeticons.cpp index df8862b3c..d636c619f 100644 --- a/sources/qeticons.cpp +++ b/sources/qeticons.cpp @@ -35,7 +35,7 @@ namespace QET { QIcon ConductorSettings; QIcon Configure; QIcon ConfigureToolbars; - QIcon CopyFile; + QIcon IC_CopyFile; QIcon DefaultConductor; QIcon DiagramAdd; QIcon Diagram; @@ -99,7 +99,7 @@ namespace QET { QIcon HotSpot; QIcon InsertImage; QIcon Lower; - QIcon MoveFile; + QIcon IC_MoveFile; QIcon Names; QIcon Neutral; QIcon NewDiagram; @@ -208,7 +208,7 @@ void QET::Icons::initIcons() { Configure .addFile(":/ico/22x22/configure.png"); ConfigureToolbars .addFile(":/ico/16x16/configure-toolbars.png"); ConfigureToolbars .addFile(":/ico/22x22/configure-toolbars.png"); - CopyFile .addFile(":/ico/16x16/item_copy.png"); + IC_CopyFile .addFile(":/ico/16x16/item_copy.png"); DefaultConductor .addFile(":/ico/22x22/conductor3.png"); DiagramAdd .addFile(":/ico/22x22/diagram_add.png"); Diagram .addFile(":/ico/diagram.png"); @@ -329,7 +329,7 @@ void QET::Icons::initIcons() { HotSpot .addFile(":/ico/22x22/hotspot.png"); InsertImage .addFile(":/ico/22x22/insert-image.png"); Lower .addFile(":/ico/22x22/lower.png"); - MoveFile .addFile(":/ico/16x16/item_move.png"); + IC_MoveFile .addFile(":/ico/16x16/item_move.png"); Names .addFile(":/ico/22x22/names.png"); Neutral .addFile(":/ico/16x16/neutral.png"); NewDiagram .addFile(":/ico/128x128/diagram.png"); diff --git a/sources/qeticons.h b/sources/qeticons.h index 61dd70d3e..ab162baa1 100644 --- a/sources/qeticons.h +++ b/sources/qeticons.h @@ -42,7 +42,7 @@ namespace QET { extern QIcon ConductorSettings; extern QIcon Configure; extern QIcon ConfigureToolbars; - extern QIcon CopyFile; + extern QIcon IC_CopyFile; extern QIcon DefaultConductor; extern QIcon DiagramAdd; extern QIcon Diagram; @@ -106,7 +106,7 @@ namespace QET { extern QIcon HotSpot; extern QIcon InsertImage; extern QIcon Lower; - extern QIcon MoveFile; + extern QIcon IC_MoveFile; extern QIcon Names; extern QIcon Neutral; extern QIcon NewDiagram; diff --git a/sources/qetmainwindow.cpp b/sources/qetmainwindow.cpp index ba4c0a8a2..d3851b916 100644 --- a/sources/qetmainwindow.cpp +++ b/sources/qetmainwindow.cpp @@ -46,7 +46,7 @@ void QETMainWindow::initCommonActions() { QETApp *qet_app = QETApp::instance(); configure_action_ = new QAction(QET::Icons::Configure, tr("&Configurer QElectroTech"), this); - configure_action_ -> setStatusTip(tr("Permet de r\351gler diff\351rents param\350tres de QElectroTech", "status bar tip")); + configure_action_ -> setStatusTip(tr("Permet de régler différents paramètres de QElectroTech", "status bar tip")); connect(configure_action_, SIGNAL(triggered()), qet_app, SLOT(configureQET())); fullscreen_action_ = new QAction(this); @@ -55,12 +55,12 @@ void QETMainWindow::initCommonActions() { whatsthis_action_ = QWhatsThis::createAction(this); - about_qet_ = new QAction(QET::Icons::QETLogo, tr("\300 &propos de QElectroTech"), this); + about_qet_ = new QAction(QET::Icons::QETLogo, tr("À &propos de QElectroTech"), this); about_qet_ -> setStatusTip(tr("Affiche des informations sur QElectroTech", "status bar tip")); connect(about_qet_, SIGNAL(triggered()), qet_app, SLOT(aboutQET())); - about_qt_ = new QAction(QET::Icons::QtLogo, tr("\300 propos de &Qt"), this); - about_qt_ -> setStatusTip(tr("Affiche des informations sur la biblioth\350que Qt", "status bar tip")); + about_qt_ = new QAction(QET::Icons::QtLogo, tr("À propos de &Qt"), this); + about_qt_ -> setStatusTip(tr("Affiche des informations sur la bibliothèque Qt", "status bar tip")); connect(about_qt_, SIGNAL(triggered()), qet_app, SLOT(aboutQt())); } @@ -120,13 +120,13 @@ void QETMainWindow::toggleFullScreen() { */ void QETMainWindow::updateFullScreenAction() { if (windowState() & Qt::WindowFullScreen) { - fullscreen_action_ -> setText(tr("Sortir du &mode plein \351cran")); + fullscreen_action_ -> setText(tr("Sortir du &mode plein écran")); fullscreen_action_ -> setIcon(QET::Icons::FullScreenExit); - fullscreen_action_ -> setStatusTip(tr("Affiche QElectroTech en mode fen\352tr\351", "status bar tip")); + fullscreen_action_ -> setStatusTip(tr("Affiche QElectroTech en mode fenêtré", "status bar tip")); } else { - fullscreen_action_ -> setText(tr("Passer en &mode plein \351cran")); + fullscreen_action_ -> setText(tr("Passer en &mode plein écran")); fullscreen_action_ -> setIcon(QET::Icons::FullScreenEnter); - fullscreen_action_ -> setStatusTip(tr("Affiche QElectroTech en mode plein \351cran", "status bar tip")); + fullscreen_action_ -> setStatusTip(tr("Affiche QElectroTech en mode plein écran", "status bar tip")); } fullscreen_action_ -> setShortcut(QKeySequence(tr("Ctrl+Shift+F"))); } diff --git a/sources/qetmessagebox.cpp b/sources/qetmessagebox.cpp index 908875892..d5b1665b4 100644 --- a/sources/qetmessagebox.cpp +++ b/sources/qetmessagebox.cpp @@ -20,8 +20,8 @@ /** @see Documentation Qt pour QMessageBox::critical */ -QMessageBox::StandardButton QET::MessageBox::critical (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { -#ifdef Q_WS_MAC +QMessageBox::StandardButton QET::QetMessageBox::critical (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { +#ifdef Q_OS_MAC QMessageBox message_box(QMessageBox::Critical, title, text, buttons, parent, Qt::Sheet); message_box.setWindowModality(Qt::WindowModal); #else @@ -35,8 +35,8 @@ QMessageBox::StandardButton QET::MessageBox::critical (QWidget *parent, const /** @see Documentation Qt pour QMessageBox::information */ -QMessageBox::StandardButton QET::MessageBox::information(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { -#ifdef Q_WS_MAC +QMessageBox::StandardButton QET::QetMessageBox::information(QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { +#ifdef Q_OS_MAC QMessageBox message_box(QMessageBox::Information, title, text, buttons, parent, Qt::Sheet); message_box.setWindowModality(Qt::WindowModal); #else @@ -50,8 +50,8 @@ QMessageBox::StandardButton QET::MessageBox::information(QWidget *parent, const /** @see Documentation Qt pour QMessageBox::question */ -QMessageBox::StandardButton QET::MessageBox::question (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { -#ifdef Q_WS_MAC +QMessageBox::StandardButton QET::QetMessageBox::question (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { +#ifdef Q_OS_MAC QMessageBox message_box(QMessageBox::Question, title, text, buttons, parent, Qt::Sheet); message_box.setWindowModality(Qt::WindowModal); #else @@ -65,8 +65,8 @@ QMessageBox::StandardButton QET::MessageBox::question (QWidget *parent, const /** @see Documentation Qt pour QMessageBox::warning */ -QMessageBox::StandardButton QET::MessageBox::warning (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { -#ifdef Q_WS_MAC +QMessageBox::StandardButton QET::QetMessageBox::warning (QWidget *parent, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton) { +#ifdef Q_OS_MAC QMessageBox message_box(QMessageBox::Warning, title, text, buttons, parent, Qt::Sheet); message_box.setWindowModality(Qt::WindowModal); #else diff --git a/sources/qetmessagebox.h b/sources/qetmessagebox.h index 65af31fac..0bc25e7a7 100644 --- a/sources/qetmessagebox.h +++ b/sources/qetmessagebox.h @@ -26,7 +26,7 @@ namespace QET { provided, these methodes ensure the dialog box is "window modal" and has the Qt:Sheet flag, thus enabling a better MacOS integration. */ - namespace MessageBox { + namespace QetMessageBox { QMessageBox::StandardButton critical (QWidget *, const QString &, const QString &, QMessageBox::StandardButtons = QMessageBox::Ok, QMessageBox::StandardButton = QMessageBox::NoButton); QMessageBox::StandardButton information(QWidget *, const QString &, const QString &, QMessageBox::StandardButtons = QMessageBox::Ok, QMessageBox::StandardButton = QMessageBox::NoButton); QMessageBox::StandardButton question (QWidget *, const QString &, const QString &, QMessageBox::StandardButtons = QMessageBox::Ok, QMessageBox::StandardButton = QMessageBox::NoButton); diff --git a/sources/qetprintpreviewdialog.cpp b/sources/qetprintpreviewdialog.cpp index ad951c7c1..e16e6d7e3 100644 --- a/sources/qetprintpreviewdialog.cpp +++ b/sources/qetprintpreviewdialog.cpp @@ -21,6 +21,9 @@ #include "exportpropertieswidget.h" #include "qeticons.h" +#include +#include + /** Constructeur @param project Projet a imprimer @@ -33,7 +36,7 @@ QETPrintPreviewDialog::QETPrintPreviewDialog(QETProject *project, QPrinter *prin project_(project), printer_(printer) { - setWindowTitle(tr("QElectroTech : Aper\347u avant impression")); + setWindowTitle(tr("QElectroTech : Aperçu avant impression")); build(); connect(preview_, SIGNAL(paintRequested(QPrinter *)), this, SLOT(requestPaint(QPrinter *))); @@ -90,14 +93,14 @@ void QETPrintPreviewDialog::previousPage() { */ void QETPrintPreviewDialog::nextPage() { int preview_next_page = preview_ -> currentPage() + 1; - preview_ -> setCurrentPage(qMin(preview_next_page, preview_ -> numPages())); + preview_ -> setCurrentPage(qMin(preview_next_page, preview_ -> pageCount())); } /** Passe a la derniere page */ void QETPrintPreviewDialog::lastPage() { - preview_ -> setCurrentPage(preview_ -> numPages()); + preview_ -> setCurrentPage(preview_ -> pageCount()); } /** @@ -166,26 +169,26 @@ void QETPrintPreviewDialog::selectNoDiagram() { */ void QETPrintPreviewDialog::build() { preview_ = new QPrintPreviewWidget(printer_); - diagrams_label_ = new QLabel(tr("Sch\351mas \340 imprimer\240:")); + diagrams_label_ = new QLabel(tr("Schémas à imprimer :")); diagrams_list_ = new DiagramsChooser(project_); diagrams_select_all_ = new QPushButton(tr("Tout cocher")); - diagrams_select_none_ = new QPushButton(tr("Tout d\351cocher")); - toggle_diagrams_list_ = new QAction(QET::Icons::Diagram, tr("Cacher la liste des sch\351mas"), this); + diagrams_select_none_ = new QPushButton(tr("Tout décocher")); + toggle_diagrams_list_ = new QAction(QET::Icons::Diagram, tr("Cacher la liste des schémas"), this); toggle_print_options_ = new QAction(QET::Icons::Configure, tr("Cacher les options d'impression"), this); adjust_width_ = new QAction(QET::Icons::ViewFitWidth, tr("Ajuster la largeur"), this); adjust_page_ = new QAction(QET::Icons::ViewFitWindow, tr("Ajuster la page"), this); - zoom_out_ = new QAction(QET::Icons::ZoomOut, tr("Zoom arri\350re"), this); + zoom_out_ = new QAction(QET::Icons::ZoomOut, tr("Zoom arrière"), this); zoom_box_ = new QComboBox(this); zoom_in_ = new QAction(QET::Icons::ZoomIn, tr("Zoom avant"), this); landscape_ = new QAction(QET::Icons::PrintLandscape, tr("Paysage"), this); portrait_ = new QAction(QET::Icons::PrintPortrait, tr("Portrait"), this); - first_page_ = new QAction(QET::Icons::ArrowLeftDouble, tr("Premi\350re page"), this); - previous_page_ = new QAction(QET::Icons::ArrowLeft, tr("Page pr\351c\351dente"), this); + first_page_ = new QAction(QET::Icons::ArrowLeftDouble, tr("Première page"), this); + previous_page_ = new QAction(QET::Icons::ArrowLeft, tr("Page précédente"), this); next_page_ = new QAction(QET::Icons::ArrowRight, tr("Page suivante"), this); - last_page_ = new QAction(QET::Icons::ArrowRightDouble, tr("Derni\350re page"), this); + last_page_ = new QAction(QET::Icons::ArrowRightDouble, tr("Dernière page"), this); single_page_view_ = new QAction(QET::Icons::SinglePage, tr("Afficher une seule page"), this); facing_pages_view_ = new QAction(QET::Icons::PrintTwoPages, tr("Afficher deux pages"), this); - all_pages_view_ = new QAction(QET::Icons::PrintAllPages, tr("Afficher un aper\347u de toutes les pages"), this); + all_pages_view_ = new QAction(QET::Icons::PrintAllPages, tr("Afficher un aperçu de toutes les pages"), this); page_setup_ = new QAction(QET::Icons::DocumentPrintFrame, tr("Mise en page"), this); toggle_diagrams_list_ -> setCheckable(true); @@ -235,16 +238,16 @@ void QETPrintPreviewDialog::build() { use_full_page_ = new QCheckBox(tr("Utiliser toute la feuille")); use_full_page_ -> setChecked(printer_ -> fullPage()); use_full_page_label_ = new QLabel(tr( - "Si cette option est coch\351e, les marges de la feuille seront " - "ignor\351es et toute sa surface sera utilis\351e pour l'impression. " - "Cela peut ne pas \352tre support\351 par votre imprimante." + "Si cette option est cochée, les marges de la feuille seront " + "ignorées et toute sa surface sera utilisée pour l'impression. " + "Cela peut ne pas être supporté par votre imprimante." )); use_full_page_label_ -> setWordWrap(true); use_full_page_label_ -> setContentsMargins(20, 0, 0, 0); - fit_diagram_to_page_ = new QCheckBox(tr("Adapter le sch\351ma \340 la page")); + fit_diagram_to_page_ = new QCheckBox(tr("Adapter le schéma à la page")); fit_diagram_to_page_label_ = new QLabel(tr( - "Si cette option est coch\351e, le sch\351ma sera agrandi ou " - "r\351tr\351ci de fa\347on \340 remplir toute la surface imprimable " + "Si cette option est cochée, le schéma sera agrandi ou " + "rétréci de façon à remplir toute la surface imprimable " "d'une et une seule page." )); fit_diagram_to_page_label_ -> setWordWrap(true); @@ -360,9 +363,9 @@ void QETPrintPreviewDialog::setDiagramsListVisible(bool display) { diagrams_select_none_ -> setVisible(display); if (display) { - toggle_diagrams_list_ -> setText(tr("Cacher la liste des sch\351mas")); + toggle_diagrams_list_ -> setText(tr("Cacher la liste des schémas")); } else { - toggle_diagrams_list_ -> setText(tr("Afficher la liste des sch\351mas")); + toggle_diagrams_list_ -> setText(tr("Afficher la liste des schémas")); } } diff --git a/sources/qetprintpreviewdialog.h b/sources/qetprintpreviewdialog.h index dfa2ad2d6..11313039e 100644 --- a/sources/qetprintpreviewdialog.h +++ b/sources/qetprintpreviewdialog.h @@ -17,12 +17,16 @@ */ #ifndef QET_PRINT_PREVIEW_DIALOG #define QET_PRINT_PREVIEW_DIALOG -#include +#include #include "exportproperties.h" + class Diagram; class DiagramsChooser; class ExportPropertiesWidget; class QETProject; +class QPrintPreviewWidget; +class QPrinter; + /** This class provides a dialog for users to refine printing options for a particular project by relying on a visual print preview. diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index ff21021f2..a0d64487c 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -32,6 +32,8 @@ #include "numerotationcontext.h" #include "reportproperties.h" +#include + QString QETProject::integration_category_name = "import"; /** @@ -255,7 +257,7 @@ void QETProject::setFilePath(const QString &filepath) { QString QETProject::currentDir() const { QString current_directory; if (file_path_.isEmpty()) { - current_directory = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); + current_directory = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); } else { current_directory = QFileInfo(file_path_).absoluteDir().absolutePath(); } @@ -277,7 +279,7 @@ QString QETProject::pathNameTitle() const { if (!project_title_.isEmpty()) { final_title = QString( tr( - "Projet \253\240%1\240\273", + "Projet « %1 »", "displayed title for a ProjectView - %1 is the project title" ) ).arg(project_title_); @@ -308,7 +310,7 @@ QString QETProject::pathNameTitle() const { if (modified_) { final_title = QString( tr( - "%1 [modifi\351]", + "%1 [modifié]", "displayed title for a modified project - %1 is a displayable title" ) ).arg(final_title); @@ -738,7 +740,7 @@ QString QETProject::integrateElement(const QString &elmt_location, QString &erro QString QETProject::integrateElement(const QString &elmt_path, MoveElementsHandler *handler, QString &error_message) { // on s'assure que le projet a une categorie dediee aux elements importes automatiquement if (!ensureIntegrationCategoryExists()) { - error_message = tr("Impossible de cr\351er la cat\351gorie pour l'int\351gration des \351l\351ments"); + error_message = tr("Impossible de créer la catégorie pour l'intégration des éléments"); return(QString()); } @@ -749,7 +751,7 @@ QString QETProject::integrateElement(const QString &elmt_path, MoveElementsHandl ElementsCollectionItem *integ_item = QETApp::collectionItem(ElementsLocation::locationFromString(elmt_path)); ElementDefinition *integ_elmt = integ_item ? integ_item -> toElement() : 0; if (!integ_item || !integ_elmt) { - error_message = tr("Impossible d'acc\351der \340 l'\351l\351ment \340 int\351grer"); + error_message = tr("Impossible d'accéder à l'élément à intégrer"); return(QString()); } @@ -766,7 +768,7 @@ QString QETProject::integrateElement(const QString &elmt_path, MoveElementsHandl // la categorie cible n'existe pas : on la cree par recopie ElementsCollectionItem *result_cat = par_cat -> copy(target_cat, handler, false); if (!result_cat || !result_cat -> isCategory()) { - error_message = QString(tr("Un probl\350me s'est produit pendant la copie de la cat\351gorie %1")).arg(par_cat -> location().toString()); + error_message = QString(tr("Un problème s'est produit pendant la copie de la catégorie %1")).arg(par_cat -> location().toString()); return(QString()); } target_cat = result_cat -> toCategory(); @@ -840,7 +842,7 @@ QString QETProject::integrateTitleBlockTemplate(const TitleBlockTemplateLocation src_tbt.getTemplateXmlDescription() ); if (!integration) { - handler -> errorWithATemplate(src_tbt, tr("Une erreur s'est produite durant l'int\351gration du mod\350le.", "error message")); + handler -> errorWithATemplate(src_tbt, tr("Une erreur s'est produite durant l'intégration du modèle.", "error message")); target_name = QString(); } return(target_name); @@ -961,7 +963,7 @@ QList QETProject::addNewDiagramFolioList() { diagram_folio_list -> border_and_titleblock.importTitleBlock(defaultTitleBlockProperties()); diagram_folio_list -> defaultConductorProperties = defaultConductorProperties(); - diagram_folio_list -> border_and_titleblock.setTitle(tr("Liste des Sch\351mas")); + diagram_folio_list -> border_and_titleblock.setTitle(tr("Liste des Schémas")); // no need to display rows and columns diagram_folio_list -> border_and_titleblock.displayRows(false); diagram_folio_list -> border_and_titleblock.displayColumns(false); @@ -1070,15 +1072,15 @@ void QETProject::readProjectXml() { project_qet_version_ = root_elmt.attribute("version").toDouble(&conv_ok); if (conv_ok && QET::version.toDouble() < project_qet_version_) { - int ret = QET::MessageBox::warning( + int ret = QET::QetMessageBox::warning( 0, tr("Avertissement", "message box title"), tr( - "Ce document semble avoir \351t\351 enregistr\351 avec " - "une version ult\351rieure de QElectroTech. Il est " + "Ce document semble avoir été enregistré avec " + "une version ultérieure de QElectroTech. Il est " "possible que l'ouverture de tout ou partie de ce " - "document \351choue.\n" - "Que d\351sirez vous faire ?", + "document échoue.\n" + "Que désirez vous faire ?", "message box content" ), QMessageBox::Open | QMessageBox::Cancel @@ -1129,6 +1131,7 @@ void QETProject::readDiagramsXml() { // map destinee a accueillir les schemas QMultiMap loaded_diagrams; + //@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting //show DialogWaiting DialogWaiting* dlgWaiting = new DialogWaiting(); dlgWaiting -> setModal(true); @@ -1138,19 +1141,24 @@ void QETProject::readDiagramsXml() { // recherche les schemas dans le projet QDomNodeList diagram_nodes = document_root_.elementsByTagName("diagram"); dlgWaiting->setProgressBarRange(0, diagram_nodes.length()); - for (uint i = 0 ; i < diagram_nodes.length() ; ++ i) { + for (int i = 0 ; i < diagram_nodes.length() ; ++ i) + { dlgWaiting->setProgressBar(i+1); - if (diagram_nodes.at(i).isElement()) { + if (diagram_nodes.at(i).isElement()) + { QDomElement diagram_xml_element = diagram_nodes.at(i).toElement(); Diagram *diagram = new Diagram(this); bool diagram_loading = diagram -> initFromXml(diagram_xml_element); - if (diagram_loading) { + if (diagram_loading) + { dlgWaiting->setDetail( diagram->title() ); // recupere l'attribut order du schema int diagram_order = -1; if (!QET::attributeIsAnInteger(diagram_xml_element, "order", &diagram_order)) diagram_order = 500000; loaded_diagrams.insert(diagram_order, diagram); - } else { + } + else + { delete diagram; } } @@ -1378,17 +1386,17 @@ NamesList QETProject::namesListForIntegrationCategory() { const QChar russian_data[24] = { 0x0418, 0x043C, 0x043F, 0x043E, 0x0440, 0x0442, 0x0438, 0x0440, 0x043E, 0x0432, 0x0430, 0x043D, 0x043D, 0x044B, 0x0435, 0x0020, 0x044D, 0x043B, 0x0435, 0x043C, 0x0435, 0x043D, 0x0442, 0x044B }; const QChar greek_data[18] = { 0x0395, 0x03b9, 0x03c3, 0x03b7, 0x03b3, 0x03bc, 0x03ad, 0x03bd, 0x03b1, 0x0020, 0x03c3, 0x03c4, 0x03bf, 0x03b9, 0x03c7, 0x03b5, 0x03af, 0x03b1 }; - names.addName("fr", "\311l\351ments import\351s"); + names.addName("fr", "Éléments importés"); names.addName("en", "Imported elements"); names.addName("de", "Importierte elemente"); names.addName("es", "Elementos importados"); names.addName("ru", QString(russian_data, 24)); - names.addName("cs", "Zaveden\351 prvky"); + names.addName("cs", "Zavedené prvky"); names.addName("pl", "Elementy importowane"); names.addName("pt", "elementos importados"); names.addName("it", "Elementi importati"); names.addName("el", QString(greek_data, 18)); - names.addName("nl", "Elementen ge\357mporteerd"); + names.addName("nl", "Elementen geïmporteerd"); names.addName("hr", "Uvezeni elementi"); names.addName("ca", "Elements importats"); names.addName("ro", "Elemente importate"); @@ -1549,7 +1557,7 @@ ElementsLocation QETProject::copyElementWithHandler( ElementsCollectionItem *result_item = integ_elmt -> copy(target_cat, handler); ElementDefinition *result_elmt = result_item ? result_item -> toElement() : 0; if (!result_item || !result_elmt) { - error_message = QString(tr("Un probl\350me s'est produit pendant la copie de l'\351l\351ment %1")).arg(integ_elmt -> location().toString()); + error_message = QString(tr("Un problème s'est produit pendant la copie de l'élément %1")).arg(integ_elmt -> location().toString()); return(ElementsLocation()); } return(result_elmt -> location()); diff --git a/sources/qetsingleapplication.cpp b/sources/qetsingleapplication.cpp index 8fdd996b5..1fc8d7ffa 100644 --- a/sources/qetsingleapplication.cpp +++ b/sources/qetsingleapplication.cpp @@ -45,7 +45,7 @@ QETSingleApplication::QETSingleApplication(int &argc, char **argv, const QString // initialisation du segment de memoire partage if (!shared_memory_.create(1)) { - qDebug() << "QETSingleApplication::QETSingleApplication() : Impossible de cr\351er l'instance unique" << qPrintable(unique_key_); + qDebug() << "QETSingleApplication::QETSingleApplication() : Impossible de créer l'instance unique" << qPrintable(unique_key_); return; } #endif diff --git a/sources/qettabbar.h b/sources/qettabbar.h index d2bd6a905..396bb085d 100644 --- a/sources/qettabbar.h +++ b/sources/qettabbar.h @@ -17,7 +17,7 @@ */ #ifndef QET_TAB_BAR_H #define QET_TAB_BAR_H -#include +#include #include /** This class provides a tab bar. diff --git a/sources/qfilenameedit.cpp b/sources/qfilenameedit.cpp index 19624ae66..09f12109e 100644 --- a/sources/qfilenameedit.cpp +++ b/sources/qfilenameedit.cpp @@ -70,7 +70,7 @@ void QFileNameEdit::init() { setValidator(validator_); tooltip_text_ = QString( tr( - "Les caract\350res autoris\351s sont : \n" + "Les caractères autorisés sont : \n" " - les chiffres [0-9]\n" " - les minuscules [a-z]\n" " - le tiret [-], l'underscore [_] et le point [.]\n", diff --git a/sources/qtextorientationspinboxwidget.cpp b/sources/qtextorientationspinboxwidget.cpp index 50de6226c..39887f959 100644 --- a/sources/qtextorientationspinboxwidget.cpp +++ b/sources/qtextorientationspinboxwidget.cpp @@ -104,7 +104,7 @@ void QTextOrientationSpinBoxWidget::build() { spin_box_ = new QDoubleSpinBox(); spin_box_ -> setRange(-360.0, 360.0); - spin_box_ -> setSuffix("\260"); + spin_box_ -> setSuffix("°"); // met en place les relations entre le SpinBox et le QTextOrientationWidget connect(spin_box_, SIGNAL(valueChanged(double)), orientation_widget_, SLOT(setOrientation(double))); diff --git a/sources/qtextorientationspinboxwidget.h b/sources/qtextorientationspinboxwidget.h index af253dc82..46216da23 100644 --- a/sources/qtextorientationspinboxwidget.h +++ b/sources/qtextorientationspinboxwidget.h @@ -17,7 +17,7 @@ */ #ifndef Q_TEXT_ORIENTATION_SPINBOX_WIDGET_H #define Q_TEXT_ORIENTATION_SPINBOX_WIDGET_H -#include +#include #include "qtextorientationwidget.h" /** This class provides a widget grouping a QTextOrientationWidget and QSpinBox diff --git a/sources/qtextorientationwidget.cpp b/sources/qtextorientationwidget.cpp index 1f787aa31..3b83400cf 100644 --- a/sources/qtextorientationwidget.cpp +++ b/sources/qtextorientationwidget.cpp @@ -246,7 +246,7 @@ void QTextOrientationWidget::paintEvent(QPaintEvent *event) { void QTextOrientationWidget::mouseMoveEvent(QMouseEvent *event) { if (read_only_) return; - bool drawn_angle_hovered = positionIsASquare(event -> posF(), &highlight_angle_); + bool drawn_angle_hovered = positionIsASquare(event -> localPos(), &highlight_angle_); if (must_highlight_angle_ != drawn_angle_hovered) { must_highlight_angle_ = drawn_angle_hovered; @@ -262,7 +262,7 @@ void QTextOrientationWidget::mouseReleaseEvent(QMouseEvent *event) { if (read_only_) return; double clicked_angle; - bool drawn_angle_clicked = positionIsASquare(event -> posF(), &clicked_angle); + bool drawn_angle_clicked = positionIsASquare(event -> localPos(), &clicked_angle); if (drawn_angle_clicked) { setOrientation(clicked_angle); diff --git a/sources/qtextorientationwidget.h b/sources/qtextorientationwidget.h index a1130afdf..e7297dbdb 100644 --- a/sources/qtextorientationwidget.h +++ b/sources/qtextorientationwidget.h @@ -17,7 +17,7 @@ */ #ifndef Q_TEXT_ORIENTATION_WIDGET_H #define Q_TEXT_ORIENTATION_WIDGET_H -#include +#include /** This class provides a visual representation of a text orientation. */ diff --git a/sources/richtext/richtexteditor.cpp b/sources/richtext/richtexteditor.cpp index ac9eef3b8..e562bf552 100644 --- a/sources/richtext/richtexteditor.cpp +++ b/sources/richtext/richtexteditor.cpp @@ -48,7 +48,7 @@ #include "richtexteditor_p.h" #include "ui_addlinkdialog.h" -#include +//#include #include #include @@ -57,24 +57,24 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include #include -#include +#include #include -#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE @@ -464,7 +464,7 @@ RichTextEditorToolBar::RichTextEditorToolBar(RichTextEditor *editor, m_underline_action = createCheckableAction( QIcon(":/ico/32x32/format-text-underline.png"), - tr("Texte soulig\351"), editor, SLOT(setFontUnderline(bool)), this); + tr("Texte souligé"), editor, SLOT(setFontUnderline(bool)), this); m_underline_action->setShortcut(tr("CTRL+U")); addAction(m_underline_action); @@ -519,7 +519,7 @@ RichTextEditorToolBar::RichTextEditorToolBar(RichTextEditor *editor, // Insert hyperlink and image buttons - m_link_action->setText(tr("Ins\351rer un lien")); + m_link_action->setText(tr("Insérer un lien")); connect(m_link_action, SIGNAL(triggered()), SLOT(insertLink())); addAction(m_link_action); @@ -731,7 +731,6 @@ void RichTextEditor::setDefaultFont(QFont font) QString RichTextEditor::text(Qt::TextFormat format) const { switch (format) { - case Qt::LogText: case Qt::PlainText: return toPlainText(); case Qt::RichText: diff --git a/sources/richtext/richtexteditor_p.h b/sources/richtext/richtexteditor_p.h index 48e9b2cf6..4a445b2c9 100644 --- a/sources/richtext/richtexteditor_p.h +++ b/sources/richtext/richtexteditor_p.h @@ -53,8 +53,8 @@ #ifndef RICHTEXTEDITOR_H #define RICHTEXTEDITOR_H -#include -#include +#include +#include QT_BEGIN_NAMESPACE diff --git a/sources/richtext/ui_addlinkdialog.h b/sources/richtext/ui_addlinkdialog.h index 47d48bc52..1026c7afd 100644 --- a/sources/richtext/ui_addlinkdialog.h +++ b/sources/richtext/ui_addlinkdialog.h @@ -11,18 +11,18 @@ #define UI_ADDLINKDIALOG_H #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include QT_BEGIN_NAMESPACE @@ -101,9 +101,9 @@ public: void retranslateUi(QDialog *AddLinkDialog) { - AddLinkDialog->setWindowTitle(QApplication::translate("AddLinkDialog", "Insert Link", 0, QApplication::UnicodeUTF8)); - label->setText(QApplication::translate("AddLinkDialog", "Title:", 0, QApplication::UnicodeUTF8)); - label_2->setText(QApplication::translate("AddLinkDialog", "URL:", 0, QApplication::UnicodeUTF8)); + AddLinkDialog->setWindowTitle(QApplication::translate("AddLinkDialog", "Insert Link", 0)); + label->setText(QApplication::translate("AddLinkDialog", "Title:", 0)); + label_2->setText(QApplication::translate("AddLinkDialog", "URL:", 0)); } // retranslateUi }; diff --git a/sources/titleblock/dimensionwidget.h b/sources/titleblock/dimensionwidget.h index 29f1c2e77..30b713d1c 100644 --- a/sources/titleblock/dimensionwidget.h +++ b/sources/titleblock/dimensionwidget.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_DIMENSION_WIDGET_H #define TITLEBLOCK_SLASH_DIMENSION_WIDGET_H -#include +#include #include "dimension.h" /** diff --git a/sources/titleblock/gridlayoutanimation.h b/sources/titleblock/gridlayoutanimation.h index dd5fb8662..eaa043471 100644 --- a/sources/titleblock/gridlayoutanimation.h +++ b/sources/titleblock/gridlayoutanimation.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_GRID_LAYOUT_ANIMATION_H #define TITLEBLOCK_SLASH_GRID_LAYOUT_ANIMATION_H -#include +#include /** This class allows animating a dimension change for a QGraphicsGridLayout diff --git a/sources/titleblock/helpercell.h b/sources/titleblock/helpercell.h index 42c2eda10..ef8c8db0c 100644 --- a/sources/titleblock/helpercell.h +++ b/sources/titleblock/helpercell.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_HELPER_CELL_H #define TITLEBLOCK_SLASH_HELPER_CELL_H -#include +#include #include "qet.h" /** diff --git a/sources/titleblock/integrationmovetemplateshandler.cpp b/sources/titleblock/integrationmovetemplateshandler.cpp index e43ea04f4..984106b18 100644 --- a/sources/titleblock/integrationmovetemplateshandler.cpp +++ b/sources/titleblock/integrationmovetemplateshandler.cpp @@ -42,8 +42,8 @@ IntegrationMoveTitleBlockTemplatesHandler::~IntegrationMoveTitleBlockTemplatesHa @return the action to be done if the target template already exists */ QET::Action IntegrationMoveTitleBlockTemplatesHandler::templateAlreadyExists(const TitleBlockTemplateLocation &src, const TitleBlockTemplateLocation &dst) { - QString no_parent_collection_error_message(tr("Impossible d'acc\351der \340 la cat\351gorie parente", "error message")); - QString cant_get_xml_description_error_message(tr("Impossible d'obtenir la description XML de ce mod\350le", "error message")); + QString no_parent_collection_error_message(tr("Impossible d'accéder à la catégorie parente", "error message")); + QString cant_get_xml_description_error_message(tr("Impossible d'obtenir la description XML de ce modèle", "error message")); // we'll need the parent collection of both templates TitleBlockTemplatesCollection *src_tbt_parent_collection = src.parentCollection(); @@ -80,8 +80,8 @@ QET::Action IntegrationMoveTitleBlockTemplatesHandler::templateAlreadyExists(con @param message Error message. */ QET::Action IntegrationMoveTitleBlockTemplatesHandler::errorWithATemplate(const TitleBlockTemplateLocation &tbt, const QString &message) { - QString error_message = QString("Une erreur s'est produite avec le mod\350le %1\240: %2").arg(tbt.toString()).arg(message); - QET::MessageBox::critical( + QString error_message = QString("Une erreur s'est produite avec le modèle %1 : %2").arg(tbt.toString()).arg(message); + QET::QetMessageBox::critical( parent_widget_, tr("Erreur", "message box title"), error_message, @@ -145,14 +145,14 @@ QET::Action IntegrationMoveTitleBlockTemplatesHandler::askUser(const TitleBlockT void IntegrationMoveTitleBlockTemplatesHandler::initDialog() { if (integ_dialog_) return; integ_dialog_ = new QDialog(parent_widget_); - integ_dialog_ -> setWindowTitle(tr("Int\351gration d'un mod\350le de cartouche")); + integ_dialog_ -> setWindowTitle(tr("Intégration d'un modèle de cartouche")); dialog_label_ = new QLabel( QString( tr( - "Le mod\350le a d\351j\340 \351t\351 " - "int\351gr\351 dans le projet. Toutefois, la version que vous " - "tentez d'appliquer semble diff\351rente. Que souhaitez-vous " + "Le modèle a déjà été " + "intégré dans le projet. Toutefois, la version que vous " + "tentez d'appliquer semble différente. Que souhaitez-vous " "faire ?", "dialog content - %1 is a title block template name" ) @@ -162,7 +162,7 @@ void IntegrationMoveTitleBlockTemplatesHandler::initDialog() { use_existing_template_ = new QRadioButton( QString( tr( - "Utiliser le mod\350le d\351j\340 int\351gr\351", + "Utiliser le modèle déjà intégré", "dialog content" ) ) @@ -171,7 +171,7 @@ void IntegrationMoveTitleBlockTemplatesHandler::initDialog() { integrate_new_template_ = new QRadioButton( QString( tr( - "Int\351grer le mod\350le d\351pos\351", + "Intégrer le modèle déposé", "dialog content" ) ) @@ -181,7 +181,7 @@ void IntegrationMoveTitleBlockTemplatesHandler::initDialog() { erase_template_ = new QRadioButton( QString( tr( - "\311craser le mod\350le d\351j\340 int\351gr\351", + "Écraser le modèle déjà intégré", "dialog content" ) ) @@ -191,7 +191,7 @@ void IntegrationMoveTitleBlockTemplatesHandler::initDialog() { integrate_both_ = new QRadioButton( QString( tr( - "Faire cohabiter les deux mod\350les", + "Faire cohabiter les deux modèles", "dialog content" ) ) diff --git a/sources/titleblock/integrationmovetemplateshandler.h b/sources/titleblock/integrationmovetemplateshandler.h index e34a0fe74..9d571c5e4 100644 --- a/sources/titleblock/integrationmovetemplateshandler.h +++ b/sources/titleblock/integrationmovetemplateshandler.h @@ -18,7 +18,7 @@ #ifndef TITLEBLOCK_SLASH_INTEGRATION_MOVE_TEMPLATES_HANDLER_H #define TITLEBLOCK_SLASH_INTEGRATION_MOVE_TEMPLATES_HANDLER_H #include "movetemplateshandler.h" -#include +#include /** This class implements the interface defined by MoveTitleBlockTemplatesHandler to ease the integration of title block diff --git a/sources/titleblock/qettemplateeditor.cpp b/sources/titleblock/qettemplateeditor.cpp index f58ae891e..e6ae90eba 100644 --- a/sources/titleblock/qettemplateeditor.cpp +++ b/sources/titleblock/qettemplateeditor.cpp @@ -105,12 +105,12 @@ bool QETTitleBlockTemplateEditor::openForDuplication() const { bool QETTitleBlockTemplateEditor::canClose() { if (undo_stack_ -> isClean()) return(true); // ask the user whether he wants to save the current template - QMessageBox::StandardButton answer = QET::MessageBox::question( + QMessageBox::StandardButton answer = QET::QetMessageBox::question( this, - tr("Enregistrer le mod\350le en cours ?", "dialog title"), + tr("Enregistrer le modèle en cours ?", "dialog title"), QString( tr( - "Voulez-vous enregistrer le mod\350le %1 ?", + "Voulez-vous enregistrer le modèle %1 ?", "dialog content - %1 is a title block template name" ) ).arg(location_.name()), @@ -167,8 +167,8 @@ void QETTitleBlockTemplateEditor::duplicateCurrentLocation() { bool accepted = false; QString new_template_name = QInputDialog::getText( this, - tr("Dupliquer un mod\350le de cartouche", "input dialog title"), - tr("Pour dupliquer ce mod\350le, entrez le nom voulu pour sa copie", "input dialog text"), + tr("Dupliquer un modèle de cartouche", "input dialog title"), + tr("Pour dupliquer ce modèle, entrez le nom voulu pour sa copie", "input dialog text"), QLineEdit::Normal, proposed_name, &accepted @@ -337,16 +337,16 @@ void QETTitleBlockTemplateEditor::initActions() { cut_ = new QAction(QET::Icons::EditCut, tr("Co&uper", "menu entry"), this); copy_ = new QAction(QET::Icons::EditCopy, tr("Cop&ier", "menu entry"), this); paste_ = new QAction(QET::Icons::EditPaste, tr("C&oller", "menu entry"), this); - edit_logos_ = new QAction(QET::Icons::InsertImage, tr("G\351rer les logos", "menu entry"), this); - edit_info_ = new QAction(QET::Icons::UserInformations, tr("\311diter les informations compl\351mentaires", "menu entry"), this); + edit_logos_ = new QAction(QET::Icons::InsertImage, tr("Gérer les logos", "menu entry"), this); + edit_info_ = new QAction(QET::Icons::UserInformations, tr("Éditer les informations complémentaires", "menu entry"), this); zoom_in_ = new QAction(QET::Icons::ZoomIn, tr("Zoom avant", "menu entry"), this); - zoom_out_ = new QAction(QET::Icons::ZoomOut, tr("Zoom arri\350re", "menu entry"), this); - zoom_fit_ = new QAction(QET::Icons::ZoomFitBest, tr("Zoom adapt\351", "menu entry"), this); + zoom_out_ = new QAction(QET::Icons::ZoomOut, tr("Zoom arrière", "menu entry"), this); + zoom_fit_ = new QAction(QET::Icons::ZoomFitBest, tr("Zoom adapté", "menu entry"), this); zoom_reset_ = new QAction(QET::Icons::ZoomOriginal, tr("Pas de zoom", "menu entry"), this); add_row_ = new QAction(QET::Icons::EditTableInsertRowAbove, tr("Ajouter une &ligne", "menu entry"), this); add_col_ = new QAction(QET::Icons::EditTableInsertColumnRight, tr("Ajouter une &colonne", "menu entry"), this); merge_cells_ = new QAction(QET::Icons::EditTableCellMerge, tr("&Fusionner les cellules", "menu entry"), this); - split_cell_ = new QAction(QET::Icons::EditTableCellSplit, tr("&S\351parer les cellules", "menu entry"), this); + split_cell_ = new QAction(QET::Icons::EditTableCellSplit, tr("&Séparer les cellules", "menu entry"), this); undo_ -> setIcon(QET::Icons::EditUndo); redo_ -> setIcon(QET::Icons::EditRedo); @@ -398,7 +398,7 @@ void QETTitleBlockTemplateEditor::initActions() { */ void QETTitleBlockTemplateEditor::initMenus() { file_menu_ = new QMenu(tr("&Fichier", "menu title"), this); - edit_menu_ = new QMenu(tr("&\311dition", "menu title"), this); + edit_menu_ = new QMenu(tr("&Édition", "menu title"), this); display_menu_ = new QMenu(tr("Afficha&ge", "menu title"), this); file_menu_ -> addAction(new_); @@ -446,7 +446,7 @@ void QETTitleBlockTemplateEditor::initToolbars() { main_toolbar -> addAction(save_as_); addToolBar(Qt::TopToolBarArea, main_toolbar); - QToolBar *edit_toolbar = new QToolBar(tr("\311dition", "toolbar title"), this); + QToolBar *edit_toolbar = new QToolBar(tr("Édition", "toolbar title"), this); edit_toolbar -> setObjectName("tbt_edit_toolbar"); edit_toolbar -> addAction(undo_); edit_toolbar -> addAction(redo_); @@ -494,7 +494,7 @@ void QETTitleBlockTemplateEditor::initWidgets() { // cell edition widget at the bottom template_cell_editor_widget_ = new TitleBlockTemplateCellWidget(tb_template_); - template_cell_editor_dock_widget_ = new QDockWidget(tr("Propri\351t\351s de la cellule", "dock title"), this); + template_cell_editor_dock_widget_ = new QDockWidget(tr("Propriétés de la cellule", "dock title"), this); template_cell_editor_dock_widget_ -> setObjectName("tbt_celleditor_dock"); template_cell_editor_dock_widget_ -> setFeatures(QDockWidget::AllDockWidgetFeatures); template_cell_editor_dock_widget_ -> setWidget(template_cell_editor_widget_); @@ -562,7 +562,7 @@ QString QETTitleBlockTemplateEditor::currentlyEditedTitle() const { if (!titleblock_title.isEmpty()) { QString tag; if (!undo_stack_ -> isClean()) { - tag = tr("[Modifi\351]", "window title tag"); + tag = tr("[Modifié]", "window title tag"); } if (read_only_) { tag = tr("[Lecture seule]", "window title tag"); @@ -648,7 +648,7 @@ void QETTitleBlockTemplateEditor::updateEditorTitle() { // base title QString min_title( tr( - "QElectroTech - \311diteur de mod\350le de cartouche", + "QElectroTech - Éditeur de modèle de cartouche", "titleblock template editor: base window title" ) ); @@ -739,7 +739,7 @@ bool QETTitleBlockTemplateEditor::saveAs(const QString &filepath) { */ void QETTitleBlockTemplateEditor::open() { TitleBlockTemplateLocation location = getTitleBlockTemplateLocationFromUser( - tr("Ouvrir un mod\350le", "File > open dialog window title"), + tr("Ouvrir un modèle", "File > open dialog window title"), true ); if (location.isValid()) { @@ -761,7 +761,7 @@ void QETTitleBlockTemplateEditor::openFromFile() { tr("Ouvrir un fichier", "dialog title"), initial_dir, tr( - "Mod\350les de cartouches QElectroTech (*%1);;" + "Modèles de cartouches QElectroTech (*%1);;" "Fichiers XML (*.xml);;" "Tous les fichiers (*)", "filetypes allowed when opening a title block template file - %1 is the .titleblock extension" @@ -799,7 +799,7 @@ bool QETTitleBlockTemplateEditor::save() { */ bool QETTitleBlockTemplateEditor::saveAs() { TitleBlockTemplateLocation location = getTitleBlockTemplateLocationFromUser( - tr("Enregistrer le mod\350le sous", "dialog window title"), + tr("Enregistrer le modèle sous", "dialog window title"), false ); if (location.isValid()) { @@ -821,7 +821,7 @@ bool QETTitleBlockTemplateEditor::saveAsFile() { tr("Enregistrer sous", "dialog title"), initial_dir, tr( - "Mod\350les de cartouches QElectroTech (*%1)", + "Modèles de cartouches QElectroTech (*%1)", "filetypes allowed when saving a title block template file - %1 is the .titleblock extension" ).arg(QString(TITLEBLOCKS_FILE_EXTENSION)) ); @@ -915,11 +915,11 @@ void QETTitleBlockTemplateEditor::editTemplateInformation() { QDialog dialog_author(this); 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 compl\351mentaires", "window title")); + dialog_author.setWindowTitle(tr("Éditer les informations complémentaires", "window title")); QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog_author); // explanation label diff --git a/sources/titleblock/qettemplateeditor.h b/sources/titleblock/qettemplateeditor.h index 216084817..caa296af6 100644 --- a/sources/titleblock/qettemplateeditor.h +++ b/sources/titleblock/qettemplateeditor.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_QET_TEMPLATE_EDITOR_H #define TITLEBLOCK_SLASH_QET_TEMPLATE_EDITOR_H -#include +#include #include "qetmainwindow.h" #include "qet.h" #include "templateview.h" diff --git a/sources/titleblock/templatecellsset.h b/sources/titleblock/templatecellsset.h index 437ba0673..c0ceb369b 100644 --- a/sources/titleblock/templatecellsset.h +++ b/sources/titleblock/templatecellsset.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_TEMPLATE_CELLS_SET_H #define TITLEBLOCK_SLASH_TEMPLATE_CELLS_SET_H -#include +#include class TitleBlockCell; class TitleBlockTemplateVisualCell; class TitleBlockTemplateView; diff --git a/sources/titleblock/templatecellwidget.cpp b/sources/titleblock/templatecellwidget.cpp index 879627e21..756802d0a 100644 --- a/sources/titleblock/templatecellwidget.cpp +++ b/sources/titleblock/templatecellwidget.cpp @@ -57,13 +57,13 @@ void TitleBlockTemplateCellWidget::initWidgets() { name_input_ = new QLineEdit(); // widgets specific to empty cells - empty_label_ = new QLabel(tr("Attention : les bordures des cellules vides n'apparaissent pas lors du rendu final sur le sch\351ma.")); + empty_label_ = new QLabel(tr("Attention : les bordures des cellules vides n'apparaissent pas lors du rendu final sur le schéma.")); // widgets specific to logo cells logo_label_ = new QLabel(tr("Logo")); logo_input_ = new QComboBox(); logo_input_ -> addItem(tr("Aucun logo")); - add_logo_input_ = new QPushButton(QET::Icons::InsertImage, tr("G\351rer les logos")); + add_logo_input_ = new QPushButton(QET::Icons::InsertImage, tr("Gérer les logos")); // widgets specific to text cells label_checkbox_ = new QCheckBox(tr("Afficher un label :")); @@ -78,7 +78,7 @@ void TitleBlockTemplateCellWidget::initWidgets() { horiz_align_label_ = new QLabel(tr("horizontal :")); horiz_align_input_ = new QComboBox(); horiz_align_input_ -> addItem(tr("Gauche"), Qt::AlignLeft); - horiz_align_input_ -> addItem(tr("Centr\351"), Qt::AlignHCenter); + horiz_align_input_ -> addItem(tr("Centré"), Qt::AlignHCenter); horiz_align_input_ -> addItem(tr("Droite"), Qt::AlignRight); horiz_align_indexes_.insert(Qt::AlignLeft, 0); horiz_align_indexes_.insert(Qt::AlignHCenter, 1); @@ -419,7 +419,7 @@ void TitleBlockTemplateCellWidget::emitModification(const QString &attribute, co ModifyTitleBlockCellCommand *command = new ModifyTitleBlockCellCommand(edited_cell_); command -> addModification(attribute, new_value); command -> setText( - tr("\311dition d'une cellule : %1", "label of and undo command when editing a cell") + tr("Édition d'une cellule : %1", "label of and undo command when editing a cell") .arg(TitleBlockCell::attributeName(attribute)) ); emit(cellModified(command)); @@ -431,7 +431,7 @@ void TitleBlockTemplateCellWidget::emitModification(const QString &attribute, co */ QString TitleBlockTemplateCellWidget::defaultVariablesString() const { QString def_var_string = tr( - "Par d\351faut, les variables suivantes sont disponibles :" + "Par défaut, les variables suivantes sont disponibles :" "
      " "
    • %{author} : auteur du folio
    • " "
    • %{date} : date du folio
    • " @@ -451,14 +451,14 @@ QString TitleBlockTemplateCellWidget::defaultVariablesString() const { QString TitleBlockTemplateCellWidget::labelValueInformationString() const { QString lab_val_inf_string = tr( "Chaque cellule d'un cartouche affiche une valeur, optionnellement " - "pr\351c\351d\351e d'un label. Tous deux peuvent \352tre traduits en " + "précédée d'un label. Tous deux peuvent être traduits en " "plusieurs langues." "
      " - "Comme ce que vous \351ditez actuellement est un " - "mod\350le de cartouche, ne saisissez pas directement des " - "donn\351es brutes : ins\351rez plut\364t des variables sous la forme " - "%{nom-de-variable}, qui seront ensuite remplac\351es par les valeurs " - "ad\351quates sur le folio." + "Comme ce que vous éditez actuellement est un " + "modèle de cartouche, ne saisissez pas directement des " + "données brutes : insérez plutôt des variables sous la forme " + "%{nom-de-variable}, qui seront ensuite remplacées par les valeurs " + "adéquates sur le folio." ); return(lab_val_inf_string); } diff --git a/sources/titleblock/templatecellwidget.h b/sources/titleblock/templatecellwidget.h index 7e471654f..06a0aec79 100644 --- a/sources/titleblock/templatecellwidget.h +++ b/sources/titleblock/templatecellwidget.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_TEMPLATE_CELL_WIDGET_H #define TITLEBLOCK_SLASH_TEMPLATE_CELL_WIDGET_H -#include +#include #include "qet.h" class ModifyTitleBlockCellCommand; class TitleBlockTemplate; diff --git a/sources/titleblock/templatecommands.cpp b/sources/titleblock/templatecommands.cpp index 1ce715da4..abe1a998b 100644 --- a/sources/titleblock/templatecommands.cpp +++ b/sources/titleblock/templatecommands.cpp @@ -761,7 +761,7 @@ SplitCellsCommand::SplitCellsCommand(const TitleBlockTemplateCellsSet &splitted_ setText( QString( QObject::tr( - "S\351paration d'une cellule en %1", + "Séparation d'une cellule en %1", "label used in the title block template editor undo list; %1 is the number of cells after the split" ) ).arg(spanned_cells_.count() + 1) @@ -852,7 +852,7 @@ void SplitCellsCommand::redo() { @param parent Parent QUndoCommand */ ChangeTemplateInformationsCommand::ChangeTemplateInformationsCommand(TitleBlockTemplate *tbt, const QString &old_info, const QString &new_info, QUndoCommand *parent) : - QUndoCommand(QObject::tr("modification des informations compl\351mentaires", "undo caption"), parent), + QUndoCommand(QObject::tr("modification des informations complémentaires", "undo caption"), parent), tbtemplate_(tbt), old_information_(old_info), new_information_(new_info) diff --git a/sources/titleblock/templatedeleter.cpp b/sources/titleblock/templatedeleter.cpp index 995f103b9..dfd6b11be 100644 --- a/sources/titleblock/templatedeleter.cpp +++ b/sources/titleblock/templatedeleter.cpp @@ -53,12 +53,12 @@ bool TitleBlockTemplateDeleter::exec() { } // require confirmation from the user - QMessageBox::StandardButton answer = QET::MessageBox::question( + QMessageBox::StandardButton answer = QET::QetMessageBox::question( this, - tr("Supprimer le mod\350le de cartouche ?", "message box title"), + tr("Supprimer le modèle de cartouche ?", "message box title"), QString( tr( - "\312tes-vous s\373r de vouloir supprimer ce mod\350le de cartouche (%1) ?\n", + "Êtes-vous s\373r de vouloir supprimer ce modèle de cartouche (%1) ?\n", "message box content" ) ).arg(name), diff --git a/sources/titleblock/templatedeleter.h b/sources/titleblock/templatedeleter.h index 0e166ccb0..b1e02ad9d 100644 --- a/sources/titleblock/templatedeleter.h +++ b/sources/titleblock/templatedeleter.h @@ -18,7 +18,7 @@ #ifndef TITLEBLOCK_SLASH_TEMPLATE_DELETER_H #define TITLEBLOCK_SLASH_TEMPLATE_DELETER_H #include "templatelocation.h" -#include +#include /** This class is an abstraction layer to delete an existing title block template. diff --git a/sources/titleblock/templatelocationchooser.cpp b/sources/titleblock/templatelocationchooser.cpp index cbad8b006..290d1762c 100644 --- a/sources/titleblock/templatelocationchooser.cpp +++ b/sources/titleblock/templatelocationchooser.cpp @@ -94,7 +94,7 @@ void TitleBlockTemplateLocationChooser::init() { form_layout_ = new QFormLayout(); form_layout_ -> addRow(tr("Collection parente", "used in save as form"), collections_); - form_layout_ -> addRow(tr("Mod\350le existant", "used in save as form"), templates_); + form_layout_ -> addRow(tr("Modèle existant", "used in save as form"), templates_); setLayout(form_layout_); } diff --git a/sources/titleblock/templatelocationchooser.h b/sources/titleblock/templatelocationchooser.h index df0657490..1bdbf0be6 100644 --- a/sources/titleblock/templatelocationchooser.h +++ b/sources/titleblock/templatelocationchooser.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_LOCATION_CHOOSER_H #define TITLEBLOCK_SLASH_LOCATION_CHOOSER_H -#include +#include #include "templatelocation.h" class TitleBlockTemplateCollection; diff --git a/sources/titleblock/templatelocationsaver.cpp b/sources/titleblock/templatelocationsaver.cpp index a702f4c53..faeed22f2 100644 --- a/sources/titleblock/templatelocationsaver.cpp +++ b/sources/titleblock/templatelocationsaver.cpp @@ -88,7 +88,7 @@ void TitleBlockTemplateLocationSaver::updateTemplates() { if (!current_collection) return; TitleBlockTemplateLocationChooser::updateTemplates(); - templates_ -> insertItem(0, tr("Nouveau mod\350le (entrez son nom)", "combox box entry"), QVariant(false)); + templates_ -> insertItem(0, tr("Nouveau modèle (entrez son nom)", "combox box entry"), QVariant(false)); templates_ -> insertSeparator(1); updateNewName(); diff --git a/sources/titleblock/templatelocationsaver.h b/sources/titleblock/templatelocationsaver.h index 9b6a47435..61bfb347c 100644 --- a/sources/titleblock/templatelocationsaver.h +++ b/sources/titleblock/templatelocationsaver.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_LOCATION_SAVER_H #define TITLEBLOCK_SLASH_LOCATION_SAVER_H -#include +#include #include "templatelocationchooser.h" class TitleBlockTemplateCollection; diff --git a/sources/titleblock/templatelogomanager.cpp b/sources/titleblock/templatelogomanager.cpp index 7c94906df..3d3c3585c 100644 --- a/sources/titleblock/templatelogomanager.cpp +++ b/sources/titleblock/templatelogomanager.cpp @@ -19,6 +19,8 @@ #include "titleblocktemplate.h" #include "qeticons.h" +#include + /** Constructor @param managed_template Title block template this widget manages logos for. @@ -70,12 +72,12 @@ void TitleBlockTemplateLogoManager::emitLogosChangedSignal() { Initialize widgets composing the Logo manager */ void TitleBlockTemplateLogoManager::initWidgets() { - open_dialog_dir_ = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); + open_dialog_dir_ = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); setWindowTitle(tr("Gestionnaire de logos")); setWindowIcon(QET::Icons::InsertImage); setWindowFlags(Qt::Dialog); - logos_label_ = new QLabel(tr("Logos embarqu\351s dans ce mod\350le :")); + logos_label_ = new QLabel(tr("Logos embarqués dans ce modèle :")); logos_view_ = new QListWidget(); logos_view_ -> setViewMode(QListView::IconMode); logos_view_ -> setGridSize(iconsize() * 1.4); @@ -87,7 +89,7 @@ void TitleBlockTemplateLogoManager::initWidgets() { add_button_ = new QPushButton(QET::Icons::Add, tr("Ajouter un logo")); export_button_ = new QPushButton(QET::Icons::DocumentExport, tr("Exporter ce logo")); delete_button_ = new QPushButton(QET::Icons::Remove, tr("Supprimer ce logo")); - logo_box_ = new QGroupBox(tr("Propri\351t\351s")); + logo_box_ = new QGroupBox(tr("Propriétés")); logo_name_label_ = new QLabel(tr("Nom :")); logo_name_ = new QLineEdit(); rename_button_ = new QPushButton(QET::Icons::EditRename, tr("Renommer")); @@ -185,7 +187,7 @@ QString TitleBlockTemplateLogoManager::confirmLogoName(const QString &initial_na while (managed_template_ -> logos().contains(name)) { if (!rename_dialog) { rename_dialog = new QDialog(this); - rename_dialog -> setWindowTitle(tr("Logo d\351j\340 existant")); + rename_dialog -> setWindowTitle(tr("Logo déjà existant")); rd_label = new QLabel(); rd_label -> setWordWrap(true); @@ -212,9 +214,9 @@ QString TitleBlockTemplateLogoManager::confirmLogoName(const QString &initial_na } rd_label -> setText( QString(tr( - "Il existe d\351j\340 un logo portant le nom \"%1\" au sein de " - "ce mod\350le de cartouche. Voulez-vous le remplacer ou " - "pr\351f\351rez-vous sp\351cifier un autre nom pour ce nouveau " + "Il existe déjà un logo portant le nom \"%1\" au sein de " + "ce modèle de cartouche. Voulez-vous le remplacer ou " + "préférez-vous spécifier un autre nom pour ce nouveau " "logo ?" )).arg(name) ); @@ -273,7 +275,7 @@ void TitleBlockTemplateLogoManager::addLogo() { // that filepath needs to point to a valid, readable file QFileInfo filepath_info(filepath); if (!filepath_info.exists() || !filepath_info.isReadable()) { - QMessageBox::critical(this, tr("Erreur"), tr("Impossible d'ouvrir le fichier sp\351cifi\351")); + QMessageBox::critical(this, tr("Erreur"), tr("Impossible d'ouvrir le fichier spécifié")); return; } @@ -305,7 +307,7 @@ void TitleBlockTemplateLogoManager::exportLogo() { bool save_logo = managed_template_ -> saveLogoToFile(current_logo, filepath); if (!save_logo) { - QMessageBox::critical(this, tr("Erreur"), QString(tr("Impossible d'exporter vers le fichier sp\351cifi\351"))); + QMessageBox::critical(this, tr("Erreur"), QString(tr("Impossible d'exporter vers le fichier spécifié"))); } else { open_dialog_dir_ = QDir(filepath); } @@ -346,7 +348,7 @@ void TitleBlockTemplateLogoManager::renameLogo() { QMessageBox::warning( this, warning_title, - tr("Le nouveau nom ne peut pas \352tre vide.") + tr("Le nouveau nom ne peut pas être vide.") ); return; } @@ -355,7 +357,7 @@ void TitleBlockTemplateLogoManager::renameLogo() { QMessageBox::warning( this, warning_title, - tr("Le nom saisi est d\351j\340 utilis\351 par un autre logo.") + tr("Le nom saisi est déjà utilisé par un autre logo.") ); return; } diff --git a/sources/titleblock/templatelogomanager.h b/sources/titleblock/templatelogomanager.h index 72afc0dff..5e990b9ce 100644 --- a/sources/titleblock/templatelogomanager.h +++ b/sources/titleblock/templatelogomanager.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_TEMPLATE_LOGO_MANAGER #define TITLEBLOCK_SLASH_TEMPLATE_LOGO_MANAGER -#include +#include class TitleBlockTemplate; /** diff --git a/sources/titleblock/templateview.cpp b/sources/titleblock/templateview.cpp index 3ecfa472e..386c02d19 100644 --- a/sources/titleblock/templateview.cpp +++ b/sources/titleblock/templateview.cpp @@ -534,13 +534,13 @@ qreal TitleBlockTemplateView::zoomFactor() const { void TitleBlockTemplateView::init() { add_column_before_ = new QAction(QET::Icons::EditTableInsertColumnLeft, tr("Ajouter une colonne (avant)", "context menu"), this); add_row_before_ = new QAction(QET::Icons::EditTableInsertRowAbove, tr("Ajouter une ligne (avant)", "context menu"), this); - add_column_after_ = new QAction(QET::Icons::EditTableInsertColumnRight, tr("Ajouter une colonne (apr\350s)", "context menu"), this); - add_row_after_ = new QAction(QET::Icons::EditTableInsertRowUnder, tr("Ajouter une ligne (apr\350s)", "context menu"), this); + add_column_after_ = new QAction(QET::Icons::EditTableInsertColumnRight, tr("Ajouter une colonne (après)", "context menu"), this); + add_row_after_ = new QAction(QET::Icons::EditTableInsertRowUnder, tr("Ajouter une ligne (après)", "context menu"), this); edit_column_dim_ = new QAction( tr("Modifier les dimensions de cette colonne", "context menu"), this); edit_row_dim_ = new QAction( tr("Modifier les dimensions de cette ligne", "context menu"), this); delete_column_ = new QAction(QET::Icons::EditTableDeleteColumn, tr("Supprimer cette colonne", "context menu"), this); delete_row_ = new QAction(QET::Icons::EditTableDeleteRow, tr("Supprimer cette ligne", "context menu"), this); - change_preview_width_ = new QAction( tr("Modifier la largeur de cet aper\347u", "context menu"), this); + change_preview_width_ = new QAction( tr("Modifier la largeur de cet aperçu", "context menu"), this); connect(add_column_before_, SIGNAL(triggered()), this, SLOT(addColumnBefore())); connect(add_row_before_, SIGNAL(triggered()), this, SLOT(addRowBefore())); @@ -781,8 +781,8 @@ void TitleBlockTemplateView::refresh() { */ void TitleBlockTemplateView::changePreviewWidth() { TitleBlockDimensionWidget dialog(false, this); - dialog.setWindowTitle(tr("Changer la largeur de l'aper\347u")); - dialog.label() -> setText(tr("Largeur de l'aper\347u :")); + dialog.setWindowTitle(tr("Changer la largeur de l'aperçu")); + dialog.label() -> setText(tr("Largeur de l'aperçu :")); dialog.setValue(TitleBlockDimension(preview_width_)); if (dialog.exec() == QDialog::Accepted) { setPreviewWidth(dialog.value().value); @@ -931,14 +931,14 @@ void TitleBlockTemplateView::updateDisplayedMinMaxWidth() { if (max_width != -1) { min_max_width_sentence = QString( tr( - "Longueur minimale\240: %1px\nLongueur maximale\240: %2px\n", + "Longueur minimale : %1px\nLongueur maximale : %2px\n", "tooltip showing the minimum and/or maximum width of the edited template" ) ).arg(min_width).arg(max_width); } else { min_max_width_sentence = QString( tr( - "Longueur minimale\240: %1px\n", + "Longueur minimale : %1px\n", "tooltip showing the minimum width of the edited template" ) ).arg(min_width); @@ -993,7 +993,7 @@ void TitleBlockTemplateView::updateTotalWidthLabel() { if (!total_width_helper_cell_) return; total_width_helper_cell_ -> label = QString( tr( - "Largeur totale pour cet aper\347u : %1px", + "Largeur totale pour cet aperçu : %1px", "displayed at the top of the preview when editing a title block template" ) ).arg(preview_width_); diff --git a/sources/titleblock/templatevisualcell.h b/sources/titleblock/templatevisualcell.h index 2b3c09ae4..750ef85f2 100644 --- a/sources/titleblock/templatevisualcell.h +++ b/sources/titleblock/templatevisualcell.h @@ -17,7 +17,7 @@ */ #ifndef TITLEBLOCK_SLASH_QET_TEMPLATE_VISUAL_CELL_H #define TITLEBLOCK_SLASH_QET_TEMPLATE_VISUAL_CELL_H -#include +#include #include "qet.h" class TitleBlockTemplate; #include "titleblockcell.h" diff --git a/sources/titleblockcell.cpp b/sources/titleblockcell.cpp index 9009d2c5f..2c8679d3e 100644 --- a/sources/titleblockcell.cpp +++ b/sources/titleblockcell.cpp @@ -127,7 +127,7 @@ QString TitleBlockCell::attributeName(const QString &attribute) { } else if (attribute == "displaylabel") { return(QObject::tr("affichage du label", "title block cell property human name")); } else if (attribute == "value") { - return(QObject::tr("valeur affich\351e", "title block cell property human name")); + return(QObject::tr("valeur affichée", "title block cell property human name")); } else if (attribute == "alignment") { return(QObject::tr("alignement du texte", "title block cell property human name")); } else if (attribute == "fontsize") { diff --git a/sources/titleblocktemplate.cpp b/sources/titleblocktemplate.cpp index fbfe58b93..68f473daf 100644 --- a/sources/titleblocktemplate.cpp +++ b/sources/titleblocktemplate.cpp @@ -285,7 +285,7 @@ bool TitleBlockTemplate::loadLogo(const QDomElement &xml_element) { QTextStream xml_to_byte_array(&logo_data); svg_element.save(xml_to_byte_array, 0); } else if (logo_storage == "base64") { - logo_data = QByteArray::fromBase64(xml_element.text().toAscii()); + logo_data = QByteArray::fromBase64(xml_element.text().toLatin1()); } else { return(false); } diff --git a/sources/treecoloranimation.h b/sources/treecoloranimation.h index 70b0f0bfb..787762779 100644 --- a/sources/treecoloranimation.h +++ b/sources/treecoloranimation.h @@ -17,7 +17,7 @@ */ #ifndef TREE_COLOR_ANIMATION_H #define TREE_COLOR_ANIMATION_H -#include +#include /** This class allows animating a background color change for a diff --git a/sources/ui/conductorpropertieswidget.cpp b/sources/ui/conductorpropertieswidget.cpp index 31fa2f875..9053c36d3 100644 --- a/sources/ui/conductorpropertieswidget.cpp +++ b/sources/ui/conductorpropertieswidget.cpp @@ -68,7 +68,7 @@ void ConductorPropertiesWidget::setProperties(const ConductorProperties &propert m_properties = properties; setColorButton(m_properties.color); - int index = ui -> m_line_style_cb->findData(m_properties.style); + int index = ui -> m_line_style_cb -> findData(QPen(m_properties.style)); if (index != -1) ui -> m_line_style_cb -> setCurrentIndex(index); ui -> m_text_le -> setText (m_properties.text); @@ -97,8 +97,8 @@ ConductorProperties ConductorPropertiesWidget::properties() const { if (ui -> m_multi_rb -> isChecked()) properties_.type = ConductorProperties::Multi; else if (ui -> m_single_rb -> isChecked()) properties_.type = ConductorProperties::Single; - properties_.color = ui->m_color_pb->palette().color(QPalette::Button); - properties_.style = static_cast(ui->m_line_style_cb->itemData(ui->m_line_style_cb->currentIndex()).toInt()); + properties_.color = ui -> m_color_pb->palette().color(QPalette::Button); + properties_.style = ui -> m_line_style_cb->itemData(ui->m_line_style_cb->currentIndex()).value().style(); properties_.text = ui -> m_text_le -> text(); properties_.text_size = ui -> m_text_size_sb -> value(); properties_.m_show_text = ui -> m_show_text_cb -> isChecked(); @@ -155,9 +155,9 @@ void ConductorPropertiesWidget::initWidget() { m_horiz_select = QETApp::createTextOrientationSpinBoxWidget(); ui -> m_text_angle_gl -> addWidget(m_horiz_select, 2, 1, Qt::AlignHCenter); - ui -> m_line_style_cb -> addItem(tr("Trait plein", "conductor style: solid line"), Qt::SolidLine); - ui -> m_line_style_cb -> addItem(tr("Trait en pointill\351s", "conductor style: dashed line"), Qt::DashLine); - ui -> m_line_style_cb -> addItem(tr("Traits et points", "conductor style: dashed and dotted line"), Qt::DashDotLine); + ui -> m_line_style_cb -> addItem(tr("Trait plein", "conductor style: solid line"), QPen(Qt::SolidLine)); + ui -> m_line_style_cb -> addItem(tr("Trait en pointillés", "conductor style: dashed line"), QPen(Qt::DashLine)); + ui -> m_line_style_cb -> addItem(tr("Traits et points", "conductor style: dashed and dotted line"), QPen(Qt::DashDotLine)); ui -> m_update_preview_pb -> setHidden(true); //Check this checkbox for init the associated groupbox diff --git a/sources/ui/diagrampropertiesdialog.cpp b/sources/ui/diagrampropertiesdialog.cpp index bda6af3f6..3cf94fdfa 100644 --- a/sources/ui/diagrampropertiesdialog.cpp +++ b/sources/ui/diagrampropertiesdialog.cpp @@ -42,11 +42,11 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare ConductorProperties conductors = diagram -> defaultConductorProperties; setWindowModality(Qt::WindowModal); -#ifdef Q_WS_MAC +#ifdef Q_OS_MAC setWindowFlags(Qt::Sheet); #endif - setWindowTitle(tr("Propri\351t\351s du sch\351ma", "window title")); + setWindowTitle(tr("Propriétés du schéma", "window title")); //Border widget BorderPropertiesWidget *border_infos = new BorderPropertiesWidget(border, this); diff --git a/sources/ui/diagramselection.cpp b/sources/ui/diagramselection.cpp index f81ce769c..e6bc7ed8f 100644 --- a/sources/ui/diagramselection.cpp +++ b/sources/ui/diagramselection.cpp @@ -57,7 +57,7 @@ void diagramselection::load_TableDiagram() { ui -> tableDiagram -> setEditTriggers (QAbstractItemView::NoEditTriggers); QStringList titles; titles.clear(); - titles << tr("S\351lection") << tr("Nom"); + titles << tr("Sélection") << tr("Nom"); ui-> tableDiagram -> setHorizontalHeaderLabels( titles ); // List Diagrams @@ -66,7 +66,7 @@ void diagramselection::load_TableDiagram() { QTableWidgetItem *item_State = new QTableWidgetItem(); QString diagram_title = list_diagram_.at(i) -> title(); - if (diagram_title.isEmpty()) diagram_title = tr("Sch\351ma sans titre"); + if (diagram_title.isEmpty()) diagram_title = tr("Schéma sans titre"); item_Name -> setData(Qt::DisplayRole, diagram_title); item_State -> setData(Qt::CheckStateRole, Qt::Checked); @@ -99,8 +99,8 @@ QList diagramselection::list_of_DiagramSelected() { */ void diagramselection::on_tableDiagram_customContextMenuRequested(const QPoint &pos){ QMenu menu(this); - QAction *desl = menu.addAction( tr("D\351s\351lectionner tout") ); - menu.addAction(QIcon(":/ico/16x16/dialog-ok.png"), tr("S\351lectionner tout") ); + QAction *desl = menu.addAction( tr("Désélectionner tout") ); + menu.addAction(QIcon(":/ico/16x16/dialog-ok.png"), tr("Sélectionner tout") ); // Exec Menu QAction *ret = menu.exec(ui -> tableDiagram -> viewport() -> mapToGlobal(pos)); diff --git a/sources/ui/dialogautonum.cpp b/sources/ui/dialogautonum.cpp index d7c85738e..8f881197a 100644 --- a/sources/ui/dialogautonum.cpp +++ b/sources/ui/dialogautonum.cpp @@ -61,7 +61,7 @@ void DialogAutoNum::on_pushButton_delete_clicked() { if(i+1 < listDiag.count()) diagramsTitle += ", "; } // Ask if user is sure to delete the conductor numerotation - QMessageBox::StandardButton answer = QET::MessageBox::critical( + QMessageBox::StandardButton answer = QET::QetMessageBox::critical( this, tr("Suppression des annotations conducteurs", "Attention"), QString( @@ -94,7 +94,7 @@ void DialogAutoNum::on_pushButton_annotation_clicked(){ if(i+1 < listDiag.count()) diagramsTitle += ", "; } // Ask if user is sure to numerate the conductor - QET::MessageBox::warning( + QET::QetMessageBox::warning( this, tr("Annotation des conducteurs", "Attention"), QString( diff --git a/sources/ui/dialogwaiting.cpp b/sources/ui/dialogwaiting.cpp index c1d57c0e5..126ec7669 100644 --- a/sources/ui/dialogwaiting.cpp +++ b/sources/ui/dialogwaiting.cpp @@ -46,6 +46,7 @@ DialogWaiting::~DialogWaiting() { */ void DialogWaiting::setProgressBar(int val){ ui->progressBar->setValue(val); + qApp->processEvents(); } /** diff --git a/sources/ui/elementpropertieswidget.cpp b/sources/ui/elementpropertieswidget.cpp index 93d347686..dd53a2e5a 100644 --- a/sources/ui/elementpropertieswidget.cpp +++ b/sources/ui/elementpropertieswidget.cpp @@ -53,25 +53,25 @@ QWidget* elementpropertieswidget::generalWidget() { // type de l'element QString description_string; if (ghost_element) { - description_string += tr("\311l\351ment manquant"); + description_string += tr("Élément manquant"); } else { - description_string += tr("\311l\351ment"); + description_string += tr("Élément"); } description_string += "\n"; // some element characteristic - description_string += QString(tr("Nom\240: %1\n")).arg(element_ -> name()); + description_string += QString(tr("Nom : %1\n")).arg(element_ -> name()); int folio_index = diagram_ -> folioIndex(); if (folio_index != -1) { - description_string += QString(tr("Folio\240: %1\n")).arg(folio_index + 1); + description_string += QString(tr("Folio : %1\n")).arg(folio_index + 1); } - description_string += QString(tr("Position\240: %1\n")).arg(diagram_ -> convertPosition(element_ -> scenePos()).toString()); - description_string += QString(tr("Dimensions\240: %1\327%2\n")).arg(element_ -> size().width()).arg(element_ -> size().height()); - description_string += QString(tr("Bornes\240: %1\n")).arg(element_ -> terminals().count()); - description_string += QString(tr("Champs de texte\240: %1\n")).arg(element_ -> texts().count()); + description_string += QString(tr("Position : %1\n")).arg(diagram_ -> convertPosition(element_ -> scenePos()).toString()); + description_string += QString(tr("Dimensions : %1\327%2\n")).arg(element_ -> size().width()).arg(element_ -> size().height()); + description_string += QString(tr("Bornes : %1\n")).arg(element_ -> terminals().count()); + description_string += QString(tr("Champs de texte : %1\n")).arg(element_ -> texts().count()); if (custom_element) { - description_string += QString(tr("Emplacement\240: %1\n")).arg(custom_element -> location().toString()); + description_string += QString(tr("Emplacement : %1\n")).arg(custom_element -> location().toString()); } // widget himself @@ -91,7 +91,7 @@ QWidget* elementpropertieswidget::generalWidget() { //button widget find_in_panel = new QPushButton(QET::Icons::ZoomDraw, tr("Retrouver dans le panel"), general_widget); connect(find_in_panel, SIGNAL(clicked()), this, SLOT(findInPanel())); - edit_element = new QPushButton(QET::Icons::ElementEdit, tr("\311diter l'\351l\351ment"), general_widget); + edit_element = new QPushButton(QET::Icons::ElementEdit, tr("Éditer l'élément"), general_widget); connect(edit_element, SIGNAL(clicked()), this, SLOT(editElement())); QHBoxLayout *hlayout_ = new QHBoxLayout; hlayout_->addWidget(find_in_panel); @@ -108,7 +108,7 @@ QWidget* elementpropertieswidget::generalWidget() { */ void elementpropertieswidget::buildInterface() { - setWindowTitle(tr("Propri\351t\351s de l'\351l\351ment")); + setWindowTitle(tr("Propriétés de l'élément")); tab_ = new QTabWidget(this); //Add tab according to the element @@ -127,13 +127,13 @@ void elementpropertieswidget::buildInterface() { break; case Element::Master: mpw_ = new MasterPropertiesWidget(element_, this); - tab_ -> addTab(mpw_, tr("R\351f\351rence crois\351e (maitre)")); + tab_ -> addTab(mpw_, tr("Référence croisée (maitre)")); eiw_ = new ElementInfoWidget(element_, this); tab_ -> addTab(eiw_, tr("Informations")); break; case Element::Slave: lsew_ = new LinkSingleElementWidget(element_, this); - tab_ -> addTab(lsew_, tr("R\351f\351rence crois\351e (esclave)")); + tab_ -> addTab(lsew_, tr("Référence croisée (esclave)")); break; case Element::Terminale: break; @@ -141,7 +141,7 @@ void elementpropertieswidget::buildInterface() { break; } - tab_ -> addTab(generalWidget(), tr("G\351n\351ral")); + tab_ -> addTab(generalWidget(), tr("Général")); dbb = new QDialogButtonBox(QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::Reset, Qt::Horizontal, this); diff --git a/sources/ui/elementselectorwidget.cpp b/sources/ui/elementselectorwidget.cpp index 7188cab89..23d7269a5 100644 --- a/sources/ui/elementselectorwidget.cpp +++ b/sources/ui/elementselectorwidget.cpp @@ -168,7 +168,7 @@ void ElementSelectorWidget::buildInterface() { str_list << c->properties().text; if (QET::eachStrIsEqual(str_list)) { - button_text = tr("N\260 fil : ") + str_list.first() + "\n"; + button_text = tr("N° fil : ") + str_list.first() + "\n"; //Replace the last empty string by the conductor text in_filter.pop_back(); in_filter << str_list.first(); @@ -194,7 +194,7 @@ void ElementSelectorWidget::buildInterface() { //Push button to highlight element QPushButton *pb = new QPushButton(QET::Icons::ZoomDraw,"", widget); - pb -> setToolTip(tr("Voir l'\351l\351ment")); + pb -> setToolTip(tr("Voir l'élément")); QHBoxLayout *hl = new QHBoxLayout(widget); hl -> setContentsMargins(0,0,0,0); diff --git a/sources/ui/linksingleelementwidget.cpp b/sources/ui/linksingleelementwidget.cpp index 00bc6e11f..e9e975738 100644 --- a/sources/ui/linksingleelementwidget.cpp +++ b/sources/ui/linksingleelementwidget.cpp @@ -116,8 +116,8 @@ void LinkSingleElementWidget::buildList() { void LinkSingleElementWidget::buildUnlinkButton() { unlink_widget = new QWidget(this); QHBoxLayout *unlink_layout = new QHBoxLayout(unlink_widget); - QLabel *lb = new QLabel(tr("Cet \351l\351ment est d\351j\340 li\351."), unlink_widget); - QPushButton *pb = new QPushButton(tr("D\351lier"), unlink_widget); + QLabel *lb = new QLabel(tr("Cet élément est déjà lié."), unlink_widget); + QPushButton *pb = new QPushButton(tr("Délier"), unlink_widget); connect(pb, SIGNAL(clicked()), this, SLOT(unlinkClicked())); unlink_layout->addWidget(lb); unlink_layout->addStretch(); diff --git a/sources/ui/masterpropertieswidget.cpp b/sources/ui/masterpropertieswidget.cpp index c0bb0d031..5c4456ee1 100644 --- a/sources/ui/masterpropertieswidget.cpp +++ b/sources/ui/masterpropertieswidget.cpp @@ -137,7 +137,7 @@ void MasterPropertiesWidget::buildInterface() { QString widget_text; QString title = elmt->diagram()->title(); if (title.isEmpty()) title = tr("Sans titre"); - widget_text += QString(tr("Folio\240 %1 (%2), position %3.")).arg(elmt->diagram()->folioIndex() + 1) + widget_text += QString(tr("Folio %1 (%2), position %3.")).arg(elmt->diagram()->folioIndex() + 1) .arg(title) .arg(elmt->diagram() -> convertPosition(elmt -> scenePos()).toString()); QListWidgetItem *lwi_ = new QListWidgetItem(elmt->pixmap(), widget_text); @@ -151,7 +151,7 @@ void MasterPropertiesWidget::buildInterface() { QString widget_text; QString title = elmt->diagram()->title(); if (title.isEmpty()) title = tr("Sans titre"); - widget_text += QString(tr("Folio\240 %1 (%2), position %3.")).arg(elmt->diagram()->folioIndex() + 1) + widget_text += QString(tr("Folio %1 (%2), position %3.")).arg(elmt->diagram()->folioIndex() + 1) .arg(title) .arg(elmt->diagram() -> convertPosition(elmt -> scenePos()).toString()); QListWidgetItem *lwi_ = new QListWidgetItem(elmt->pixmap(), widget_text); diff --git a/sources/ui/potentialtextsdialog.cpp b/sources/ui/potentialtextsdialog.cpp index 998ae0753..c259de49f 100644 --- a/sources/ui/potentialtextsdialog.cpp +++ b/sources/ui/potentialtextsdialog.cpp @@ -64,7 +64,7 @@ void PotentialTextsDialog::buildRadioList() { //create a new radio button for each text of @conductorList for (QMultiMap::ConstIterator it = m_texts.constEnd()-1; it != m_texts.constBegin()-1; --it) { - QRadioButton *rb= new QRadioButton(it.value() + tr(" : est pr\351sent ") + QString::number(it.key()) + tr(" fois."), this); + QRadioButton *rb= new QRadioButton(it.value() + tr(" : est présent ") + QString::number(it.key()) + tr(" fois."), this); if (it == m_texts.constEnd()-1) { rb -> setChecked(true); m_selected_text = it.value(); diff --git a/sources/ui/projectpropertiesdialog.cpp b/sources/ui/projectpropertiesdialog.cpp index 7fe1bf640..c0fb845a0 100644 --- a/sources/ui/projectpropertiesdialog.cpp +++ b/sources/ui/projectpropertiesdialog.cpp @@ -29,7 +29,7 @@ */ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *parent) { m_properties_dialog = new ConfigDialog (parent); - m_properties_dialog -> setWindowTitle(QObject::tr("Propri\351t\351s du projet", "window title")); + m_properties_dialog -> setWindowTitle(QObject::tr("Propriétés du projet", "window title")); m_properties_dialog -> addPage(new ProjectMainConfigPage (project)); m_properties_dialog -> addPage(new NewDiagramPage (project)); m_properties_dialog -> addPage(new ProjectAutoNumConfigPage (project)); diff --git a/sources/ui/selectautonumw.cpp b/sources/ui/selectautonumw.cpp index b0f726acf..e55737a78 100644 --- a/sources/ui/selectautonumw.cpp +++ b/sources/ui/selectautonumw.cpp @@ -133,21 +133,21 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button) { break; //help dialog case QDialogButtonBox::HelpRole: - QMessageBox::information (this, tr("Autonum\351rotation", "title window"), - tr("C'est ici que vous pouvez d\351finir la mani\350re dont sera num\351rot\351 les nouveaux conducteurs.\n" - "-Une num\351rotation est compos\351e d'une variable minimum.\n" - "-Vous pouvez ajouter ou supprimer une variable de num\351rotation par le biais des boutons - et +.\n" - "-Une variable de num\351rotation comprant: un type, une valeur et une incr\351mentation.\n" + QMessageBox::information (this, tr("Autonumérotation", "title window"), + tr("C'est ici que vous pouvez définir la manière dont sera numéroté les nouveaux conducteurs.\n" + "-Une numérotation est composée d'une variable minimum.\n" + "-Vous pouvez ajouter ou supprimer une variable de numérotation par le biais des boutons - et +.\n" + "-Une variable de numérotation comprant: un type, une valeur et une incrémentation.\n" - "\n-les types \"Chiffre 1\", \"Chiffre 01\" et \"Chiffre 001\", repr\351sente un type num\351rique d\351finie dans le champs \"Valeur\", " - "qui s'incr\351mente \340 chaque nouveau conducteur de la valeur du champ \"Incr\351mentation\".\n" - "-\"Chiffre 01\" et \"Chiffre 001\", sont respectivement repr\351sent\351 sur le sch\351ma par deux et trois digits minimum.\n" - "Si le chiffre d\351finie dans le champs Valeur poss\351de moins de digits que le type choisit," - "celui-ci sera pr\351c\351d\351 par un ou deux 0 afin de respecter son type.\n" + "\n-les types \"Chiffre 1\", \"Chiffre 01\" et \"Chiffre 001\", représente un type numérique définie dans le champs \"Valeur\", " + "qui s'incrémente à chaque nouveau conducteur de la valeur du champ \"Incrémentation\".\n" + "-\"Chiffre 01\" et \"Chiffre 001\", sont respectivement représenté sur le schéma par deux et trois digits minimum.\n" + "Si le chiffre définie dans le champs Valeur posséde moins de digits que le type choisit," + "celui-ci sera précédé par un ou deux 0 afin de respecter son type.\n" - "\n-Le type \"Texte\", repr\351sente un texte fixe.\nLe champs \"Incr\351mentation\" n'est pas utilis\351.\n" + "\n-Le type \"Texte\", représente un texte fixe.\nLe champs \"Incrémentation\" n'est pas utilisé.\n" - "\n-Le type \"N\260 folio\" repr\351sente le n\260 du folio en cours.\nLes autres champs ne sont pas utilis\351s.", + "\n-Le type \"N° folio\" représente le n° du folio en cours.\nLes autres champs ne sont pas utilisés.", "help dialog about the autonumerotation")); //apply the context in the diagram displayed by @diagram_chooser. diff --git a/sources/ui/titleblockpropertieswidget.cpp b/sources/ui/titleblockpropertieswidget.cpp index 9e8eaf4d8..4a8ef1749 100644 --- a/sources/ui/titleblockpropertieswidget.cpp +++ b/sources/ui/titleblockpropertieswidget.cpp @@ -214,7 +214,7 @@ void TitleBlockPropertiesWidget::setTitleBlockTemplatesCollection(TitleBlockTemp */ void TitleBlockPropertiesWidget::setTitleBlockTemplatesList(const QStringList &tbt) { ui -> m_tbt_cb ->clear(); - ui -> m_tbt_cb -> addItem(QET::Icons::TitleBlock, tr("Mod\350le par d\351faut")); + ui -> m_tbt_cb -> addItem(QET::Icons::TitleBlock, tr("Modèle par défaut")); foreach (QString tbt_name, tbt) { ui -> m_tbt_cb -> addItem(QET::Icons::TitleBlock, tbt_name, tbt_name); } @@ -232,8 +232,8 @@ void TitleBlockPropertiesWidget::initDialog(const bool ¤t_date) { setTitleBlockTemplatesVisible(false); ui -> m_current_date_rb -> setVisible(current_date); - m_tbt_edit = new QAction(tr("\311diter ce mod\350le", "menu entry"), this); - m_tbt_duplicate = new QAction(tr("Dupliquer et editer ce mod\350le", "menu entry"), this); + m_tbt_edit = new QAction(tr("Éditer ce modèle", "menu entry"), this); + m_tbt_duplicate = new QAction(tr("Dupliquer et editer ce modèle", "menu entry"), this); connect(m_tbt_edit, SIGNAL(triggered()), this, SLOT(editCurrentTitleBlockTemplate())); connect(m_tbt_duplicate, SIGNAL(triggered()), this, SLOT(duplicateCurrentTitleBlockTemplate())); diff --git a/sources/ui/xrefpropertieswidget.cpp b/sources/ui/xrefpropertieswidget.cpp index 568d38d61..2d46b96e9 100644 --- a/sources/ui/xrefpropertieswidget.cpp +++ b/sources/ui/xrefpropertieswidget.cpp @@ -91,7 +91,7 @@ void XRefPropertiesWidget::buildUi() { ui -> m_type_cb -> addItem(tr("Bobine"), "coil"); ui -> m_type_cb -> addItem(tr("Organe de protection"), "protection"); ui -> m_snap_to_cb -> addItem(tr("En bas de page"), "bottom"); - ui -> m_snap_to_cb -> addItem(tr("Sous le label de l'\351l\351ment"), "label"); + ui -> m_snap_to_cb -> addItem(tr("Sous le label de l'élément"), "label"); m_previous_type_index = ui -> m_type_cb -> currentIndex(); } diff --git a/sources/undocommand/changeelementinformationcommand.cpp b/sources/undocommand/changeelementinformationcommand.cpp index 30e1ec6a9..00d53216e 100644 --- a/sources/undocommand/changeelementinformationcommand.cpp +++ b/sources/undocommand/changeelementinformationcommand.cpp @@ -32,7 +32,7 @@ ChangeElementInformationCommand::ChangeElementInformationCommand(Element *elmt, m_old_info (old_info), m_new_info (new_info) { - setText(QObject::tr("Modifier les informations de l'\351l\351ment : %1").arg(elmt -> name())); + setText(QObject::tr("Modifier les informations de l'élément : %1").arg(elmt -> name())); } /**