12 |
12 |
13 class NavigationContainer(QWidget): |
13 class NavigationContainer(QWidget): |
14 """ |
14 """ |
15 Class implementing the navigation container widget. |
15 Class implementing the navigation container widget. |
16 """ |
16 """ |
|
17 |
17 def __init__(self, parent=None): |
18 def __init__(self, parent=None): |
18 """ |
19 """ |
19 Constructor |
20 Constructor |
20 |
21 |
21 @param parent reference to the parent widget |
22 @param parent reference to the parent widget |
22 @type QWidget |
23 @type QWidget |
23 """ |
24 """ |
24 super().__init__(parent) |
25 super().__init__(parent) |
25 self.setObjectName("navigationcontainer") |
26 self.setObjectName("navigationcontainer") |
26 |
27 |
27 self.__layout = QVBoxLayout(self) |
28 self.__layout = QVBoxLayout(self) |
28 self.__layout.setContentsMargins(0, 0, 0, 0) |
29 self.__layout.setContentsMargins(0, 0, 0, 0) |
29 self.__layout.setSpacing(0) |
30 self.__layout.setSpacing(0) |
30 |
31 |
31 self.setLayout(self.__layout) |
32 self.setLayout(self.__layout) |
32 self.setSizePolicy(QSizePolicy.Policy.Preferred, |
33 self.setSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Maximum) |
33 QSizePolicy.Policy.Maximum) |
34 |
34 |
|
35 def addWidget(self, widget): |
35 def addWidget(self, widget): |
36 """ |
36 """ |
37 Public method to add a widget to the container. |
37 Public method to add a widget to the container. |
38 |
38 |
39 @param widget reference to the widget to be added |
39 @param widget reference to the widget to be added |
40 @type QWidget |
40 @type QWidget |
41 """ |
41 """ |
42 self.__layout.addWidget(widget) |
42 self.__layout.addWidget(widget) |