diff --git a/sources/diagramview.cpp b/sources/diagramview.cpp index ffe249110..73dcb018a 100644 --- a/sources/diagramview.cpp +++ b/sources/diagramview.cpp @@ -1153,7 +1153,7 @@ void DiagramView::editSelection() QGraphicsItem *item = m_diagram->selectedItems().first(); //We use dynamic_cast instead of qgraphicsitem_cast for QetGraphicsItem - //because they haven't got they own type(). + //because they haven't got their own type(). //Use qgraphicsitem_cast will have weird behavior for this class. if (IndependentTextItem *iti = qgraphicsitem_cast(item)) iti -> edit(); diff --git a/sources/qet.cpp b/sources/qet.cpp index 3537e24ba..8852dc218 100644 --- a/sources/qet.cpp +++ b/sources/qet.cpp @@ -32,6 +32,10 @@ en orientation. Si la chaine fait plusieurs caracteres, seul le premier est pris en compte. En cas d'incoherence, Qet::North est retourne. + Used to convert a string of characters (‘n’, ‘s’, ‘e’ or ‘w’) + into orientation. If the string is made up of several characters, + only the only the first is taken into account. In the event of an + inconsistency, Qet::North is returned. @param s Chaine de caractere cense representer une orientation @return l'orientation designee par la chaine de caractere */ @@ -60,6 +64,7 @@ QString Qet::orientationToString(Qet::Orientation o) { /** Indique si deux orientations de Borne sont sur le meme axe (Vertical / Horizontal). + Indicates whether two terminal orientations are on the same axis (Vertical / Horizontal). @param a La premiere orientation de Borne @param b La seconde orientation de Borne @return Un booleen a true si les deux orientations de bornes sont sur le meme axe diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index e50b158e4..b0da9e157 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -1597,7 +1597,7 @@ void QETDiagramEditor::slot_updateUndoStack() /** @brief QETDiagramEditor::slot_updateComplexActions - Manage the actions who need some conditions to be enable or not. + Manage the actions that need some conditions to be enabled or not. This method does nothing if there is no project opened */ void QETDiagramEditor::slot_updateComplexActions() @@ -1633,7 +1633,7 @@ void QETDiagramEditor::slot_updateComplexActions() int selected_elements_count = dc.count(DiagramContent::Elements); m_find_element->setEnabled(selected_elements_count == 1); - //Action that need items (elements, conductors, texts...) selected, to be enabled + //Actions that need items (elements, conductors, texts...) selected, to be enabled bool copiable_items = dc.hasCopiableItems(); bool deletable_items = dc.hasDeletableItems(); m_cut -> setEnabled(!ro && copiable_items); diff --git a/sources/qetgraphicsitem/conductor.cpp b/sources/qetgraphicsitem/conductor.cpp index 2a50b82f0..ecca2c370 100644 --- a/sources/qetgraphicsitem/conductor.cpp +++ b/sources/qetgraphicsitem/conductor.cpp @@ -384,9 +384,11 @@ void Conductor::generateConductorPath(const QPointF &p1, Qet::Orientation o1, co points << depart0; // prolongement de la borne de depart + // extend start terminal points << depart; // commence le vrai trajet + // starts the real path if (depart.y() < arrivee.y()) { // trajet descendant if ((ori_depart == Qet::North && (ori_arrivee == Qet::South || ori_arrivee == Qet::West)) || (ori_depart == Qet::East && ori_arrivee == Qet::West)) { diff --git a/sources/qetgraphicsitem/terminal.cpp b/sources/qetgraphicsitem/terminal.cpp index 0a3cd2107..09558ee8b 100644 --- a/sources/qetgraphicsitem/terminal.cpp +++ b/sources/qetgraphicsitem/terminal.cpp @@ -37,6 +37,7 @@ const qreal Terminal::Z = 1000; /** @brief Terminal::init Methode privee pour initialiser la borne. + Private method to initialize the terminal. @param number of terminal @param name of terminal @param hiddenName @@ -92,17 +93,25 @@ Terminal::~Terminal() { est bien un Element, cette fonction renvoie l'orientation par rapport a la scene de la borne, en tenant compte du fait que l'element ait pu etre pivote. Sinon elle renvoie son sens normal. + Used to find out the orientation of the terminal. If the terminal's parent + is in fact an Element, this function returns the orientation of the + terminal with respect to the scene, taking into account the angle of + rotation. scene, taking into account the fact that the element may have + been rotated. Otherwise it returns its normal direction. @return L'orientation actuelle de la Terminal. */ Qet::Orientation Terminal::orientation() const { if (Element *elt = qgraphicsitem_cast(parentItem())) { // orientations actuelle et par defaut de l'element + // current and default element orientations int ori_cur = elt -> orientation(); if (ori_cur == 0) return(d->m_orientation); else { // calcul l'angle de rotation implique par l'orientation de l'element parent // angle de rotation de la borne sur la scene, divise par 90 + // calculates the angle of rotation implied by the orientation of the parent + // element angle of rotation of the terminal on the scene, divided by 90 int angle = ori_cur + d->m_orientation; while (angle >= 4) angle -= 4; return((Qet::Orientation)angle);