1 | # -*- coding: utf-8 -*- |
---|
2 | |
---|
3 | def main(): |
---|
4 | startApplication("sasview") |
---|
5 | clickButton(waitForObject(":groupBox.cmdLoad_QPushButton")) |
---|
6 | waitForObjectItem(":stackedWidget.listView_QListView", "test") |
---|
7 | doubleClickItem(":stackedWidget.listView_QListView", "test", 30, 10, 0, Qt.LeftButton) |
---|
8 | waitForObjectItem(":stackedWidget.listView_QListView", "1d\\_data") |
---|
9 | doubleClickItem(":stackedWidget.listView_QListView", "1d\\_data", 34, 11, 0, Qt.LeftButton) |
---|
10 | waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt") |
---|
11 | clickItem(":stackedWidget.listView_QListView", "cyl\\_400\\_20\\.txt", 69, 10, 0, Qt.LeftButton) |
---|
12 | clickButton(waitForObject(":buttonBox.Open_QPushButton")) |
---|
13 | clickButton(waitForObject(":groupBox.cmdLoad_QPushButton")) |
---|
14 | waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_400\\_40\\.txt") |
---|
15 | clickItem(":stackedWidget.listView_QListView", "cyl\\_400\\_40\\.txt", 99, 9, 0, Qt.LeftButton) |
---|
16 | waitForObjectItem(":stackedWidget.listView_QListView", "cyl\\_testdata\\.txt") |
---|
17 | clickItem(":stackedWidget.listView_QListView", "cyl\\_testdata\\.txt", 74, 11, 67108864, Qt.LeftButton) |
---|
18 | clickButton(waitForObject(":buttonBox.Open_QPushButton")) |
---|
19 | snooze(1) |
---|
20 | test.compare(waitForObjectExists(":treeView.cyl_400_20.txt_QModelIndex").checkState, "checked") |
---|
21 | test.compare(waitForObjectExists(":treeView.cyl_400_20.txt_QModelIndex").text, "cyl_400_20.txt") |
---|
22 | test.compare(waitForObjectExists(":treeView.cyl_400_40.txt_QModelIndex").checkState, "checked") |
---|
23 | test.compare(waitForObjectExists(":treeView.cyl_400_40.txt_QModelIndex").text, "cyl_400_40.txt") |
---|
24 | test.compare(waitForObjectExists(":treeView.cyl_testdata.txt_QModelIndex").text, "cyl_testdata.txt") |
---|
25 | test.compare(waitForObjectExists(":treeView.cyl_testdata.txt_QModelIndex").checkState, "checked") |
---|
26 | mouseClick(waitForObject(":groupBox.cbSelect_QComboBox"), 87, 9, 0, Qt.LeftButton) |
---|
27 | mouseClick(waitForObjectItem(":groupBox.cbSelect_QComboBox", "Unselect all"), 64, 7, 0, Qt.LeftButton) |
---|
28 | test.compare(waitForObjectExists(":treeView.cyl_400_20.txt_QModelIndex").selected, False) |
---|
29 | test.compare(waitForObjectExists(":treeView.cyl_400_40.txt_QModelIndex").selected, False) |
---|
30 | test.compare(waitForObjectExists(":treeView.cyl_testdata.txt_QModelIndex").selected, False) |
---|
31 | mouseClick(waitForObjectItem(":groupBox.cbSelect_QComboBox", "Select all 1D"), 54, 10, 0, Qt.LeftButton) |
---|
32 | test.compare(waitForObjectExists(":treeView.cyl_400_20.txt_QModelIndex").checkState, "checked") |
---|
33 | test.compare(waitForObjectExists(":treeView.cyl_400_40.txt_QModelIndex").checkState, "checked") |
---|
34 | test.compare(waitForObjectExists(":treeView.cyl_testdata.txt_QModelIndex").checkState, "checked") |
---|
35 | mouseClick(waitForObjectItem(":groupBox.cbSelect_QComboBox", "Unselect all 2D"), 68, 2, 0, Qt.LeftButton) |
---|
36 | test.compare(waitForObjectExists(":treeView.cyl_400_20.txt_QModelIndex").checkState, "checked") |
---|