mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Amelioration du comportement du HotspotEditor lorsqu'on le redimensionne
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@366 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -538,7 +538,6 @@ void ElementScene::slot_editSizeHotSpot() {
|
|||||||
// cree un dialogue
|
// cree un dialogue
|
||||||
QDialog dialog_sh;
|
QDialog dialog_sh;
|
||||||
dialog_sh.setModal(true);
|
dialog_sh.setModal(true);
|
||||||
dialog_sh.setMinimumSize(400, 230);
|
|
||||||
dialog_sh.setWindowTitle(tr("\311diter la taille et le point de saisie"));
|
dialog_sh.setWindowTitle(tr("\311diter la taille et le point de saisie"));
|
||||||
QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog_sh);
|
QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog_sh);
|
||||||
|
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ HotspotEditor::HotspotEditor(QWidget *parent) :
|
|||||||
diagram_scene -> border_and_inset.displayInset(false);
|
diagram_scene -> border_and_inset.displayInset(false);
|
||||||
|
|
||||||
diagram_view = new QGraphicsView(diagram_scene);
|
diagram_view = new QGraphicsView(diagram_scene);
|
||||||
diagram_view -> setMaximumSize(
|
diagram_view -> setMinimumSize(
|
||||||
static_cast<int>((5 * diagram_scene -> border_and_inset.columnsWidth()) + (3 * Diagram::margin)),
|
qRound(diagram_scene -> border_and_inset.diagramWidth() + (3 * Diagram::margin)),
|
||||||
300
|
qRound(diagram_scene -> border_and_inset.diagramHeight() + (3 * Diagram::margin))
|
||||||
);
|
);
|
||||||
diagram_view -> setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
diagram_view -> setTransformationAnchor(QGraphicsView::AnchorUnderMouse);
|
||||||
diagram_view -> setResizeAnchor(QGraphicsView::AnchorUnderMouse);
|
diagram_view -> setResizeAnchor(QGraphicsView::AnchorUnderMouse);
|
||||||
@@ -82,15 +82,16 @@ HotspotEditor::HotspotEditor(QWidget *parent) :
|
|||||||
grid_layout -> addWidget(sb_hotspot_x, 4, 1);
|
grid_layout -> addWidget(sb_hotspot_x, 4, 1);
|
||||||
grid_layout -> addWidget(new QLabel(tr("Ordonn\351e :")), 5, 0);
|
grid_layout -> addWidget(new QLabel(tr("Ordonn\351e :")), 5, 0);
|
||||||
grid_layout -> addWidget(sb_hotspot_y, 5, 1);
|
grid_layout -> addWidget(sb_hotspot_y, 5, 1);
|
||||||
|
grid_layout -> setRowStretch(6, 500);
|
||||||
grid_layout -> setSpacing(3);
|
grid_layout -> setSpacing(3);
|
||||||
|
|
||||||
QHBoxLayout *hlayout = new QHBoxLayout();
|
QHBoxLayout *hlayout = new QHBoxLayout();
|
||||||
hlayout -> addLayout(grid_layout);
|
hlayout -> addLayout(grid_layout, 1);
|
||||||
hlayout -> addWidget(diagram_view);
|
hlayout -> addWidget(diagram_view, 500);
|
||||||
|
|
||||||
vlayout = new QVBoxLayout(this);
|
vlayout = new QVBoxLayout(this);
|
||||||
vlayout -> setSpacing(0);
|
vlayout -> setSpacing(0);
|
||||||
vlayout -> addLayout(hlayout);
|
vlayout -> addLayout(hlayout, 1);
|
||||||
|
|
||||||
updateScene();
|
updateScene();
|
||||||
updateHotspotLimits();
|
updateHotspotLimits();
|
||||||
|
|||||||
Reference in New Issue
Block a user