def current_item_select(self, *args):
     self.clear_widget()
     current_item = args[0]
     contents = current_item.statusTip(0)
     if not contents:
         return
     contents = ast.literal_eval(contents)
     self.setup_toolbox(contents['subfield'])
     self.label_caption.setText(contents['caption'])
     self.label_tag.setText(contents['tag'])
     self.label_type.setText(contents['type'])
     self.label_user.setText(contents['user'])
     self.label_modified.setText(contents['modified'])
     self.label_showpath.setText(contents['show_path'])
     location = '...%s' % (contents['location'].split(
         contents['show_path'])[-1])
     self.label_location.setText(location)
     self.textedit_description.setText(contents['description'])
     size = self.button_thumbnail.minimumSize()
     thumbnail_icon = contents['thumbnail']
     if not os.path.isfile(thumbnail_icon):
         thumbnail_icon = os.path.join(resource.getIconPath(),
                                       'unknown.png')
     swidgets.image_to_button(self.button_thumbnail,
                              size.width(),
                              size.height(),
                              path=thumbnail_icon)
Exemple #2
0
 def take_thumbnail(self, button):
     output_path = None
     if self.standalone:
         current_file = swidgets.brows_file(
             'find the thumbnail(image) file', resource.getImageFormats())
         if not current_file:
             return
         output_path = os.path.join(
             tempfile.gettempdir(),
             'thumbnail_%s.png' % resource.getCurrentDateKey())
         output_path = swidgets.image_resize(current_file, output_path, 768,
                                             540)
     else:
         from studio_usd_pipe.api import studioMaya
         smaya = studioMaya.Maya()
         output_path, w, h = smaya.vieport_snapshot(
             output_path=None,
             width=768,
             height=540,
         )
     if not os.path.isfile(output_path):
         return
     qsize = button.minimumSize()
     swidgets.image_to_button(button,
                              qsize.width(),
                              qsize.height(),
                              path=output_path)
     self.button_thumbnail.setToolTip(output_path)
Exemple #3
0
 def set_default(self):
     self.clear_widget()
     show_icon, valid = self.environ.get_environ_value('SHOW_ICON')
     if not show_icon:
         show_icon = os.path.join(resource.getIconPath(), 'show.png')
     size = self.button_show.minimumSize()
     swidgets.image_to_button(
         self.button_show,
         size.width(),
         size.height(),
         path=show_icon
         )
     pub_data = self.spipe.get()
     captions = ['']
     if pub_data:  # add caption from database
         captions = [''] + pub_data.keys()
     self.combobox_caption.addItems(captions)
     self.combobox_version.addItems(['major', 'minor', 'patch'])            
     size = self.button_thumbnail.minimumSize()
     swidgets.image_to_button(
         self.button_thumbnail,
         size.width(),
         size.height(),
         path=os.path.join(resource.getIconPath(), 'screenshot.png')
         )
 def setup_default(self):
     self.load_captions(input_data=None)
     swidgets.image_to_button(self.button_thumbnail,
                              256,
                              180,
                              path=os.path.join(resource.getIconPath(),
                                                'unknown.png'))
Exemple #5
0
 def load_image_file(self):
     current_file = swidgets.brows_file(
         'find the thumbnail(image) file', resource.getImageFormats())        
     if not current_file:
         return
     os.environ['BROWS_PATH'] = os.path.dirname(current_file)
     output_path = os.path.join(
         tempfile.gettempdir(),
         'thumbnail_%s.png' % resource.getCurrentDateKey())        
     output_path = swidgets.image_resize(current_file, output_path, 768, 540)
     size = self.button_thumbnail.minimumSize()
     swidgets.image_to_button(
         self.button_thumbnail, size.width(), size.height(), path=output_path)
     self.button_thumbnail.setToolTip(output_path)        
Exemple #6
0
 def setup_default(self):
     self.label_caption.clear()
     self.label_tag.clear()
     self.label_type.clear()
     self.label_user.clear()
     self.label_modified.clear()
     self.label_showpath.clear()
     self.label_location.clear()
     self.textedit_description.clear()
     size = self.button_thumbnail.minimumSize()
     thumbnail_icon = os.path.join(resource.getIconPath(), 'thumbnail.png')
     swidgets.image_to_button(self.button_thumbnail,
                              size.width(),
                              size.height(),
                              path=thumbnail_icon)
