Ajout du numero de version de QET (pour l'instant, celui de la prochaine release = 0.1) dans :

*le menu "A propos de QET"
*les fichiers *.elmt decrivant les elements
*les fichiers *.qet decrivant les schemas
...et ce afin de gerer les inevitables changements que subiront les formats de fichier a l'avenir.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@157 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavierqet
2007-10-04 17:32:41 +00:00
parent 6fe35cfde8
commit 0dfed41a75
5 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
#include "aboutqet.h"
#include "qet.h"
/**
Constructeur
@@ -45,7 +46,7 @@ QWidget *AboutQET::titre() const {
QLabel *icone = new QLabel();
icone -> setPixmap(QIcon(":/ico/qelectrotech.png").pixmap(48, 48));
// label "QElectroTech"
QLabel *titre = new QLabel("<span style=\"font-weight:0;font-size:16pt;\">QElectroTech</span>");
QLabel *titre = new QLabel("<span style=\"font-weight:0;font-size:16pt;\">QElectroTech v" + QET::version + "</span>");
titre -> setTextFormat(Qt::RichText);
// le tout dans une grille
QGridLayout *dispo_horiz = new QGridLayout();

View File

@@ -219,6 +219,7 @@ QDomDocument Diagram::toXml(bool diagram) {
racine.setAttribute("cols", border_and_inset.nbColumn());
racine.setAttribute("colsize", border_and_inset.columnsWidth());
racine.setAttribute("height", border_and_inset.columnsHeight());
racine.setAttribute("version", QET::version);
}
document.appendChild(racine);

View File

@@ -290,6 +290,7 @@ const QDomDocument ElementScene::toXml() const {
root.setAttribute("hotspot_x", QString("%1").arg(_hotspot.x()));
root.setAttribute("hotspot_y", QString("%1").arg(_hotspot.y()));
root.setAttribute("orientation", ori.toString());
root.setAttribute("version", QET::version);
// noms de l'element
root.appendChild(_names.toXml(xml_document));

1
qet.h
View File

@@ -7,6 +7,7 @@
classes de l'application
*/
namespace QET {
const QString version = "0.1";
enum Orientation {North, East, South, West};
enum ConductorSegmentType { Horizontal = 1, Vertical = 2, Both = 3 };
QET::Orientation nextOrientation(QET::Orientation);

View File

@@ -161,7 +161,7 @@ void QETDiagramEditor::actions() {
select_invert = new QAction( tr("Inverser la s\351lection"), this);
delete_selection = new QAction(QIcon(":/ico/delete.png"), tr("Supprimer"), this);
rotate_selection = new QAction(QIcon(":/ico/pivoter.png"), tr("Pivoter"), this);
conductor_prop = new QAction(QIcon(":/ico/conductor.png"), tr("Propri\351t\351s du conducteur"), this);
conductor_prop = new QAction(QIcon(":/ico/conductor.png"), tr("Propri\351t\351s du conducteur"), this);
infos_diagram = new QAction(QIcon(":/ico/info.png"), tr("Informations sur le sch\351ma"), this);
add_column = new QAction(QIcon(":/ico/add_col.png"), tr("Ajouter une colonne"), this);
remove_column = new QAction(QIcon(":/ico/remove_col.png"), tr("Enlever une colonne"), this);
@@ -209,6 +209,7 @@ void QETDiagramEditor::actions() {
select_invert -> setShortcut(QKeySequence(tr("Ctrl+I")));
delete_selection -> setShortcut(QKeySequence(tr("Suppr")));
rotate_selection -> setShortcut(QKeySequence(tr("Ctrl+R")));
conductor_prop -> setShortcut(QKeySequence(tr("Ctrl+J")));
zoom_in -> setShortcut(QKeySequence::ZoomIn);
zoom_out -> setShortcut(QKeySequence::ZoomOut);