Compare commits

..

11 Commits

Author SHA1 Message Date
scorpio810
e74101a9cd Reverting deletion of branch 0.2, 0.3
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/tags/0.2rc2@5946 bfdf4180-ca20-0410-9c96-a3a8aa849046
2019-06-26 08:02:48 +00:00
xavier
8334491f0c Tag de la version 0.2 RC2
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/tags/0.2rc2@707 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-20 14:34:54 +00:00
xavier
ac105be89a Modification de la version affichee et du splash screen pour le passage en 0.2 RC2.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@706 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-20 14:22:17 +00:00
xavier
40ec0cf39e Correction : bug graphique lors de l'utilisation d'embouts sur les lignes horizontales ou verticales.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@705 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-20 01:09:10 +00:00
xavier
fb447a7752 Mise a jour des traductions.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@704 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-19 19:40:03 +00:00
xavier
a8295b71be Uniformisation des menus entre l'editeur de schemas et l'editeur d'element.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@703 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-19 19:31:48 +00:00
xavier
1897ecfce7 Amelioration mineure pour le script de lancement Unix.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@702 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-18 21:58:30 +00:00
xavier
da410cb37a L'action "Pivoter" est desormais desactivee si aucun element selectionne n'est pivotable.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@701 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-16 22:37:15 +00:00
lituriy
e25ac381aa * Fix: Term in russian translation qet_ru.{ts|qm};
* Update: qt_ru.{qm|ts} from http://gitorious.org/+qt-l10n-ru/qt-l10n-ru (it's me);
* Update: russian translation of Elements.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@700 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-16 09:35:03 +00:00
xavier
ca9557c6bc Mise a jour du fichier spec.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@699 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-13 21:37:30 +00:00
jcm
d72d224b9c Updated Pt Translation
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@698 bfdf4180-ca20-0410-9c96-a3a8aa849046
2009-06-13 16:57:18 +00:00
30 changed files with 9396 additions and 7553 deletions

View File

@@ -1,5 +1,6 @@
<definition width="50" version="0.1" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<definition width="50" version="0.2" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<names>
<name lang="ru" >Вход (задний фронт)</name>
<name lang="en" >Input (down front)</name>
<name lang="fr" >Entrée (front descendant)</name>
<name lang="es" >Entrada (front descendant)</name>
@@ -7,10 +8,10 @@
<description>
<text x="-4.25" y="5.25" size="9" text="N" />
<input x="-18" y="-10" size="9" rotate="true" text="_" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="10" y2="-5" x2="10" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-5" x1="-10" y2="5" x2="-10" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="10" y2="-5" x2="10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-5" x1="-10" y2="5" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<terminal x="24" y="0" orientation="e" />
<terminal x="-24" y="0" orientation="w" />
</description>

View File

@@ -1,15 +1,16 @@
<definition width="50" version="0.1" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<definition width="50" version="0.2" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<names>
<name lang="ru" >Вход (передний фронт)</name>
<name lang="en" >Input (up front)</name>
<name lang="fr" >Entrée (front montant)</name>
</names>
<description>
<text x="-3.5" y="5.25" size="9" text="P" />
<input x="-18" y="-10" size="9" rotate="true" text="_" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="10" y2="-5" x2="10" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-5" x1="-10" y2="5" x2="-10" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="10" y2="-5" x2="10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-5" x1="-10" y2="5" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<terminal x="24" y="0" orientation="e" />
<terminal x="-24" y="0" orientation="w" />
</description>

View File

@@ -1,15 +1,16 @@
<definition width="50" version="0.1" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<definition width="50" version="0.2" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<names>
<name lang="ru" >Вход (отрицательная логика)</name>
<name lang="en" >Input (negative logic)</name>
<name lang="fr" >Entrée (NF)</name>
</names>
<description>
<line antialias="true" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="-7" y2="-5" x2="7" />
<line length1="1.5" length2="1.5" antialias="true" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="-7" y2="-5" x2="7" />
<input x="-18" y="-10" size="9" rotate="true" text="_" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="10" y2="-5" x2="10" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-5" x1="-10" y2="5" x2="-10" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="5" x1="10" y2="-5" x2="10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="-5" x1="-10" y2="5" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<terminal x="24" y="0" orientation="e" />
<terminal x="-24" y="0" orientation="w" />
</description>