Exemple #7
0
 def set_default(self):
     self.clear_widget()
     self.setup_current_maya()
     captions = self.spipe.get_castingsheet_captions()
     captions = [''] + captions
     self.combobox_caption.addItems(captions)
     self.combobox_subfield.addItems(self.spipe.pipe_inputs['subfield']['values'])
     self.combobox_version.addItems(['major', 'minor', 'patch'])            
     size = self.button_thumbnail.minimumSize()
     swidgets.image_to_button(
         self.button_thumbnail,
         size.width(),
         size.height(),
         path=os.path.join(resource.getIconPath(), 'screenshot.png')
         )
Exemple #8
0
 def set_default(self):
     self.clear_widget()
     self.setup_current_maya()
     pub_data = self.spipe.get()
     captions = ['']
     if pub_data:  # add caption from database
         captions = [''] + pub_data.keys()
     self.combobox_caption.addItems(captions)
     self.combobox_subfield.addItems(
         self.spipe.pipe_inputs['subfield']['values'])
     self.combobox_type.addItems(self.spipe.pipe_inputs['type']['values'])
     self.combobox_tag.addItems(self.spipe.pipe_inputs['tag']['values'])
     self.combobox_version.addItems(['major', 'minor', 'patch'])
     size = self.button_thumbnail.minimumSize()
     swidgets.image_to_button(self.button_thumbnail,
                              size.width(),
                              size.height(),
                              path=os.path.join(resource.getIconPath(),
                                                'screenshot.png'))
Exemple #9
0
 def set_catalogue(self, **kwargs):
     self.setup_default()
     self.label_caption.setText(kwargs['caption'])
     self.label_tag.setText(kwargs['tag'])
     self.label_type.setText(kwargs['type'])
     self.label_user.setText(kwargs['user'])
     self.label_modified.setText(kwargs['modified'])
     self.label_showpath.setText(kwargs['show_path'])
     location = '...%s' % (kwargs['location'].split(
         kwargs['show_path'])[-1])
     self.label_location.setText(location)
     self.textedit_description.setText(kwargs['description'])
     size = self.button_thumbnail.minimumSize()
     thumbnail_icon = kwargs['thumbnail']
     if not os.path.isfile(thumbnail_icon):
         thumbnail_icon = os.path.join(resource.getIconPath(),
                                       'unknown.png')
     swidgets.image_to_button(self.button_thumbnail,
                              size.width(),
                              size.height(),
                              path=thumbnail_icon)
Exemple #10
0
 def set_current_show(self):
     self.combobox_pipe.clear()
     if self.combobox_show.currentText() == 'None':
         return
     pipes = sorted(resource.getPipeData()['pipe'].keys())
     self.combobox_pipe.addItem('None')
     for pipe in pipes:
         icon_path = os.path.join(resource.getIconPath(), '%s.png' % pipe)
         icon = QtGui.QIcon()
         icon.addPixmap(QtGui.QPixmap(icon_path), QtGui.QIcon.Normal,
                        QtGui.QIcon.Off)
         self.combobox_pipe.addItem(icon, pipe)
     current_show = self.combobox_show.currentText().encode()
     environ = studioEnviron.Environ(current_show)
     show_icon, valid = environ.get_environ_value('SHOW_ICON')
     if not show_icon:
         show_icon = os.path.join(resource.getIconPath(), 'show.png')
     size = self.button_show.minimumSize()
     swidgets.image_to_button(self.button_show,
                              size.width(),
                              size.height(),
                              path=show_icon)
