5 #[Topic] 'Translation' functionality
6 #[Tested functionality]
11 source(findFile("scripts", "common.py"))
13 #[section] Application start
15 startApplication("salome_run.sh")
19 #[step] Open 'for_sketch_016.hdf'
20 open(DATA_PATH + "/for_sketch_016.hdf")
22 #[step] Activate NewGeom
23 clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
25 #[step] Edit 'Sketch_1'
26 waitForObjectItem(":Object browser_XGUI_DataTree", "Sketch\\_1")
27 clickItem(":Object browser_XGUI_DataTree", "Sketch\\_1", 43, 12, 0, Qt.LeftButton)
28 openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Sketch\\_1", 43, 12, 0)
29 activateItem(waitForObjectItem(":_QMenu", "Edit..."))
31 #[step] Click '+OZ' button
32 clickButton(waitForObject(":SALOME*.+OZ_QToolButton"))
34 #[step] Sketch - Translation
35 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Sketch"))
36 activateItem(waitForObjectItem(":Sketch_QMenu", "Translation"))
37 mouseClick(waitForObject(":Translation.Segments:_QListWidget"), 115, 35, 0, Qt.LeftButton)
39 #[step] Select all objects for translation
40 type(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), "<Shift>")
41 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 90, 130, 33554432, Qt.LeftButton)
42 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 440, 132, 33554432, Qt.LeftButton)
43 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 573, 199, 33554432, Qt.LeftButton)
45 #[step] Click in viewer to define start point
46 mouseClick(waitForObject(":Start point.qt_spinbox_lineedit_QLineEdit"), 53, 7, 0, Qt.LeftButton)
47 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 112, 453, 0, Qt.LeftButton)
49 #[step] Click in viewer to define end point, for this zoom out preview
50 mouseClick(waitForObject(":End point.qt_spinbox_lineedit_QLineEdit"), 154, 9, 0, Qt.LeftButton)
51 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 451, 434, -120, 0, 2)
52 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 451, 434, -120, 0, 2)
53 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 451, 434, -120, 0, 2)
54 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 451, 434, -120, 0, 2)
55 sendEvent("QWheelEvent", waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 451, 434, -120, 0, 2)
56 mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 426, 256, 0, Qt.LeftButton)
58 #[step] Define the number of copies
59 mouseClick(waitForObject(":Translation.qt_spinbox_lineedit_QLineEdit"), 41, 9, 0, Qt.LeftButton)
60 type(waitForObject(":Translation.MultiTranslationCopies_QSpinBox"), "<Ctrl+A>")
61 type(waitForObject(":Translation.MultiTranslationCopies_QSpinBox"), 3)
67 #[check] that preview is updated
71 clickButton(waitForObject(":Translation.property_panel_ok_QToolButton"))
73 #[check] Check that translation has been executed successfully
76 # [step] Close application without saving