1. latex checkin, ein paar sachen

git-svn-id: http://svn.lsim.tuxzone.org/trunk@35 4bec179b-ab65-46ed-a5f8-55b8b5c735d0
This commit is contained in:
catdog2
2008-12-28 22:36:23 +00:00
parent 1219d2b9f0
commit 69fb43bb4f
11 changed files with 1251 additions and 174 deletions

View File

@@ -394,15 +394,7 @@ void SimulScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) {
//das neue item auswaehlen
clearSelection();
currHomoEfieldInsertItem->setSelected(true);
//die resize items aus und einblenden bei rotation
connect( currHomoEfieldInsertItem, SIGNAL(rotationChanged()), this, SLOT(displayResizeRects()));
//bei groesenanderung und verschieben resizerects mitverschieben
connect( currHomoEfieldInsertItem, SIGNAL(heightChanged(double)), this, SLOT(moveResizeRects()));
connect( currHomoEfieldInsertItem, SIGNAL(widthChanged(double)), this, SLOT(moveResizeRects()));
connect( currHomoEfieldInsertItem, SIGNAL(ScenePosChanged(QPointF)), this, SLOT(moveResizeRects()));
//item ueber sceneChange informieren
connect(this,SIGNAL(changed(QList<QRectF>)),currHomoEfieldInsertItem,SLOT(handleSceneChange(QList<QRectF>)));
connectNewFieldItem(currHomoEfieldInsertItem);
}
update(); //moegliche darstellungsprobleme beseitigen
@@ -431,15 +423,7 @@ void SimulScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) {
//das neue item auswaehlen
clearSelection();
currHomoBfieldInsertItem->setSelected(true);
//die resize items aus und einblenden bei rotation
connect( currHomoBfieldInsertItem, SIGNAL(rotationChanged()), this, SLOT(displayResizeRects()));
//bei groesenanderung und verschieben resizerects mitverschieben
connect( currHomoBfieldInsertItem, SIGNAL(heightChanged(double)), this, SLOT(moveResizeRects()));
connect( currHomoBfieldInsertItem, SIGNAL(widthChanged(double)), this, SLOT(moveResizeRects()));
connect( currHomoBfieldInsertItem, SIGNAL(ScenePosChanged(QPointF)), this, SLOT(moveResizeRects()));
//item ueber sceneChange informieren
connect(this,SIGNAL(changed(QList<QRectF>)),currHomoBfieldInsertItem,SLOT(handleSceneChange(QList<QRectF>)));
connectNewFieldItem(currHomoBfieldInsertItem);
}
update(); //moegliche darstellungsprobleme beseitigen
QApplication::restoreOverrideCursor();
@@ -466,15 +450,7 @@ void SimulScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) {
//das neue item auswaehlen
clearSelection();
currStopperInsertItem->setSelected(true);
//die resize items aus und einblenden bei rotation
connect( currStopperInsertItem, SIGNAL(rotationChanged()), this, SLOT(displayResizeRects()));
//bei groesenanderung und verschieben resizerects mitverschieben
connect( currStopperInsertItem, SIGNAL(heightChanged(double)), this, SLOT(moveResizeRects()));
connect( currStopperInsertItem, SIGNAL(widthChanged(double)), this, SLOT(moveResizeRects()));
connect( currStopperInsertItem, SIGNAL(ScenePosChanged(QPointF)), this, SLOT(moveResizeRects()));
//item ueber sceneChange informieren
connect(this,SIGNAL(changed(QList<QRectF>)),currStopperInsertItem,SLOT(handleSceneChange(QList<QRectF>)));
connectNewFieldItem(currStopperInsertItem);
}
update(); //moegliche darstellungsprobleme beseitigen
QApplication::restoreOverrideCursor();
@@ -506,6 +482,17 @@ void SimulScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent) {
QGraphicsScene::mouseReleaseEvent(mouseEvent);
}
void SimulScene::connectNewFieldItem(FieldItem* item) {
//die resize items aus und einblenden bei rotation
connect( item, SIGNAL(rotationChanged()), this, SLOT(displayResizeRects()));
//bei groesenanderung und verschieben resizerects mitverschieben
connect( item, SIGNAL(heightChanged(double)), this, SLOT(moveResizeRects()));
connect( item, SIGNAL(widthChanged(double)), this, SLOT(moveResizeRects()));
connect( item, SIGNAL(ScenePosChanged(QPointF)), this, SLOT(moveResizeRects()));
//item ueber sceneChange informieren
connect(this,SIGNAL(changed(QList<QRectF>)),item,SLOT(handleSceneChange(QList<QRectF>)));
}
void SimulScene::keyPressEvent (QKeyEvent *keyevent) {
if(keyevent->matches(QKeySequence::Delete)) {
deleteSelectedFieldItems();
@@ -1154,4 +1141,4 @@ void SimulScene::resetScene() {
setupVars();
ellipse1->resetProbe();
}
}