Exemple #11
0
 def setup_ui(self):
     self.setObjectName('widget_asset_push')
     self.resize(self.width, self.height)
     self.verticallayout = QtWidgets.QVBoxLayout(self)
     self.verticallayout.setObjectName('verticallayout')
     self.verticallayout.setSpacing(10)
     self.verticallayout.setContentsMargins(5, 5, 5, 5)
     self.verticallayout_item, self.button_show = swidgets.set_header(
         self, self.title, self.verticallayout, show_icon=self.show_icon)
     self.horizontallayout_output = QtWidgets.QHBoxLayout()
     self.horizontallayout_output.setObjectName('horizontallayout_output')
     self.horizontallayout_output.setSpacing(10)
     self.horizontallayout_output.setContentsMargins(5, 5, 5, 5)
     self.verticallayout_item.addLayout(self.horizontallayout_output)
     source_file = 'Current File: {}\nFile Type: {}'.format(None, None)
     self.label_source = QtWidgets.QLabel()
     self.label_source.setObjectName('label_source')
     self.label_source.setAlignment(QtCore.Qt.AlignRight
                                    | QtCore.Qt.AlignVCenter)
     self.label_source.setStyleSheet('font: 8pt;')
     self.label_source.setText(source_file)
     self.label_source.setToolTip(None)
     self.label_source.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
     self.label_source.customContextMenuRequested.connect(
         partial(self.on_context_menu, 'maya', self.label_source))
     self.horizontallayout_output.addWidget(self.label_source)
     self.horizontallayout_input = QtWidgets.QHBoxLayout()
     self.horizontallayout_input.setContentsMargins(5, 5, 5, 5)
     self.horizontallayout_input.setObjectName('horizontallayout_input')
     self.verticallayout_item.addLayout(self.horizontallayout_input)
     self.gridlayout = QtWidgets.QGridLayout(None)
     self.gridlayout.setObjectName('gridlayout')
     self.gridlayout.setSpacing(5)
     self.gridlayout.setContentsMargins(10, 0, 0, 0)
     self.verticallayout_item.addLayout(self.gridlayout)
     spacer_item = QtWidgets.QSpacerItem(20, 40,
                                         QtWidgets.QSizePolicy.Minimum,
                                         QtWidgets.QSizePolicy.Expanding)
     self.verticallayout.addItem(spacer_item)
     self.label_caption = QtWidgets.QLabel(self)
     self.label_caption.setObjectName('label_caption')
     self.label_caption.setText('Caption')
     self.label_caption.setAlignment(QtCore.Qt.AlignRight
                                     | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_caption, 0, 0, 1, 1)
     self.combobox_caption = QtWidgets.QComboBox(self)
     self.combobox_caption.setObjectName('combobox_caption')
     self.combobox_caption.setEditable(True)
     self.combobox_caption.setEnabled(True)
     self.combobox_caption.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_caption, 0, 1, 1, 1)
     self.label_subfield = QtWidgets.QLabel(self)
     self.label_subfield.setObjectName('label_subfield')
     self.label_subfield.setText('Subfield')
     self.label_subfield.setAlignment(QtCore.Qt.AlignRight
                                      | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_subfield, 1, 0, 1, 1)
     self.combobox_subfield = QtWidgets.QComboBox(self)
     self.combobox_subfield.setObjectName('combobox_subfield')
     self.combobox_subfield.setEditable(True)
     self.combobox_subfield.setEnabled(True)
     self.combobox_subfield.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_subfield, 1, 1, 1, 1)
     self.label_type = QtWidgets.QLabel(self)
     self.label_type.setObjectName('label_type')
     self.label_type.setText('Type')
     self.label_type.setAlignment(QtCore.Qt.AlignRight
                                  | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_type, 2, 0, 1, 1)
     self.combobox_type = QtWidgets.QComboBox(self)
     self.combobox_type.setObjectName('combobox_type')
     self.combobox_type.setEditable(True)
     self.combobox_type.setEnabled(True)
     self.combobox_type.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_type, 2, 1, 1, 1)
     self.label_tag = QtWidgets.QLabel(self)
     self.label_tag.setObjectName('label_tag')
     self.label_tag.setText('Tag')
     self.label_tag.setAlignment(QtCore.Qt.AlignRight
                                 | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_tag, 3, 0, 1, 1)
     self.combobox_tag = QtWidgets.QComboBox(self)
     self.combobox_tag.setObjectName('combobox_tag')
     self.combobox_tag.setEditable(True)
     self.combobox_tag.setEnabled(True)
     self.combobox_tag.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_tag, 3, 1, 1, 1)
     self.label_dependency = QtWidgets.QLabel(self)
     self.label_dependency.setObjectName('label_dependency')
     self.label_dependency.setText('Available Model Dependencies')
     self.label_dependency.setAlignment(QtCore.Qt.AlignRight
                                        | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_dependency, 4, 0, 1, 1)
     self.combobox_dependency = QtWidgets.QComboBox(self)
     self.combobox_dependency.setObjectName('combobox_dependency')
     self.combobox_dependency.setEditable(True)
     self.combobox_dependency.setEnabled(True)
     self.combobox_dependency.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_dependency, 4, 1, 1, 1)
     self.label_thumbnail = QtWidgets.QLabel(self)
     self.label_thumbnail.setObjectName('label_thumbnail')
     self.label_thumbnail.setText('Thumbnail')
     self.label_thumbnail.setAlignment(QtCore.Qt.AlignRight
                                       | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_thumbnail, 5, 0, 1, 1)
     self.button_thumbnail = QtWidgets.QPushButton(self)
     self.button_thumbnail.setObjectName('button_thumbnail')
     size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                         QtWidgets.QSizePolicy.Preferred)
     self.button_thumbnail.setSizePolicy(size_policy)
     self.button_thumbnail.setMinimumSize(QtCore.QSize(256, 180))
     self.button_thumbnail.setMaximumSize(QtCore.QSize(256, 180))
     self.button_thumbnail.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
     self.button_thumbnail.customContextMenuRequested.connect(
         partial(self.on_context_menu, 'image', self.button_thumbnail))
     swidgets.image_to_button(self.button_thumbnail,
                              256,
                              180,
                              path=os.path.join(resource.getIconPath(),
                                                'screenshot.png'))
     self.button_thumbnail.clicked.connect(
         partial(self.take_thumbnail, self.button_thumbnail))
     self.gridlayout.addWidget(self.button_thumbnail, 5, 1, 1, 1)
     self.label_description = QtWidgets.QLabel(self)
     self.label_description.setObjectName('label_description')
     self.label_description.setText('Description')
     self.label_description.setAlignment(QtCore.Qt.AlignRight
                                         | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_description, 6, 0, 1, 1)
     self.textedit_description = QtWidgets.QTextEdit(self)
     self.textedit_description.setObjectName('textedit_description')
     size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred,
                                         QtWidgets.QSizePolicy.Preferred)
     self.textedit_description.setSizePolicy(size_policy)
     self.textedit_description.setMinimumSize(QtCore.QSize(0, 90))
     self.textedit_description.setMaximumSize(QtCore.QSize(16777215, 90))
     self.gridlayout.addWidget(self.textedit_description, 6, 1, 1, 1)
     self.label_version = QtWidgets.QLabel(self)
     self.label_version.setObjectName('label_version')
     self.label_version.setText('version')
     self.label_version.setAlignment(QtCore.Qt.AlignRight
                                     | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_version, 7, 0, 1, 1)
     self.combobox_version = QtWidgets.QComboBox(self)
     self.combobox_version.setObjectName('combobox_version')
     self.combobox_version.setEditable(True)
     self.combobox_version.setEnabled(True)
     self.combobox_version.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_version, 7, 1, 1, 1)
     self.label_latest_version = QtWidgets.QLabel(self)
     self.label_latest_version.setObjectName('label_latest_version')
     self.label_latest_version.setText('Latest Version')
     self.label_latest_version.setAlignment(QtCore.Qt.AlignRight
                                            | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_latest_version, 8, 0, 1, 1)
     self.combobox_latest_version = QtWidgets.QComboBox(self)
     self.combobox_latest_version.setObjectName('combobox_latest_version')
     self.combobox_latest_version.setEditable(True)
     self.combobox_latest_version.setEnabled(False)
     self.combobox_latest_version.setInsertPolicy(
         QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_latest_version, 8, 1, 1, 1)
     self.label_next_version = QtWidgets.QLabel(self)
     self.label_next_version.setObjectName('label_next_version')
     self.label_next_version.setText('Next Version')
     self.label_next_version.setAlignment(QtCore.Qt.AlignRight
                                          | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_next_version, 9, 0, 1, 1)
     self.combobox_next_version = QtWidgets.QComboBox(self)
     self.combobox_next_version.setObjectName('combobox_next_version')
     self.combobox_next_version.setEditable(True)
     self.combobox_next_version.setEnabled(False)
     self.combobox_next_version.setInsertPolicy(
         QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_next_version, 9, 1, 1, 1)
     self.horizontallayout_button = QtWidgets.QHBoxLayout()
     self.horizontallayout_button.setObjectName('horizontallayout_button')
     self.horizontallayout_button.setSpacing(10)
     self.horizontallayout_button.setContentsMargins(5, 5, 5, 5)
     self.verticallayout.addLayout(self.horizontallayout_button)
     spacer_item = QtWidgets.QSpacerItem(40, 20,
                                         QtWidgets.QSizePolicy.Expanding,
                                         QtWidgets.QSizePolicy.Minimum)
     self.horizontallayout_button.addItem(spacer_item)
     self.button_cancel = QtWidgets.QPushButton(self)
     self.button_cancel.setObjectName('button_cancel')
     self.button_cancel.setText('Cancel')
     self.horizontallayout_button.addWidget(self.button_cancel)
     self.button_publish = QtWidgets.QPushButton(self)
     self.button_publish.setObjectName('button_create')
     self.button_publish.setText('Publish')
     self.horizontallayout_button.addWidget(self.button_publish)
     spacer_item = QtWidgets.QSpacerItem(20, 40,
                                         QtWidgets.QSizePolicy.Minimum,
                                         QtWidgets.QSizePolicy.Expanding)
     self.combobox_caption.editTextChanged.connect(self.set_current_caption)
     self.combobox_subfield.currentIndexChanged.connect(
         self.set_current_version)
     self.combobox_version.currentIndexChanged.connect(
         self.set_current_version)
     self.button_publish.clicked.connect(self.do_publish)
     self.button_cancel.clicked.connect(self.close)
