Conductor properties dialog: dialog is now build in is own class.

The conductor himself call the dialog when he have mouse double click.
The dialog isn't managed by the diagram view anymore. 


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3295 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-09-02 18:41:25 +00:00
parent 209a6277b8
commit 818a7601d9
9 changed files with 270 additions and 111 deletions

View File

@@ -26,6 +26,7 @@
#include "qetdiagrameditor.h"
#include "terminal.h"
#include "conductorautonumerotation.h"
#include "conductorpropertiesdialog.h"
#define PR(x) qDebug() << #x " = " << x;
bool Conductor::pen_and_brush_initialized = false;
@@ -556,6 +557,16 @@ bool Conductor::valideXml(QDomElement &e){
return(true);
}
/**
* @brief Conductor::mouseDoubleClickEvent
* Action at double click on this item
* @param e
*/
void Conductor::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) {
e->accept();
editProperty();
}
/**
Gere les clics sur le conducteur.
@param e L'evenement decrivant le clic.
@@ -1406,6 +1417,13 @@ QETDiagramEditor* Conductor::diagramEditor() const {
return(qobject_cast<QETDiagramEditor *>(w));
}
/**
* @brief Conductor::editProperty
*/
void Conductor::editProperty() {
ConductorPropertiesDialog::PropertiesDialog(this, diagramEditor());
}
/**
@param a reel
@param b reel