in Gems/AWSCore/Code/Tools/ResourceMappingTool/view/view_edit_page.py [0:0]
def _setup_header_area(self) -> None:
self._header_area: QWidget = QWidget(self)
self._header_area.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Minimum)
self._header_area.setMinimumSize(view_size_constants.TOOL_APPLICATION_MAIN_WINDOW_WIDTH,
view_size_constants.VIEW_EDIT_PAGE_HEADER_AREA_HEIGHT)
header_area_layout: QHBoxLayout = QHBoxLayout(self._header_area)
header_area_layout.setSizeConstraint(QLayout.SetMinimumSize)
header_area_layout.setContentsMargins(
view_size_constants.MAIN_PAGE_LAYOUT_MARGIN_LEFTRIGHT,
view_size_constants.MAIN_PAGE_LAYOUT_MARGIN_TOPBOTTOM + view_size_constants.VIEW_EDIT_PAGE_MARGIN_TOPBOTTOM,
view_size_constants.MAIN_PAGE_LAYOUT_MARGIN_LEFTRIGHT,
view_size_constants.MAIN_PAGE_LAYOUT_MARGIN_TOPBOTTOM)
config_file_label: QLabel = QLabel(self._header_area)
config_file_label.setText(notification_label_text.VIEW_EDIT_PAGE_CONFIG_FILE_TEXT)
config_file_label_font: QFont = QFont()
config_file_label_font.setBold(True)
config_file_label.setFont(config_file_label_font)
config_file_label.setMinimumSize(view_size_constants.CONFIG_FILE_LABEL_WIDTH,
view_size_constants.INTERACTION_COMPONENT_HEIGHT)
header_area_layout.addWidget(config_file_label)
self._config_file_combobox: QComboBox = QComboBox(self._header_area)
self._config_file_combobox.setLineEdit(QLineEdit())
self._config_file_combobox.lineEdit().setPlaceholderText(
notification_label_text.VIEW_EDIT_PAGE_CONFIG_FILES_PLACEHOLDER_TEXT.format(0))
self._config_file_combobox.lineEdit().setReadOnly(True)
self._config_file_combobox.setMinimumSize(view_size_constants.CONFIG_FILE_COMBOBOX_WIDTH,
view_size_constants.INTERACTION_COMPONENT_HEIGHT)
self._config_file_combobox.setCurrentIndex(-1)
header_area_layout.addWidget(self._config_file_combobox)
self._config_file_combobox.currentIndexChanged.connect(self._set_config_file_combobox_style)
header_area_spacer: QSpacerItem = QSpacerItem(view_size_constants.TOOL_APPLICATION_MAIN_WINDOW_WIDTH,
view_size_constants.INTERACTION_COMPONENT_HEIGHT,
QSizePolicy.Expanding, QSizePolicy.Minimum)
header_area_layout.addItem(header_area_spacer)
config_location_label: QLabel = QLabel(self._header_area)
config_location_label.setText(notification_label_text.VIEW_EDIT_PAGE_CONFIG_LOCATION_TEXT)
config_location_label_font: QFont = QFont()
config_location_label_font.setBold(True)
config_location_label.setFont(config_location_label_font)
config_location_label.setMinimumSize(view_size_constants.CONFIG_LOCATION_LABEL_WIDTH,
view_size_constants.INTERACTION_COMPONENT_HEIGHT)
header_area_layout.addWidget(config_location_label)
self._config_location_text: QLabel = QLabel(self._header_area)
self._config_location_text.setMinimumSize(view_size_constants.CONFIG_LOCATION_TEXT_WIDTH,
view_size_constants.INTERACTION_COMPONENT_HEIGHT)
header_area_layout.addWidget(self._config_location_text)
self._config_location_button: QPushButton = QPushButton(self._header_area)
self._config_location_button.setIcon(QIcon(":/Gallery/Folder.svg"))
self._config_location_button.setMinimumSize(view_size_constants.INTERACTION_COMPONENT_HEIGHT,
view_size_constants.INTERACTION_COMPONENT_HEIGHT)
header_area_layout.addWidget(self._config_location_button)