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 "aboutqet.h"
#include "qet.h"
/** /**
Constructeur Constructeur
@@ -45,7 +46,7 @@ QWidget *AboutQET::titre() const {
QLabel *icone = new QLabel(); QLabel *icone = new QLabel();
icone -> setPixmap(QIcon(":/ico/qelectrotech.png").pixmap(48, 48)); icone -> setPixmap(QIcon(":/ico/qelectrotech.png").pixmap(48, 48));
// label "QElectroTech" // 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); titre -> setTextFormat(Qt::RichText);
// le tout dans une grille // le tout dans une grille
QGridLayout *dispo_horiz = new QGridLayout(); 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("cols", border_and_inset.nbColumn());
racine.setAttribute("colsize", border_and_inset.columnsWidth()); racine.setAttribute("colsize", border_and_inset.columnsWidth());
racine.setAttribute("height", border_and_inset.columnsHeight()); racine.setAttribute("height", border_and_inset.columnsHeight());
racine.setAttribute("version", QET::version);
} }
document.appendChild(racine); 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_x", QString("%1").arg(_hotspot.x()));
root.setAttribute("hotspot_y", QString("%1").arg(_hotspot.y())); root.setAttribute("hotspot_y", QString("%1").arg(_hotspot.y()));
root.setAttribute("orientation", ori.toString()); root.setAttribute("orientation", ori.toString());
root.setAttribute("version", QET::version);
// noms de l'element // noms de l'element
root.appendChild(_names.toXml(xml_document)); root.appendChild(_names.toXml(xml_document));

1
qet.h
View File

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

View File

@@ -209,6 +209,7 @@ void QETDiagramEditor::actions() {
select_invert -> setShortcut(QKeySequence(tr("Ctrl+I"))); select_invert -> setShortcut(QKeySequence(tr("Ctrl+I")));
delete_selection -> setShortcut(QKeySequence(tr("Suppr"))); delete_selection -> setShortcut(QKeySequence(tr("Suppr")));
rotate_selection -> setShortcut(QKeySequence(tr("Ctrl+R"))); rotate_selection -> setShortcut(QKeySequence(tr("Ctrl+R")));
conductor_prop -> setShortcut(QKeySequence(tr("Ctrl+J")));
zoom_in -> setShortcut(QKeySequence::ZoomIn); zoom_in -> setShortcut(QKeySequence::ZoomIn);
zoom_out -> setShortcut(QKeySequence::ZoomOut); zoom_out -> setShortcut(QKeySequence::ZoomOut);