Welcome to mirror list, hosted at ThFree Co, Russian Federation.

__init__.py « Interface « API « cura - github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 61510d62624c15ffb72b1449cccb2a3cf90bdd76 (plain)
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
# Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.

from typing import TYPE_CHECKING

from cura.API.Interface.Settings import Settings

if TYPE_CHECKING:
    from cura.CuraApplication import CuraApplication


class Interface:
    """The Interface class serves as a common root for the specific API

    methods for each interface element.

    Usage:

    .. code-block:: python

       from cura.API import CuraAPI
       api = CuraAPI()
       api.interface.settings.addContextMenuItem()
       api.interface.viewport.addOverlay()    # Not implemented, just a hypothetical
       api.interface.toolbar.getToolButtonCount()   #  Not implemented, just a hypothetical
       # etc
    """

    def __init__(self, application: "CuraApplication") -> None:
        # API methods specific to the settings portion of the UI
        self.settings = Settings(application)