View File

@@ -1,5 +1,6 @@
<definition width="50" version="0.1" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<definition width="50" version="0.2" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<names>
<name lang="ru" >Выход (сброс)</name>
<name lang="en" >Output (reset)</name>
<name lang="fr" >Sortie (reset)</name>
<name lang="es" >Salida (reset)</name>
@@ -9,8 +10,8 @@
<arc width="4" x="6" y="-5" antialias="true" height="10" style="line-style:normal;line-weight:normal;filling:none;color:black" start="80" angle="-160" />
<input x="-18" y="-10" size="9" rotate="true" text="_" />
<arc width="4" x="-10" y="-5" antialias="true" height="10" style="line-style:normal;line-weight:normal;filling:none;color:black" start="-100" angle="-160" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<terminal x="-24" y="0" orientation="w" />
</description>
</definition>

View File

@@ -1,5 +1,6 @@
<definition width="50" version="0.1" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<definition width="50" version="0.2" hotspot_x="25" hotspot_y="30" height="40" type="element" orientation="dnnn" >
<names>
<name lang="ru" >Выход (установка)</name>
<name lang="en" >Output (set)</name>
<name lang="fr" >Sortie (set)</name>
<name lang="es" >Salida (set)</name>
@@ -9,8 +10,8 @@
<input x="-18" y="-10" size="9" rotate="true" text="_" />
<arc width="4" x="-10" y="-5" antialias="true" height="10" style="line-style:normal;line-weight:normal;filling:none;color:black" start="-100" angle="-160" />
<text x="-4.25" y="5.25" size="9" text="S" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line antialias="false" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="10" y2="0" x2="24" />
<line length1="1.5" length2="1.5" antialias="false" end1="none" end2="none" style="line-style:normal;line-weight:normal;filling:none;color:black" y1="0" x1="-24" y2="0" x2="-10" />
<terminal x="-24" y="0" orientation="w" />
</description>
</definition>

View File

@@ -1,6 +1,6 @@
<qet-directory>
<names>
<name lang="ru" >Измерительные приборы</name>
<name lang="ru" >Измеррительные приборы</name>
<name lang="en" >Measuring instruments</name>
<name lang="fr" >Appareils de mesure</name>
<name lang="es" >Instrumento de medición</name>

View File

@@ -1,6 +1,6 @@
<qet-directory>
<names>
<name lang="ru" >Приёмники энергии</name>
<name lang="ru" >Приёмники</name>
<name lang="en" >Receivers</name>
<name lang="fr" >Récepteurs</name>
<name lang="es" >Receptores</name>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,8 @@
#!/bin/bash
current_dir=$(dirname "$0")
cd "$current_dir"
# configuration
QET_EXE="../qelectrotech"
QET_ELEMENTS_DIR="../elements/"
@@ -34,3 +37,5 @@ fi
# launching
${QET_EXE} ${OPTIONS} $*
cd - > /dev/null 2>&1

View File

