File: plugin.xml

package info (click to toggle)
sight 25.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 43,108 kB
  • sloc: cpp: 306,170; xml: 18,037; ansic: 9,960; python: 1,379; sh: 144; makefile: 33
file content (136 lines) | stat: -rw-r--r-- 6,456 bytes parent folder | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<plugin id="tuto03_data_service">
    <requirement id="sight::module::service" />
    <requirement id="sight::module::ui::qt" />

    <extension implements="sight::app::extension::config">
        <id>Tuto03DataService_AppCfg</id>
        <config>
            <!-- ******************************* Objects declaration ****************************** -->

            <!-- The root data object in tutoDataService is a sight::data::image. -->
            <object uid="image" type="sight::data::image" />

            <!-- ******************************* UI declaration *********************************** -->

            <!-- Frame service:
                The frame creates a container for the rendering service and a menu bar.
                In this tutorial, the gui services will automatically start the services they register using the
                'start="true"' attribute.
            -->
            <service uid="mainFrame" type="sight::module::ui::frame">
                <gui>
                    <frame>
                        <name>tuto03_data_service</name>
                        <icon>tuto03_data_service/tuto.ico</icon>
                        <minSize width="800" height="600" />
                    </frame>
                    <menubar />
                </gui>
                <registry>
                    <menubar sid="menuBarView" start="true" />
                    <view sid="imageRenderSrv" start="true" />
                </registry>
            </service>

            <!--
                Menu bar service:
                This service defines the list of the menus displayed in the menu bar.
                Here, we have only one menu: File
                Each <menu> declared into the <layout> tag, must have its associated <menu> into the <registry> tag.
                The <layout> tags defines the displayed information, whereas the <registry> tags defines the
                services information.
            -->
            <service uid="menuBarView" type="sight::module::ui::menubar">
                <gui>
                    <layout>
                        <menu name="File" />
                    </layout>
                </gui>
                <registry>
                    <menu sid="menuView" start="true" />
                </registry>
            </service>

            <!--
                Menu service:
                This service defines the actions displayed in the "File" menu.
                Here, it registers two actions: "Open file", and "Quit".
                As in the menu bar service, each <menuItem> declared into the <layout> tag, must have its
                associated <menuItem> into the <registry> tag.

                It's possible to associate specific attributes for <menuItem> to configure their style, shortcut...
                In this tutorial, the attribute 'specialAction' has the value "QUIT". On MS Windows, there's no
                impact, but on Linux this value installs the default 'Quit' system icon in the menuItem.
            -->
            <service uid="menuView" type="sight::module::ui::menu">
                <gui>
                    <layout>
                        <menuItem name="Open image" shortcut="Ctrl+O" />
                        <separator />
                        <menuItem name="Quit" specialAction="QUIT" shortcut="Ctrl+Q" />
                    </layout>
                </gui>
                <registry>
                    <menuItem sid="openImageAct" start="true" />
                    <menuItem sid="quitAct" start="true" />
                </registry>
            </service>

            <!-- ******************************* Actions ****************************************** -->

            <!--
                Quit action:
                The action service (sight::module::ui::quit) is a generic action that will close the application
                when the user click on the menuItem "Quit".
            -->
            <service uid="quitAct" type="sight::module::ui::quit" />

            <!--
                Open file action:
                This service (sight::module::ui::action) is a generic action.
                Its 'clicked' signal is connected to the 'update' slot of the image reader service.
            -->
            <service uid="openImageAct" type="sight::module::ui::action" />

            <!-- ******************************* Services ***************************************** -->

            <!--
                Reader selector dialog:
                This is a generic service that shows a dialog to display all the readers or writers available for its
                associated data. By default it is configured to show readers. (Note: if there is only one reading
                service, it is directly selected without prompting.)
                Here, the only reader available to read a sight::data::image is sight::module::io::vtk::ImageReaderService (see
                tuto02_data_service_basic), so the selector will not be displayed.
                When the service is chosen, it is started, updated and stopped, so the data is read.
            -->
            <service uid="imageReaderSrv" type="sight::module::ui::io::selector">
                <inout key="data" uid="image" />
            </service>

            <!--
                3D visualization service of medical images:
                Here, the service attribute 'auto_connect="true"' allows the rendering to listen the modification of
                the data image. So, when the image is loaded, the visualization will be updated.
            -->
            <service uid="imageRenderSrv" type="sight::module::viz::sample::image">
                <in key="image" uid="image" />
            </service>

            <connect>
                <signal>openImageAct/clicked</signal>
                <slot>imageReaderSrv/update</slot>
            </connect>

            <!-- ******************************* Start services ***************************************** -->

            <!--
                Here, we only start the frame because all the others services are managed by the gui service:
                - the frame starts the menu bar and the redering service
                - the menu bar starts the menu services
                - the menus starts the actions
            -->
            <start uid="mainFrame" />
            <start uid="imageReaderSrv" />
        </config>
    </extension>
</plugin>