mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 11:24:19 +00:00
bimtester: merge guibimtester into bimtester module
This commit is contained in:
committed by
Dion Moult
parent
15199152ac
commit
5ce334019c
@@ -5,6 +5,11 @@
|
||||
+ ifcopenshell
|
||||
|
||||
|
||||
### Start bimtester Gui from a shell
|
||||
```
|
||||
python3 ./bimtester.py -g
|
||||
```
|
||||
|
||||
### Create a binary out of the Python package
|
||||
+ The commands needs to be updated
|
||||
+ Unix:
|
||||
|
||||
@@ -7,6 +7,24 @@ from bimtester import reports
|
||||
from bimtester import run
|
||||
|
||||
|
||||
def show_widget():
|
||||
|
||||
import sys
|
||||
from PySide2 import QtWidgets
|
||||
|
||||
from bimtester.guiwidget import GuiWidgetBimTester
|
||||
|
||||
# Create the Qt Application
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
# Create and show the form
|
||||
form = GuiWidgetBimTester()
|
||||
form.show()
|
||||
|
||||
# Run the main Qt loop
|
||||
sys.exit(app.exec_())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
@@ -44,12 +62,20 @@ if __name__ == "__main__":
|
||||
help="Specify your own arguments to Python's Behave",
|
||||
default=""
|
||||
)
|
||||
parser.add_argument(
|
||||
"-g",
|
||||
"--gui",
|
||||
action="store_true",
|
||||
help="Start with gui",
|
||||
)
|
||||
args = vars(parser.parse_args())
|
||||
|
||||
if args["purge"]:
|
||||
clean.TestPurger().purge()
|
||||
elif args["report"]:
|
||||
reports.generate_report()
|
||||
elif args["gui"]:
|
||||
show_widget()
|
||||
else:
|
||||
run.run_tests(args)
|
||||
print("# All tasks are complete :-)")
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# TODO merge into bimtester module
|
||||
|
||||
import sys
|
||||
from PySide2 import QtWidgets
|
||||
|
||||
from bimtester.guiwidget import GuiWidgetBimTester
|
||||
|
||||
|
||||
def show_widget():
|
||||
|
||||
# Create the Qt Application
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
|
||||
# Create and show the form
|
||||
form = GuiWidgetBimTester()
|
||||
form.show()
|
||||
|
||||
# Run the main Qt loop
|
||||
sys.exit(app.exec_())
|
||||
|
||||
if __name__ == '__main__':
|
||||
show_widget()
|
||||
Reference in New Issue
Block a user