@@ -5,27 +5,29 @@ Summary(fr): Réaliser des schémas électriques
# Upstream version is a float so 0.11 < 0.2 < 0.21 < 0.3
# So use %.2f with upstream acknowledgment
Version: 0.20
Release: 0.2.beta%{?dist}
Release: 0.3.rc1%{?dist}
Group: Applications/Productivity
License: GPLv2
Url: http://qelectrotech.tuxfamily.org/
# Prog is GPLv2 - Element are Creative Commons Attribution
License: GPLv2+
Url: http://qelectrotech.org/
# svn export -r 374 svn://svn.tuxfamily.org/svnroot/qet/qet/trunk qelectrotech-svn374
# tar cvjf /home/rpmbuild/SOURCES/qelectrotech-svn374.tar.bz2 --exclude .svn qelectrotech-svn374
#Source0: qelectrotech-svn374.tar.bz2
#Source0: http://download.tuxfamily.org/qet/tags/20080831/qelectrotech-0.11-src.tar.gz
Source0: http://download.tuxfamily.org/qet/tags/20090523/qelectrotech-0.2b-src.tar.gz
Source0: http://download.tuxfamily.org/qet/tags/20090613/qelectrotech-0.2rc1-src.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
Requires(post): desktop-file-utils
Requires(postun): desktop-file-utils
%if 0%{?fedora} > 8
%if 0%{?fedora} >= 9
BuildRequires: qt-devel >= 4.4.1
%else
BuildRequires: qt4-devel >= 4.4.1
%endif
Requires: qelectrotech-elements = %{version}-%{release}
%description
QElectroTech is a Qt4 application to design electric diagrams. It uses XML
@@ -38,10 +40,27 @@ QET utilise le format XML pour ses éléments et ses schémas et inclut un
éditeur de schémas ainsi qu'un éditeur d'élément.
%package elements
Summary: Elements collection for QElectroTech
Summary(fr): Collection d'élements pour QElectroTech
Group: Applications/Productivity
License: CC-BY
%if 0%{?fedora} >= 11
BuildArch: noarch
%endif
%description elements
Elements collection for QElectroTech.
%description -l fr elements
Collection d'élements pour QElectroTech.
%prep
#%setup -q -n %{name}-%{version}
#%setup -q -n %{name}-svn374
%setup -q -n %{name}-0.2b-src
%setup -q -n %{name}-0.2rc1-src
sed -e s,/usr/local/,%{_prefix}/, \
-e /QET_MAN_PATH/s,'man/','share/man', \
@@ -56,7 +75,7 @@ make %{?_smp_mflags}
%install
rm -fr $RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT qet.lang
INSTALL_ROOT=$RPM_BUILD_ROOT make install
rm -rf $RPM_BUILD_ROOT/usr/doc/qelectrotech \
@@ -65,6 +84,13 @@ rm -rf $RPM_BUILD_ROOT/usr/doc/qelectrotech \
mv $RPM_BUILD_ROOT%{_mandir}/fr.UTF-8 $RPM_BUILD_ROOT%{_mandir}/fr
desktop-file-install --vendor="" \
--dir=%{buildroot}%{_datadir}/applications/ \
%{buildroot}%{_datadir}/applications/%{name}.desktop
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/lang/qt_*.qm
%find_lang qet --with-qt
%clean
rm -fr $RPM_BUILD_ROOT
@@ -77,6 +103,7 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun
update-desktop-database &> /dev/null || :
touch --no-create %{_datadir}/icons/hicolor
@@ -85,21 +112,34 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then
fi
%files
%defattr(-,root,root)
%doc CREDIT LICENSE README examples ELEMENTS.LICENSE
%files -f qet.lang
%defattr(-,root,root,-)
%doc CREDIT LICENSE README examples
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/mime/application/x-qet-*.xml
%{_datadir}/mime/packages/%{name}.xml
%{_datadir}/mimelnk/application/x-qet-*.desktop
%{_datadir}/icons/hicolor/*/*/*.png
%{_datadir}/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/lang
%exclude %{_datadir}/%{name}/examples
%{_mandir}/man1/%{name}.*
%lang(fr) %{_mandir}/fr/man1/%{name}.*
%files elements
%defattr(-,root,root,-)
%doc ELEMENTS.LICENSE
%{_datadir}/%{name}/elements
%changelog
* Sat Jun 13 2009 Remi Collet <RPMS@FamilleCollet.com> - 0.20-0.3.rc1
- update to 0.2rc1
- split elements in sub-package
- fix license, URL, lang
* Sun May 24 2009 Remi Collet <RPMS@FamilleCollet.com> - 0.20-0.2.beta
- update to 0.2b

View File

@@ -1024,3 +1024,20 @@ DiagramContent Diagram::selectedContent() {
invalidateMovedElements();
return(dc);
}
/**
@return true s'il est possible de tourner les elements selectionnes.
Concretement, cette methode retourne true s'il y a des elements selectionnes
et qu'au moins l'un d'entre eux peut etre pivote.
*/
bool Diagram::canRotateSelection() const {
foreach(QGraphicsItem * qgi, selectedItems()) {
if (Element *e = qgraphicsitem_cast<Element *>(qgi)) {
// l'element est-il pivotable ?
if (e -> orientation().current() != e -> orientation().next()) {
return(true);
}
}
}
return(false);
}

View File

