-
-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy path__init__.py
More file actions
35 lines (29 loc) · 1.07 KB
/
Copy path__init__.py
File metadata and controls
35 lines (29 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""
Sample Tool - To be used as starting point or example for when creating new tools.
github.com/TrevisanGMW/gt-tools - 2023-07-17
"""
from gt.tools.sample_tool import sample_controller
from gt.tools.sample_tool import sample_model
from gt.tools.sample_tool import sample_view
from gt.ui import qt_utils
import logging
# Logging Setup
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
# Tool Version
__version_tuple__ = (1, 0, 0)
__version_suffix__ = ''
__version__ = '.'.join(str(n) for n in __version_tuple__) + __version_suffix__
def launch_tool():
"""
Launch user interface and create any necessary connections for the tool to function.
Entry point for when using this tool.
Creates Model, View and Controller
"""
with qt_utils.QtApplicationContext() as context:
_view = sample_view.SampleToolWindow(parent=context.get_parent())
_model = sample_model.SampleToolModel()
_controller = sample_controller.SampleToolController(model=_model, view=_view)
if __name__ == "__main__":
launch_tool()