Exemple #12
0
 def setup_ui(self):
     self.setObjectName('mainwindow_asset_composition')
     self.resize(self.width, self.height)
     self.centralwidget = QtWidgets.QWidget(self)
     self.centralwidget.setObjectName('centralwidget')
     self.setCentralWidget(self.centralwidget)
     self.verticallayout = QtWidgets.QVBoxLayout(self.centralwidget)
     self.verticallayout.setObjectName('verticallayout')
     self.verticallayout.setSpacing(0)
     self.verticallayout.setContentsMargins(5, 5, 5, 5)  
     
     self.verticallayout_item, self.button_show = swidgets.set_header(
         self, self.title, self.verticallayout, show_icon=self.show_icon)            
     
     
     
     self.splitter = QtWidgets.QSplitter(self)
     self.splitter.setObjectName("splitter")        
     self.splitter.setOrientation(QtCore.Qt.Horizontal)
     self.verticallayout_item.addWidget(self.splitter)
     self.layout_widget = QtWidgets.QWidget(self.splitter)
     self.layout_widget.setObjectName("layout_widget")        
     self.gridlayout = QtWidgets.QGridLayout(self.layout_widget)
     self.gridlayout.setObjectName('gridlayout')
     self.label_caption = QtWidgets.QLabel(self)
     self.label_caption.setObjectName('label_caption')
     self.label_caption.setText('Caption')
     self.label_caption.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_caption, 0, 0, 1, 1)
     self.combobox_caption = QtWidgets.QComboBox(self)
     self.combobox_caption.setObjectName('combobox_caption')
     self.combobox_caption.setEditable(True)
     self.combobox_caption.setEnabled(True)
     self.combobox_caption.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_caption, 0, 1, 1, 1) 
     self.label_composition = QtWidgets.QLabel(self)
     self.label_composition.setObjectName('label_composition')
     self.label_composition.setText('Composition')
     self.label_composition.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_composition, 2, 0, 1, 1)
     self.treewidget_composition = QtWidgets.QTreeWidget(self)
     self.treewidget_composition.setObjectName('treewidget_composition')
     self.treewidget_composition.header().setVisible(False)
     self.treewidget_composition.setStyleSheet('font: 9pt \'Sans Serif\';')
     self.treewidget_composition.setAlternatingRowColors(True)   
     self.treewidget_composition.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
     self.treewidget_composition.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)        
     self.treewidget_composition.customContextMenuRequested.connect(
         partial(self.on_context_menu, self.treewidget_composition))                 
     self.gridlayout.addWidget(self.treewidget_composition, 2, 1, 1, 1)
     self.label_thumbnail = QtWidgets.QLabel(self)
     self.label_thumbnail.setObjectName('label_thumbnail')
     self.label_thumbnail.setText('Thumbnail')
     self.label_thumbnail.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_thumbnail, 3, 0, 1, 1)
     self.button_thumbnail = QtWidgets.QPushButton(self)
     self.button_thumbnail.setObjectName('button_thumbnail')
     size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
     self.button_thumbnail.setSizePolicy(size_policy)
     self.button_thumbnail.setMinimumSize(QtCore.QSize(256, 180))
     self.button_thumbnail.setMaximumSize(QtCore.QSize(256, 180))
     screenshot_icon = os.path.join(resource.getIconPath(), 'screenshot.png')
     swidgets.image_to_button(
         self.button_thumbnail,
         256,
         180,
         path=screenshot_icon
         )
     self.button_thumbnail.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)        
     self.button_thumbnail.customContextMenuRequested.connect(
         partial(self.on_context_menu, self.button_thumbnail))  
     self.button_thumbnail.clicked.connect(partial(self.take_thumbnail, self.button_thumbnail))
     self.gridlayout.addWidget(self.button_thumbnail, 3, 1, 1, 1)  
     self.label_description = QtWidgets.QLabel(self)
     self.label_description.setObjectName('label_description')
     self.label_description.setText('Description')
     self.label_description.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_description, 4, 0, 1, 1)
     self.textedit_description = QtWidgets.QTextEdit(self)
     self.textedit_description.setObjectName('textedit_description')
     size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
     self.textedit_description.setSizePolicy(size_policy)
     self.textedit_description.setMinimumSize(QtCore.QSize(0, 90))
     self.textedit_description.setMaximumSize(QtCore.QSize(16777215, 90))          
     self.gridlayout.addWidget(self.textedit_description, 4, 1, 1, 1)  
     self.label_version = QtWidgets.QLabel(self)
     self.label_version.setObjectName('label_version')
     self.label_version.setText('version')
     self.label_version.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_version, 5, 0, 1, 1)
     self.combobox_version = QtWidgets.QComboBox(self)
     self.combobox_version.setObjectName('combobox_version')
     self.combobox_version.setEditable(True)
     self.combobox_version.setEnabled(True)
     self.combobox_version.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_version, 5, 1, 1, 1)                  
     self.label_latest_version = QtWidgets.QLabel(self)
     self.label_latest_version.setObjectName('label_latest_version')
     self.label_latest_version.setText('Latest Version')
     self.label_latest_version.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_latest_version, 6, 0, 1, 1)
     self.combobox_latest_version = QtWidgets.QComboBox(self)
     self.combobox_latest_version.setObjectName('combobox_latest_version')
     self.combobox_latest_version.setEditable(True)
     self.combobox_latest_version.setEnabled(False)
     self.combobox_latest_version.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_latest_version, 6, 1, 1, 1)
     self.label_next_version = QtWidgets.QLabel(self)
     self.label_next_version.setObjectName('label_next_version')
     self.label_next_version.setText('Next Version')
     self.label_next_version.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter)
     self.gridlayout.addWidget(self.label_next_version, 7, 0, 1, 1)
     self.combobox_next_version = QtWidgets.QComboBox(self)
     self.combobox_next_version.setObjectName('combobox_next_version')
     self.combobox_next_version.setEditable(True)
     self.combobox_next_version.setEnabled(False)
     self.combobox_next_version.setInsertPolicy(QtWidgets.QComboBox.NoInsert)
     self.gridlayout.addWidget(self.combobox_next_version, 7, 1, 1, 1)  
     self.treewidget_input = QtWidgets.QTreeWidget(self.splitter)
     self.treewidget_input.setObjectName('treewidget_input')
     self.treewidget_input.header().setVisible(False)
     self.treewidget_input.setStyleSheet('font: 12pt \'Sans Serif\';')
     self.treewidget_input.setAlternatingRowColors(True)
     self.treewidget_input.setSelectionMode(QtWidgets.QAbstractItemView.ExtendedSelection)
     self.treewidget_input.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)        
     self.treewidget_input.customContextMenuRequested.connect(
         partial(self.on_context_menu, self.treewidget_input))        
     self.treewidget_input.currentItemChanged.connect(self.current_catalogue_select)        
     self.splitter.addWidget(self.comp_catalogue)
     self.horizontallayout_button = QtWidgets.QHBoxLayout()
     self.horizontallayout_button.setObjectName('horizontallayout_button')
     self.horizontallayout_button.setSpacing(10)
     self.horizontallayout_button.setContentsMargins(5, 5, 5, 5)        
     self.verticallayout.addLayout(self.horizontallayout_button)  
     spacer_item = QtWidgets.QSpacerItem(
         40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
     self.horizontallayout_button.addItem(spacer_item)
     self.button_cancel = QtWidgets.QPushButton(self)
     self.button_cancel.setObjectName('button_cancel')
     self.button_cancel.setText('cancel')
     self.horizontallayout_button.addWidget(self.button_cancel)
     self.button_publish = QtWidgets.QPushButton(self)
     self.button_publish.setObjectName('button_publish')
     self.button_publish.setText('publish')
     self.horizontallayout_button.addWidget(self.button_publish)
 
     self.button_cancel.clicked.connect(self.close)     
     self.button_publish.clicked.connect(self.publish)
     self.combobox_caption.editTextChanged.connect(self.set_current_caption)
     self.combobox_version.currentIndexChanged.connect(self.set_current_version)        
     self.splitter.setSizes ([373, 350, 272])