mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 08:40:53 +01:00
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:
@@ -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();
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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
1
qet.h
@@ -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);
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ void QETDiagramEditor::actions() {
|
|||||||
select_invert = new QAction( tr("Inverser la s\351lection"), this);
|
select_invert = new QAction( tr("Inverser la s\351lection"), this);
|
||||||
delete_selection = new QAction(QIcon(":/ico/delete.png"), tr("Supprimer"), this);
|
delete_selection = new QAction(QIcon(":/ico/delete.png"), tr("Supprimer"), this);
|
||||||
rotate_selection = new QAction(QIcon(":/ico/pivoter.png"), tr("Pivoter"), 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);
|
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);
|
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);
|
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")));
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user