@@ -155,6 +155,7 @@ class Diagram : public QGraphicsScene {
QSet<Conductor *> selectedConductors() const;
DiagramContent content() const;
DiagramContent selectedContent();
bool canRotateSelection() const;
void moveElements(const QPointF &, QGraphicsItem * = 0);
bool usesElement(const ElementsLocation &);

View File

@@ -450,17 +450,20 @@ void PartLine::debugPaint(QPainter *painter) {
QRectF PartLine::boundingRect() const {
QRectF r(QGraphicsLineItem::boundingRect());
// cas special : le cercle sort largement du bounding rect originel
if (first_end == QET::Circle) {
// le rectangle ainsi obtenu ne doit pas avoir une dimension nulle
r.adjust(0.0, 0.0, 0.1, 0.1);
// cas special : les embouts sortent largement du bounding rect originel
if (first_end != QET::None) {
r = r.united(firstEndCircleRect());
}
if (second_end == QET::Circle) {
if (second_end != QET::None) {
r = r.united(secondEndCircleRect());
}
// la taille du bounding rect est ajustee de 0.2px
qreal adjust = 0.6;
// la taille du bounding rect est ajustee avec une certaine marge
qreal adjust = 1.2;
r.adjust(-adjust, -adjust, adjust, adjust);
return(r);
}

View File

@@ -107,6 +107,11 @@ void QETElementEditor::setupActions() {
add_arc = new QAction(QET::Icons::PartArc, tr("Ajouter un arc de cercle"), this);
add_terminal = new QAction(QET::Icons::Terminal, tr("Ajouter une borne"), this);
add_textfield = new QAction(QET::Icons::PartTextField, tr("Ajouter un champ de texte"), this);
fullscreen = new QAction(this);
slot_updateFullScreenAction();
configure = new QAction(QET::Icons::Configure, tr("&Configurer QElectroTech"), this);
about_qet = new QAction(QET::Icons::QETLogo, tr("\300 &propos de QElectroTech"), this);
about_qt = new QAction(QET::Icons::QtLogo, tr("\300 propos de &Qt"), this);
QString add_status_tip = tr("Maintenez la touche Shift enfonc\351e pour effectuer plusieurs ajouts d'affil\351e");
add_line -> setStatusTip(add_status_tip);
@@ -117,7 +122,10 @@ void QETElementEditor::setupActions() {
add_arc -> setStatusTip(add_status_tip);
add_terminal -> setStatusTip(add_status_tip);
add_textfield -> setStatusTip(add_status_tip);
add_polygon -> setStatusTip(tr("Utilisez le bouton droit de la souris pour poser le dernier point du polygone"));
add_polygon -> setStatusTip(tr("Utilisez le bouton droit de la souris pour poser le dernier point du polygone"));
configure -> setStatusTip(tr("Permet de r\351gler diff\351rents param\350tres de QElectroTech", "status bar tip"));
about_qet -> setStatusTip(tr("Affiche des informations sur QElectroTech", "status bar tip"));
about_qt -> setStatusTip(tr("Affiche des informations sur la biblioth\350que Qt", "status bar tip"));
undo = ce_scene -> undoStack().createUndoAction(this, tr("Annuler"));
redo = ce_scene -> undoStack().createRedoAction(this, tr("Refaire"));
@@ -147,6 +155,8 @@ void QETElementEditor::setupActions() {
zoom_fit -> setShortcut(QKeySequence(tr("Ctrl+9")));
zoom_reset -> setShortcut(QKeySequence(tr("Ctrl+0")));
fullscreen -> setShortcut(QKeySequence(tr("Ctrl+Shift+F")));
edit_names -> setShortcut(QKeySequence(tr("Ctrl+E")));
edit_size_hs -> setShortcut(QKeySequence(tr("Ctrl+R")));
edit_ori -> setShortcut(QKeySequence(tr("Ctrl+T")));
@@ -156,6 +166,8 @@ void QETElementEditor::setupActions() {
edit_backward -> setShortcut(QKeySequence(tr("Ctrl+Shift+End")));
edit_forward -> setShortcut(QKeySequence(tr("Ctrl+Shift+Home")));
QETApp *qet_app = QETApp::instance();
connect(new_element, SIGNAL(triggered()), this, SLOT(slot_new()));
connect(open, SIGNAL(triggered()), this, SLOT(slot_open()));
connect(open_file, SIGNAL(triggered()), this, SLOT(slot_openFile()));
@@ -178,6 +190,8 @@ void QETElementEditor::setupActions() {
connect(edit_delete, SIGNAL(triggered()), ce_scene, SLOT(slot_delete()));
connect(edit_size_hs, SIGNAL(triggered()), ce_scene, SLOT(slot_editSizeHotSpot()));
connect(edit_names, SIGNAL(triggered()), ce_scene, SLOT(slot_editNames()));
connect(fullscreen, SIGNAL(triggered()), this, SLOT(toggleFullScreen()));
connect(configure, SIGNAL(triggered()), qet_app, SLOT(configureQET()));
connect(edit_ori, SIGNAL(triggered()), ce_scene, SLOT(slot_editOrientations()));
connect(edit_forward, SIGNAL(triggered()), ce_scene, SLOT(slot_bringForward()));
connect(edit_raise, SIGNAL(triggered()), ce_scene, SLOT(slot_raise()));
@@ -205,6 +219,9 @@ void QETElementEditor::setupActions() {
connect(add_terminal, SIGNAL(triggered()), this, SLOT(slot_setNoDragToView()));
connect(add_textfield, SIGNAL(triggered()), this, SLOT(slot_setNoDragToView()));
connect(about_qet, SIGNAL(triggered()), qet_app, SLOT(aboutQET()));
connect(about_qt, SIGNAL(triggered()), qet_app, SLOT(aboutQt()));
connect(ce_scene, SIGNAL(needNormalMode()), this, SLOT(slot_setNormalMode()));
move -> setCheckable(true);
@@ -292,16 +309,18 @@ void QETElementEditor::setupActions() {
Met en place les menus.
*/
void QETElementEditor::setupMenus() {
file_menu = new QMenu(tr("Fichier"), this);
edit_menu = new QMenu(tr("\311dition"), this);
display_menu = new QMenu(tr("Affichage"), this);
tools_menu = new QMenu(tr("Outils"), this);
help_menu = new QMenu(tr("Aide"), this);
file_menu = new QMenu(tr("Fichier"), this);
edit_menu = new QMenu(tr("\311dition"), this);
display_menu = new QMenu(tr("Affichage"), this);
tools_menu = new QMenu(tr("Outils"), this);
config_menu = new QMenu(tr("&Configuration"), this);
help_menu = new QMenu(tr("Aide"), this);
file_menu -> setTearOffEnabled(true);
edit_menu -> setTearOffEnabled(true);
display_menu -> setTearOffEnabled(true);
tools_menu -> setTearOffEnabled(true);
config_menu -> setTearOffEnabled(true);
help_menu -> setTearOffEnabled(true);
file_menu -> addAction(new_element);
@@ -340,20 +359,29 @@ void QETElementEditor::setupMenus() {
edit_menu -> addAction(edit_lower);
edit_menu -> addAction(edit_backward);
// menu Affichage > Afficher
display_menu -> addAction(zoom_in);
display_menu -> addAction(zoom_out);
display_menu -> addAction(zoom_fit);
display_menu -> addAction(zoom_reset);
// menu Configurer > Afficher
QMenu *display_toolbars = createPopupMenu();
display_toolbars -> setTearOffEnabled(true);
display_toolbars -> setTitle(tr("Afficher"));
display_menu -> addMenu(display_toolbars);
config_menu -> addMenu(display_toolbars);
config_menu -> addAction(fullscreen);
config_menu -> addAction(configure);
help_menu -> addAction(about_qet);
help_menu -> addAction(about_qt);
menuBar() -> addMenu(file_menu);
menuBar() -> addMenu(edit_menu);
menuBar() -> addMenu(display_menu);
/*
menuBar() -> addMenu(tools_menu);
//menuBar() -> addMenu(tools_menu);
menuBar() -> addMenu(config_menu);
menuBar() -> addMenu(help_menu);
*/
}
/**
@@ -374,6 +402,23 @@ void QETElementEditor::slot_updateMenus() {
edit_lower -> setEnabled(selected_items);
edit_backward -> setEnabled(selected_items);
save -> setEnabled(!ce_scene -> undoStack().isClean());
slot_updateFullScreenAction();
}
/**
Gere l'action permettant de passer en plein ecran ou d'en sortir
*/
void QETElementEditor::slot_updateFullScreenAction() {
if (windowState() & Qt::WindowFullScreen) {
fullscreen -> setText(tr("Sortir du &mode plein \351cran"));
fullscreen -> setIcon(QET::Icons::FullScreenExit);
fullscreen -> setStatusTip(tr("Affiche QElectroTech en mode fen\352tr\351", "status bar tip"));
} else {
fullscreen -> setText(tr("Passer en &mode plein \351cran"));
fullscreen -> setIcon(QET::Icons::FullScreenEnter);
fullscreen -> setStatusTip(tr("Affiche QElectroTech en mode plein \351cran", "status bar tip"));
}
}
/**
@@ -970,6 +1015,19 @@ void QETElementEditor::closeEvent(QCloseEvent *qce) {
} else qce -> ignore();
}
/**
Gere les evenements du l'editeur d'element
Reimplemente ici pour :
* mettre a jour l'action permettant d'entrer en mode plein ecran ou d'en sortir
@param e Evenement
*/
bool QETElementEditor::event(QEvent *e) {
if (e -> type() == QEvent::WindowStateChange) {
slot_updateFullScreenAction();
}
return(QMainWindow::event(e));
}
/**
Remplit la liste des parties
*/
@@ -1032,6 +1090,13 @@ void QETElementEditor::slot_updateSelectionFromPartsList() {
slot_updateMenus();
}
/**
Fait passer la fenetre du mode plein ecran au mode normal et vice-versa
*/
void QETElementEditor::toggleFullScreen() {
setWindowState(windowState() ^ Qt::WindowFullScreen);
}
/// Lit les parametres de l'editeur d'element
void QETElementEditor::readSettings() {
QSettings &settings = QETApp::settings();

View File

@@ -43,7 +43,7 @@ class QETElementEditor : public QMainWindow {
/// booleen indiquant si l'editeur est en mode "lecture seule" ou non
bool read_only;
/// menus
QMenu *file_menu, *edit_menu, *display_menu, *tools_menu, *help_menu;
QMenu *file_menu, *edit_menu, *display_menu, *tools_menu, *config_menu, *help_menu;
/// vue sur la scene d'edition
ElementView *ce_view;
/// scene d'edition
@@ -68,9 +68,16 @@ class QETElementEditor : public QMainWindow {
QAction *selectall, *deselectall, *inv_select;
QAction *cut, *copy, *paste, *paste_in_area;
QAction *undo, *redo;
QAction *zoom_in, *zoom_out, *zoom_fit, *zoom_reset;
QAction *edit_delete, *edit_size_hs, *edit_names, *edit_ori;
QAction *edit_raise, *edit_lower, *edit_backward, *edit_forward;
/// actions du menu affichage
QAction *zoom_in, *zoom_out, *zoom_fit, *zoom_reset;
/// actions du menu configurer
QAction *fullscreen; ///< Passe en mode plein ecran ou en sort
QAction *configure; ///< Lance le dialogue de configuration de QElectroTech
/// actions du menu aide
QAction *about_qet; ///< Lance le dialogue "A propos de QElectroTech"
QAction *about_qt; ///< Lance le dialogue "A propos de Qt"
/// barres d'outils
QToolBar *parts_toolbar, *main_toolbar, *view_toolbar, *depth_toolbar, *element_toolbar;
/// actions de la barre d'outils
@@ -113,6 +120,7 @@ class QETElementEditor : public QMainWindow {
protected:
void closeEvent(QCloseEvent *);
virtual bool event(QEvent *);
private:
void setupActions();
@@ -136,10 +144,12 @@ class QETElementEditor : public QMainWindow {
void slot_setNormalMode();
void slot_updateInformations();
void slot_updateMenus();
void slot_updateFullScreenAction();
void slot_updateTitle();
void slot_createPartsList();
void slot_updatePartsList();
void slot_updateSelectionFromPartsList();
void toggleFullScreen();
void xmlPreview();
bool checkElement();
};

View File

@@ -27,7 +27,7 @@ namespace QET {
/// version de QElectroTech (utilisee pour estampiller les projets et elements)
const QString version = "0.2";
/// version affichee de QElectroTech
const QString displayedVersion = "0.2rc1";
const QString displayedVersion = "0.2rc2";
QString license();
/// Orientation (utilise pour les bornes mais aussi pour les elements)
enum Orientation {North, East, South, West};

View File

@@ -16,6 +16,8 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "qetapp.h"
#include "aboutqet.h"
#include "configdialog.h"
#include "qetdiagrameditor.h"
#include "qetelementeditor.h"
#include "elementscollectionitem.h"
@@ -37,6 +39,7 @@ QMap<uint, QETProject *> QETApp::registered_projects_ = QMap<uint, QETProject *>
uint QETApp::next_project_id = 0;
RecentFiles *QETApp::projects_recent_files_ = 0;
RecentFiles *QETApp::elements_recent_files_ = 0;
AboutQET *QETApp::about_dialog_ = 0;
/**
Constructeur
@@ -99,6 +102,9 @@ QETApp::~QETApp() {
projects_recent_files_ -> save();
delete elements_recent_files_;
delete projects_recent_files_;
if (about_dialog_) {
delete about_dialog_;
}
delete qsti;
delete custom_collection;
delete common_collection;
@@ -727,6 +733,61 @@ void QETApp::openElementFiles(const QStringList &files_list) {
}
}
/**
Permet a l'utilisateur de configurer QET en lancant un dialogue approprie.
@see ConfigDialog
*/
void QETApp::configureQET() {
// determine le widget parent a utiliser pour le dialogue
#ifdef Q_WS_MAC
QWidget *parent_widget = 0;
#else
QWidget *parent_widget = activeWindow();
#endif
// cree le dialogue
ConfigDialog cd;
// associe le dialogue a un eventuel widget parent
if (parent_widget) {
cd.setParent(parent_widget, cd.windowFlags());
}
// affiche le dialogue puis evite de le lier a un quelconque widget parent
cd.exec();
cd.setParent(0, cd.windowFlags());
}
/**
Dialogue "A propos de QElectroTech"
Le dialogue en question est cree lors du premier appel de cette fonction.
En consequence, sa premiere apparition n'est pas immediate. Par la suite,
le dialogue n'a pas a etre recree et il apparait instantanement. Il est
detruit en meme temps que l'application.
*/
void QETApp::aboutQET() {
// determine le widget parent a utiliser pour le dialogue
#ifdef Q_WS_MAC
QWidget *parent_widget = 0;
#else
QWidget *parent_widget = activeWindow();
#endif
// cree le dialogue si cela n'a pas deja ete fait
if (!about_dialog_) {
about_dialog_ = new AboutQET();
}
// associe le dialogue a un eventuel widget parent
if (parent_widget) {
about_dialog_ -> setParent(parent_widget, about_dialog_ -> windowFlags());
}
// affiche le dialogue puis evite de le lier a un quelconque widget parent
about_dialog_ -> exec();
about_dialog_ -> setParent(0, about_dialog_ -> windowFlags());
}
/**
@param window fenetre dont il faut trouver les barres d'outils et dock flottants
@return les barres d'outils et dock flottants de la fenetre

View File

@@ -22,6 +22,7 @@
#include <QtGui>
#include "elementslocation.h"
#include "qetarguments.h"
class AboutQET;
class QETDiagramEditor;
class QETElementEditor;
class ElementsCollection;
@@ -136,6 +137,7 @@ class QETApp : public QETSingleApplication {
static uint next_project_id;
static RecentFiles *projects_recent_files_;
static RecentFiles *elements_recent_files_;
static AboutQET *about_dialog_;
public slots:
void systray(QSystemTrayIcon::ActivationReason);
@@ -157,6 +159,8 @@ class QETApp : public QETSingleApplication {
void openFiles(const QETArguments &);
void openProjectFiles(const QStringList &);
void openElementFiles(const QStringList &);
void configureQET();
void aboutQET();
// methodes privees
private slots:

View File

@@ -20,9 +20,7 @@
#include "diagramview.h"
#include "diagram.h"
#include "elementspanelwidget.h"
#include "aboutqet.h"
#include "conductorpropertieswidget.h"
#include "configdialog.h"
#include "qetproject.h"
#include "projectview.h"
#include "recentfiles.h"
@@ -168,18 +166,6 @@ void QETDiagramEditor::toggleFullScreen() {
setWindowState(windowState() ^ Qt::WindowFullScreen);
}
/**
Dialogue "A propos de QElectroTech"
Le dialogue en question est cree lors du premier appel de cette fonction.
En consequence, sa premiere apparition n'est pas immediate. Par la suite,
le dialogue n'a pas a etre recree et il apparait instantanement. Il est
detruit en meme temps que son parent (ici, le QETDiagramEditor).
*/
void QETDiagramEditor::aboutQET() {
static AboutQET *apqet = new AboutQET(this);
apqet -> exec();
}
/**
Mise en place des actions
*/
@@ -353,6 +339,8 @@ void QETDiagramEditor::actions() {
grp_view_mode -> addAction(tabbed_view_mode);
grp_view_mode -> setExclusive(true);
QETApp *qet_app = QETApp::instance();
// connexion a des slots
connect(quit_editor, SIGNAL(triggered()), this, SLOT(close()) );
connect(select_all, SIGNAL(triggered()), this, SLOT(slot_selectAll()) );
@@ -361,13 +349,13 @@ void QETDiagramEditor::actions() {
connect(delete_selection, SIGNAL(triggered()), this, SLOT(slot_delete()) );
connect(rotate_selection, SIGNAL(triggered()), this, SLOT(slot_rotate()) );
connect(fullscreen, SIGNAL(triggered()), this, SLOT(toggleFullScreen()) );
connect(configure, SIGNAL(triggered()), this, SLOT(configureQET()) );
connect(configure, SIGNAL(triggered()), qet_app, SLOT(configureQET()) );
connect(windowed_view_mode, SIGNAL(triggered()), this, SLOT(setWindowedMode()) );
connect(tabbed_view_mode, SIGNAL(triggered()), this, SLOT(setTabbedMode()) );
connect(mode_selection, SIGNAL(triggered()), this, SLOT(slot_setSelectionMode()) );
connect(mode_visualise, SIGNAL(triggered()), this, SLOT(slot_setVisualisationMode()) );
connect(about_qet, SIGNAL(triggered()), this, SLOT(aboutQET()) );
connect(about_qt, SIGNAL(triggered()), qApp, SLOT(aboutQt()) );
connect(about_qet, SIGNAL(triggered()), qet_app, SLOT(aboutQET()) );
connect(about_qt, SIGNAL(triggered()), qet_app, SLOT(aboutQt()) );
connect(prj_edit_prop, SIGNAL(triggered()), this, SLOT(editCurrentProjectProperties()));
connect(prj_add_diagram, SIGNAL(triggered()), this, SLOT(addDiagramToProject()) );
connect(prj_del_diagram, SIGNAL(triggered()), this, SLOT(removeDiagramFromProject()) );
@@ -1147,7 +1135,7 @@ void QETDiagramEditor::slot_updateComplexActions() {
cut -> setEnabled(editable_diagram && selected_elements);
copy -> setEnabled(selected_elements);
delete_selection -> setEnabled(editable_diagram && selected_elements);
rotate_selection -> setEnabled(editable_diagram && selected_elements);
rotate_selection -> setEnabled(editable_diagram && selected_elements && dv -> diagram() -> canRotateSelection());
selection_prop -> setEnabled(editable_diagram && selected_elements);
}
@@ -1712,15 +1700,6 @@ void QETDiagramEditor::findElementInPanel(const ElementsLocation &location) {
}
}
/**
Permet a l'utilisateur de configurer QET en lancant un dialogue approprie.
@see ConfigDialog
*/
void QETDiagramEditor::configureQET() {
ConfigDialog cd(this);
cd.exec();
}
/**
@return Les proprietes par defaut pour le cartouche d'un schema
*/

View File

@@ -78,8 +78,6 @@ class QETDiagramEditor : public QMainWindow {
public slots:
void toggleFullScreen();
void configureQET();
void aboutQET();
void printDialog();
void exportDialog();
bool saveAsDialog();