diff --git a/editor/qetelementeditor.cpp b/editor/qetelementeditor.cpp index 236bc0bd4..8fb32e81a 100644 --- a/editor/qetelementeditor.cpp +++ b/editor/qetelementeditor.cpp @@ -258,7 +258,9 @@ void QETElementEditor::setupInterface() { undo_dock -> setFeatures(QDockWidget::AllDockWidgetFeatures); undo_dock -> setMinimumWidth(290); addDockWidget(Qt::RightDockWidgetArea, undo_dock); - undo_dock -> setWidget(new QUndoView(&(ce_scene -> undoStack()), this)); + QUndoView* undo_view = new QUndoView(&(ce_scene -> undoStack()), this); + undo_view -> setEmptyLabel(tr("Aucune modification")); + undo_dock -> setWidget(undo_view); // panel sur le côté pour la liste des parties parts_list = new QListWidget(this); diff --git a/lang/qet_en.qm b/lang/qet_en.qm index 30f686d02..36a55b936 100644 Binary files a/lang/qet_en.qm and b/lang/qet_en.qm differ diff --git a/lang/qet_en.ts b/lang/qet_en.ts index af84d5e63..c6215143b 100644 --- a/lang/qet_en.ts +++ b/lang/qet_en.ts @@ -214,12 +214,12 @@ Diagram - + Avertissement Warning - + 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 échoue. This document seems to have been saved by a more recent version of QElectroTech. The opening of the document may fail totally or partially. @@ -227,112 +227,112 @@ DiagramView - + ? ? - + Auteur : Author : - + Date : Date : - + Enregistrer le schéma en cours ? Save the current diagram ? - + Enregistrer sous Save as - + Erreur Error - + Fichier : File : - + Folio : Folio : - + Impossible d'ecrire dans ce fichier Can't write to the file - + Schéma QElectroTech (*.qet) QElectroTech Diagram (*.qet) - + Titre : Title : - + Voulez-vous enregistrer le schéma Do you wish to save the diagram - + nouveau schéma new diagram - + Éditer les propriétés d'un conducteur Edit conductor properties - + Propriétés du schéma Diagram properties - + Dimensions du schéma Diagram size - + Colonnes : Columns : - + × Ã— - + px px - + Hauteur : Height : - + Informations du cartouche Inset properties - + Éditer les propriétés par défaut des conducteurs Edit conductors default properties @@ -382,77 +382,77 @@ Check your rights on the file line - + ellipse ellipse - + arc arc - + cercle circle - + borne terminal - + texte text - + champ de texte textfield - + polygone polygon - + Ce document XML n'est pas une definition d'élément. This XML document is not an element definition. - + Les dimensions ou le point de saisie ne sont pas valides. The size or the hotspot are not valid. - + Les orientations ne sont pas valides. Orientations are not valids. - + Éditer la taille et le point de saisie Edit size and hotspot - + Éditer les orientations Edit orientations - + L'orientation par défaut est l'orientation dans laquelle s'effectue la création de l'élément. Default orientation is the orientation which the drawing of the element takes place with. - + Éditer les noms Edit names - + Vous pouvez spécifier le nom de l'élément dans plusieurs langues. You may enter the element name in several languages. @@ -1153,22 +1153,22 @@ Please check rights of the directory Restore QElectroTech - + Éditeurs de schémas Diagram editors - + Éditeurs d'élément Element editors - + Usage : Usage: - + QElectroTech, une application de réalisation de schémas électriques. Options disponibles : @@ -1185,7 +1185,7 @@ Available options: - + [options] [fichier]... @@ -1194,7 +1194,7 @@ Available options: - + --common-elements-dir=DIR Definir le dossier de la collection d'elements --common-elements-dir=DIR Define the elements collection directory @@ -1204,397 +1204,397 @@ Available options: QETDiagramEditor - + Active la fenêtre Activates the window - + Active la fenêtre précédente Activates the previous window - + Active la fenêtre suivante Activates the next window - + Adapte la taille du schéma afin qu'il soit entièrement visible Changes the size of the plan so that it fits in the view - + Afficha&ge Displ&ay - + Affiche des informations sur la bibliothèque Qt Displays informations about Qt library - + Affiche des informations sur QElectroTech Displays informations about QElectroTech - + Affiche ou non le panel d'appareils Displays or not the elements panel - + Affiche QElectroTech en mode fenêtré Displays QElectroTech in windowed mode - + Affiche QElectroTech en mode plein écran Displays QELectroTech in full screen mode - + Afficher Display - + Agrandir le schéma Expand the diagram - + Agrandit le schéma Expand the diagram - + Agrandit le schéma en hauteur Expand the diagram's height - + &Aide &Help - + Ajouter une colonne Add a column - + Ajoute une colonne au schéma Add a column to the diagram - + Aligne les fenêtres réduites Arranges all iconized windows at the bottom of the workspace - + Annule l'action précédente Undoes the previous action - + À &propos de QElectroTech A&bout QElectroTech - + À propos de &Qt About &Qt - + Arranger les fenêtres réduites Arranges iconized windows - + &Cascade &Cascade - + Ce fichier n'est pas un document XML valide. This file is not a valid XML Document. - + Ce fichier n'existe pas. This file does not exist. - + C&oller &Paste - + &Configuration &Settings - + &Configurer QElectroTech &Configure QElectroTech - + Copie les éléments sélectionnés dans le presse-papier Copies selected elements - + Cop&ier &Copy - + Co&uper Cu&t - + Crée un nouveau schéma Opens a new diagram - + Ctrl+0 - + Ctrl+9 - + Ctrl+I - + Ctrl+Q - + Ctrl+R Ctrl+R - + Ctrl+Shift+A - + Ctrl+Shift+F Ctrl+Shift+F - + Ctrl+Shift+I - + Ctrl+Shift+X - + Désélectionne les éléments sélectionnés et sélectionne les éléments non sélectionnés Deselects selected elements and select non-selected elements - + Désélectionner tout Select none - + Désélectionne tous les éléments du schéma Deselect all elements on the plan - + Dispose les fenêtres en cascade Arranges windows in a cascade pattern - + Dispose les fenêtres en mosaïque Arranges windows in a tile pattern - + Édite les informations affichées par le cartouche Edit informations displayed by the inset - + &Édition &Edit - + Enlève les éléments sélectionnés du schéma Removes selected elements from the plan - + Enlever une colonne Remove a column - + Enlève une colonne au schéma Remove a column from the diagram - + Enregistre le schéma courant Saves the current plan - + Enregistre le schéma courant avec un autre nom de fichier Saves the current plan as another filename - + &Enregistrer &Save - + Enregistrer sous Save as - + Erreur Error - + Exporte le schéma courant dans un autre format Exports the curent plan to another format - + E&xporter &Export - + Fenêtre précédente Previous Window - + Fe&nêtres Wi&ndows - + Fenêtre suivante Next Window - + Ferme l'application QElectroTech Closes QElectroTech - + Ferme le schéma courant Closes the current plan - + &Fermer &Close - + &Fichier &File - + &Importer &Import - + Importe un schéma dans le schéma courant Imports a plan into the current plan - + Impossible de lire ce fichier. Could not read file. - + Imprime le schéma courant Prints the current plan - + Imprimer Print - + Inverser la sélection Invert selection - + Mode Selection Selection Mode - + Mode Visualisation View Mode - + &Mosaïque &Tile - + &Nouveau &New - + Outils Tools - + Ouvre un schéma existant Open an existing diagram - + &Ouvrir &Open - + Ouvrir un fichier Open a file @@ -1604,42 +1604,42 @@ Available options: Elements Panel - + Pas de zoom Reset zoom - + Passer en &mode plein écran F&ullScreen Mode - + Permet de régler différents paramètres de QElectroTech Allows to specify various parameters for QElectroTech - + Permet de sélectionner les éléments Allows to select elements - + Permet de visualiser le schéma sans pouvoir le modifier Allows to view the plan without modifying it - + Pivote les éléments sélectionnés Rotates selected elements - + Pivoter Rotate - + Place les éléments du presse-papier sur le schéma Pastes elements from the clipboard into the plan @@ -1649,523 +1649,543 @@ Available options: QElectroTech - + &Quitter &Quit - + Restaure l'action annulée Restores the undone action - + Restaure le zoom par défaut Restores default zoom level - + Rétrécir le schéma Shrink the diagram - + Rétrécit le schéma Shrinks the plan - + Rétrécit le schéma en hauteur Shrink the diagram's height - + Schémas QElectroTech (*.qet);;Fichiers XML (*.xml);;Tous les fichiers (*) QElectroTech Diagrams (*.qet);;XML Files (*.xml);;All files (*) - + Sélectionne tous les éléments du schéma Selects all elements on the plan - + Sortir du &mode plein écran Exit F&ullScreen Screen Mode - + Supprimer Delete - + Tout sélectionner Select All - + Transfère les éléments sélectionnés dans le presse-papier Puts selected elements into the clipboard - + Une erreur s'est produite lors de l'ouverture du fichier. An error occured while opening the file. - + Zoom adapté Fit in view - + Zoom arrière Zoom Out - + Zoom avant Zoom In - + Annuler Undo - + Refaire Redo - + Propriétés du conducteur Conductor properties - + Édite les propriétés du conducteur sélectionné Edit the selected conductor properties - + Réinitialiser les conducteurs Reset conductors - + Suppr Del - + Ctrl+J Ctrl+J - + Ctrl+K Ctrl+K - + Propriétés du schéma Diagram Properties - + Ctrl+L Ctrl+L - + Recalcule les chemins des conducteurs sans tenir compte des modifications Reset the conductors path ignoring the user changes - + Affiche ou non la barre d'outils principale Display or hide the main toolbar - + Affiche ou non la barre d'outils Affichage Display or hide the Display toolbar - + Affiche ou non la barre d'outils Schéma Display or hide the Diagram toolbar - + Affichage Display - + Schéma Diagram - + Conducteurs par défaut Default conductors - + Ctrl+D Ctrl+D - + Spécifie les propriétés par défaut des conducteurs Specify the conductors default properties - + Ajouter un champ de texte Add a textfield + + + Annulations + Undo + + + + Aucune modification + No modification + + + + Affiche ou non la liste des modifications + Display or hide the undo list + QETElementEditor - + QElectroTech - Éditeur d'élément QElectroTech - Element Editor - + &Nouveau &New - + &Ouvrir &Open - + &Enregistrer &Save - + Enregistrer sous Save as - + &Quitter &Quit - + Tout sélectionner Select All - + Désélectionner tout Select none - + Inverser la sélection Invert selection - + &Supprimer &Delete - + Éditer la taille et le point de saisie Edit size and hotspot - + Éditer les noms Edit names - + Éditer les orientations Edit orientations - + Déplacer un objet Move an object - + Ajouter une ligne Add a line - + Ajouter une ellipse Add an ellipse - + Ajouter un cercle Add a circle - + Ajouter un polygone Add a polygon - + Ajouter du texte Add text - + Ajouter un arc de cercle Add an arc - + Ajouter une borne Add a terminal - + Ajouter un champ de texte Add a textfield - + Annuler Undo - + Refaire Redo - + Ctrl+Q Ctrl+Q - + Ctrl+Shift+A Ctrl+Shift+A - + Ctrl+I Ctrl+I - + Parties Parts - + Fichier File - + Édition Edit - + Affichage Display - + Outils Tools - + Aide Help - + [Modifié] [Changed] - + [lecture seule] [Read only] - + Informations Informations - + Annulations Undo - + Éditeur d'éléments Elements Editor - + parties sélectionnées. selected parts. - + Aucune partie sélectionnée. No part selected. - + Le fichier The file - + n'existe pas. does not exist. - + Impossible d'ouvrir le fichier Unable to open file - + Ce fichier n'est pas un document XML valide This file is not a valid XML document - + Erreur Error - + Édition en lecture seule Read only edition - + Vous n'avez pas les privilèges nécessaires pour modifier cet élement. Il sera donc ouvert en lecture seule. You are not allowed to modify this element. Thus it will be edited read-only. - + Impossible d'ecrire dans ce fichier Can't write to the file - + Ouvrir un fichier Open a file - + Éléments QElectroTech (*.elmt);;Fichiers XML (*.xml);;Tous les fichiers (*) QElectroTech elements (*.elmt);;XML files (*.xml);;All files (*) - + Éléments QElectroTech (*.elmt) QElectroTech elements (*.elmt) - + Enregistrer l'élément en cours ? Save current element ? - + Voulez-vous enregistrer l'élément Do you wish to save the element - + ? ? - + Afficher Display - + Suppr Del - + Ctrl+E Ctrl+E - + Ctrl+R Ctrl+R - + Ctrl+T Ctrl+T - + Rapprocher Raise - + Éloigner Lower - + Envoyer au fond Send backward - + Amener au premier plan Bring forward - + Ctrl+Shift+Up Ctrl+Shift+Up - + Ctrl+Shift+Down Ctrl+Shift+Down - + Ctrl+Shift+End Ctrl+Shift+End - + Ctrl+Shift+Home Ctrl+Shift+Home + + + Aucune modification + No modification + QObject @@ -2195,32 +2215,32 @@ Available options: modification polygon points - + arc arc - + cercle circle - + ellipse ellipse - + ligne line - + polygone polygon - + borne terminal @@ -2230,7 +2250,7 @@ Available options: T - + texte text @@ -2240,7 +2260,7 @@ Available options: _ - + champ de texte textfield @@ -2255,47 +2275,47 @@ Available options: add a conductor - + supprimer delete - + coller paste - + couper cut - + déplacer move - + modifier le texte modify text - + pivoter rotate - + modifier un conducteur modify a conductor - + modifier le cartouche modify the inset - + modifier les dimensions du schéma modify the diagram size @@ -2315,27 +2335,27 @@ Available options: modify orientations - + éléments elements - + élément element - + et and - + conducteurs conductors - + conducteur conductor @@ -2345,7 +2365,7 @@ Available options: Terminal - + modifier les propriétés d'un conducteur modify conductor properties @@ -2360,7 +2380,7 @@ Available options: was saved with a more recent version of QElectroTech. - + Réinitialiser Reset @@ -2390,22 +2410,22 @@ Available options: Add a textfield - + , , - + champs de texte textfields - + Le fichier texte contenant la licence GNU/GPL est introuvable - bon bah de toute façon, vous la connaissez par coeur non ? The text file containing the GNU/GPL license could not be found - however, you know it by heart, don't you ? - + 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 ? The text file containing the GNU/GPL license exists but could not be opened - however, you know it by heart, don't you ? diff --git a/qetdiagrameditor.cpp b/qetdiagrameditor.cpp index d4c98c296..b608d326a 100644 --- a/qetdiagrameditor.cpp +++ b/qetdiagrameditor.cpp @@ -56,7 +56,19 @@ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) : qdw_pa -> setFeatures(QDockWidget::AllDockWidgetFeatures); qdw_pa -> setMinimumWidth(160); qdw_pa -> setWidget(pa = new ElementsPanelWidget(qdw_pa)); - addDockWidget(Qt::LeftDockWidgetArea, qdw_pa); + + qdw_undo = new QDockWidget(tr("Annulations")); + qdw_undo -> setObjectName("diagram_undo"); + qdw_undo -> setAllowedAreas(Qt::AllDockWidgetAreas); + qdw_undo -> setFeatures(QDockWidget::AllDockWidgetFeatures); + qdw_undo -> setMinimumWidth(160); + tabifyDockWidget(qdw_pa, qdw_undo); + QUndoView *undo_view = new QUndoView(&undo_group, this); + undo_view -> setEmptyLabel(tr("Aucune modification")); + qdw_undo -> setWidget(undo_view); + + addDockWidget(Qt::LeftDockWidgetArea, qdw_undo); + tabifyDockWidget(qdw_undo, qdw_pa); // mise en place des actions actions(); @@ -395,17 +407,15 @@ void QETDiagramEditor::menus() { menu_edition -> addAction(shrink_diagram); // menu Configurer > Afficher - QMenu *menu_aff_aff = new QMenu(tr("Afficher"), this); - menu_aff_aff -> setIcon(QIcon(":/ico/toolbars.png")); - menu_aff_aff -> setTearOffEnabled(true); - menu_aff_aff -> addAction(main_bar -> toggleViewAction()); - main_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils principale")); - menu_aff_aff -> addAction(view_bar -> toggleViewAction()); - view_bar -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la barre d'outils Affichage")); - menu_aff_aff -> addAction(diagram_bar -> toggleViewAction()); + QMenu *display_toolbars = createPopupMenu(); + display_toolbars -> setTearOffEnabled(true); + display_toolbars -> setTitle(tr("Afficher")); + display_toolbars -> setIcon(QIcon(":/ico/toolbars.png")); + 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")); - menu_aff_aff -> addAction(qdw_pa -> toggleViewAction()); - qdw_pa -> toggleViewAction() -> setStatusTip(tr("Affiche ou non le panel d'appareils")); + qdw_pa -> toggleViewAction() -> setStatusTip(tr("Affiche ou non le panel d'appareils")); + qdw_undo -> toggleViewAction() -> setStatusTip(tr("Affiche ou non la liste des modifications")); // menu Affichage menu_affichage -> addAction(mode_selection); @@ -417,7 +427,7 @@ void QETDiagramEditor::menus() { menu_affichage -> addAction(zoom_reset); // menu Configuration - menu_config -> addMenu(menu_aff_aff); + menu_config -> addMenu(display_toolbars); menu_config -> addAction(fullscreen_on); //menu_config -> addAction(configure); diff --git a/qetdiagrameditor.h b/qetdiagrameditor.h index d93957fc0..e868e9c3c 100644 --- a/qetdiagrameditor.h +++ b/qetdiagrameditor.h @@ -129,6 +129,8 @@ class QETDiagramEditor : public QMainWindow { QDir open_dialog_dir; /// Dock pour le Panel d'Appareils QDockWidget *qdw_pa; + /// Dock pour la liste des annulations + QDockWidget *qdw_undo; /// Panel d'Appareils ElementsPanelWidget *pa; QMenu *windows_menu;