mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Minor code change
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3916 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -173,6 +173,17 @@ void ElementScene::keyPressEvent(QKeyEvent *event) {
|
||||
QGraphicsScene::keyPressEvent(event);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementScene::contextMenuEvent
|
||||
* Display the context menu event, only if behavior are Normal
|
||||
* @param event
|
||||
*/
|
||||
void ElementScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
|
||||
{
|
||||
if (behavior == ElementScene::Normal)
|
||||
element_editor -> contextMenu(event->screenPos());
|
||||
}
|
||||
|
||||
/**
|
||||
Dessine l'arriere-plan de l'editeur, cad l'indicateur de hotspot.
|
||||
@param p Le QPainter a utiliser pour dessiner
|
||||
@@ -211,6 +222,16 @@ void ElementScene::setEventInterface(ESEventInterface *event_interface) {
|
||||
m_event_interface = event_interface;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ElementScene::setBehavior
|
||||
* Modifie the current behavior of this scene
|
||||
* @param b
|
||||
*/
|
||||
void ElementScene::setBehavior(ElementScene::Behavior b)
|
||||
{
|
||||
behavior = b;
|
||||
}
|
||||
|
||||
/**
|
||||
@return la taille horizontale de la grille
|
||||
*/
|
||||
@@ -460,11 +481,6 @@ void ElementScene::copy() {
|
||||
last_copied_ = clipboard_content;
|
||||
}
|
||||
|
||||
void ElementScene::contextMenu(QContextMenuEvent *event) {
|
||||
if (behavior == ElementScene::Normal)
|
||||
element_editor -> contextMenu(event);
|
||||
}
|
||||
|
||||
QETElementEditor* ElementScene::editor() const {
|
||||
return element_editor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user