def __init__(self, parent=None, paths_dict=None, hide_on_find=False): QtWidgets.QWidget.__init__(self, parent) self.layout = QtWidgets.QVBoxLayout(self) self.globals_layout = QtWidgets.QGridLayout() self.paths_layout = QtWidgets.QGridLayout() self.vfx_paths_layout = QtWidgets.QGridLayout() self.user_dir = os.path.expanduser("~") self.user_name = self.get_user_name() self.cgl_dir = self.get_default_cgl_dir() self.user_globals_path = self.get_user_config(self.cgl_dir) self.globals_label = QtWidgets.QLabel('Globals Locations') self.globals_label.setProperty('class', 'ultra_title') self.paths_label = QtWidgets.QLabel('CGL Tool Paths') self.paths_label.setProperty('class', 'ultra_title') self.paths_label.hide() self.vfx_label = QtWidgets.QLabel('VFX Paths') self.vfx_label.setProperty('class', 'ultra_title') self.vfx_label.hide() # self.red_palette, self.green_palette, self.black_palette = define_palettes() self.cgl_tools_folder = None self.widget_dict = {} # Add User Globals, Root and The "Paths" label to the first slots. i = 0 i = self.add_path_line(self.globals_layout, 'root', paths_dict, i, hide_on_find) self.add_path_line(self.globals_layout, 'user_globals', paths_dict, i, hide_on_find) self.layout.addWidget(self.paths_label) self.layout.addLayout(self.globals_layout) self.layout.addWidget(self.paths_label) self.layout.addLayout(self.paths_layout) self.layout.addWidget(self.vfx_label) self.layout.addLayout(self.vfx_paths_layout) default_paths = [ 'cgl_tools', 'code_root', 'dev_pkg', 'ffmpeg', 'ffplay', 'ffprobe', 'magick', 'wget', 'globals' ] vfx_paths = ['ari_convert', 'maketx', 'mayapy', 'nuke'] prow = 0 vrow = 0 for key in paths_dict: if key in default_paths: prow += 2 self.add_path_line(self.paths_layout, key, paths_dict, prow, hide_on_find) elif key in vfx_paths: vrow += 2 self.add_path_line(self.vfx_paths_layout, key, paths_dict, vrow, hide_on_find)
def __init__(self, path_object): LJDialog.__init__(self) self.path_object = path_object if self.path_object.context == 'source': self.other_path_object = PathObject.copy(path_object, context='render') else: self.other_path_object = PathObject.copy(path_object, context='source') # TODO - i need something here to check if i'm in a task or not, if not send a popup task = path_object.task seq = path_object.seq shot = path_object.shot self.to_object = None self.root = '' all_ = r'%s/%s/%s' % (seq, shot, task) self.setWindowTitle('Export %s to drive' % all_) v_layout = QtWidgets.QVBoxLayout(self) grid_layout = QtWidgets.QGridLayout() button_layout = QtWidgets.QHBoxLayout() drive_label = QtWidgets.QLabel('External Drive:') self.drive_combo = AdvComboBox() root_label = QtWidgets.QLabel('External Drive Root:') self.root_line_edit = QtWidgets.QLineEdit() copy_from_label = QtWidgets.QLabel('copy from:') self.copy_from_path = QtWidgets.QLabel(path_object.path_root) copy_to_label = QtWidgets.QLabel('copy to') self.copy_to_path = QtWidgets.QLabel('') self.message = QtWidgets.QLabel('') self.cancel_button = QtWidgets.QPushButton('Cancel') self.ok_button = QtWidgets.QPushButton('Copy Task') grid_layout.addWidget(drive_label, 0, 0) grid_layout.addWidget(self.drive_combo, 0, 1) grid_layout.addWidget(root_label, 1, 0) grid_layout.addWidget(self.root_line_edit, 1, 1) grid_layout.addWidget(copy_from_label, 2, 0) grid_layout.addWidget(self.copy_from_path, 2, 1) grid_layout.addWidget(copy_to_label, 3, 0) grid_layout.addWidget(self.copy_to_path, 3, 1) button_layout.addStretch(1) button_layout.addWidget(self.cancel_button) button_layout.addWidget(self.ok_button) v_layout.addLayout(grid_layout) v_layout.addWidget(self.message) v_layout.addLayout(button_layout) self.drive_combo.currentIndexChanged.connect(self.on_drive_changed) self.root_line_edit.textChanged.connect(self.on_root_edited) self.cancel_button.clicked.connect(self.on_cancel_clicked) self.ok_button.clicked.connect(self.on_copy_clicked) self.get_available_drives()
def __init__(self, parent=None): QtWidgets.QDialog.__init__(self, parent) self.setMinimumWidth(1200) self.setMinimumHeight(800) self.setWindowTitle('Lumbermill Quick Setup') self.default_globals = DEFAULT_GLOBALS self.default_user_globals = DEFAULT_USER_GLOBALS self.default_root = DEFAULT_ROOT self.default_code_root = DEFAULT_CODE_ROOT size_policy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) size_policy.setVerticalStretch(1) layout = QtWidgets.QVBoxLayout(self) #layout.setSizePolicy(size_policy) grid_layout = QtWidgets.QGridLayout() button_layout = QtWidgets.QHBoxLayout() company_label = QtWidgets.QLabel('Company Name') root_label = QtWidgets.QLabel('CGL Root') code_root_label = QtWidgets.QLabel('Code Root') self.sync_options_label = QtWidgets.QLabel('<b>Sync Folders:</b>') self.sync_folder_label = QtWidgets.QLabel('Production Folder') self.sync_folder_message = QtWidgets.QLabel( "<i>Don't worry you can edit this later</i>") self.sync_cgl_tools_label = QtWidgets.QLabel('CGL_TOOLS Folder') self.import_project_hint = QtWidgets.QLabel( '<i>hint: Z:\COMPANIES\loneCoconut\source\CGL_TESTPROJECT - copies one project,' ' Z:\COMPANIES\loneCoconut\source - copies all projects<\i>') self.import_project_hint.setSizePolicy(size_policy) self.import_project_hint.setWordWrap(True) self.company_line_edit = QtWidgets.QLineEdit() self.root_line_edit = QtWidgets.QLineEdit() self.code_root_line_edit = QtWidgets.QLineEdit() self.sync_folder_line_edit = QtWidgets.QLineEdit() self.sync_cgl_tools_line_edit = QtWidgets.QLineEdit() self.code_root_line_edit.setText(DEFAULT_CODE_ROOT) self.root_line_edit.setText(self.default_root) self.sync_cgl_tools_line_edit.setText( os.path.join(self.default_root, '_config', 'cgl_tools')) self.company_line_edit.setText('lone coconut') self.code_root_line_edit.setEnabled(False) # self.root_line_edit.setEnabled(False) self.sync_cgl_tools_line_edit.setEnabled(False) self.sync_folder_line_edit.setEnabled(False) self.aws_globals_label = QtWidgets.QLabel() self.projects_checkbox = QtWidgets.QCheckBox('Import a Project') self.sync_thing_checkbox = QtWidgets.QCheckBox('Set up Remote Syncing') self.import_label = QtWidgets.QLabel('Import Project From:') self.import_line_edit = QtWidgets.QLineEdit() self.import_button = QtWidgets.QToolButton() self.import_button.setText('...') self.sync_thing_checkbox.setChecked(True) self.projects_checkbox.setChecked(True) self.company_name = 'Lone Coconut' self.company_name_s3 = 'lone-coconut' self.company_name_disk = 'loneCoconut' self.cgl_tools_path = os.path.join(DEFAULT_HOME, 'downloads', 'cgl_tools.zip') self.globals_path = os.path.join(DEFAULT_HOME, 'downloads', 'globals.json') self.aws_globals = r'https://%s.s3.amazonaws.com/globals.json' % self.company_name_s3 self.check_for_globals_button = QtWidgets.QPushButton( 'Check for Globals') self.download_globals_button = QtWidgets.QPushButton( 'Set Up Lumbermill') button_layout.addStretch(1) button_layout.addWidget(self.download_globals_button) grid_layout.addWidget(root_label, 2, 0) grid_layout.addWidget(self.root_line_edit, 2, 1) grid_layout.addWidget(code_root_label, 3, 0) grid_layout.addWidget(self.code_root_line_edit, 3, 1) grid_layout.addWidget(self.import_label, 4, 0) grid_layout.addWidget(self.import_line_edit, 4, 1) grid_layout.addWidget(self.import_button, 4, 2) grid_layout.addWidget(self.import_project_hint, 5, 1) grid_layout.addWidget(self.sync_options_label, 6, 0) grid_layout.addWidget(self.sync_folder_label, 7, 0) grid_layout.addWidget(self.sync_folder_line_edit, 7, 1) grid_layout.addWidget(self.sync_folder_message, 8, 1) grid_layout.addWidget(self.sync_cgl_tools_label, 9, 0) grid_layout.addWidget(self.sync_cgl_tools_line_edit, 9, 1) layout.addWidget(company_label) layout.addWidget(self.company_line_edit) layout.addWidget(self.aws_globals_label) layout.addWidget(self.projects_checkbox) layout.addWidget(self.sync_thing_checkbox) layout.addLayout(grid_layout) layout.addLayout(button_layout) layout.addStretch(1) self.aws_globals_label.hide() self.on_projects_checkbox_clicked() self.on_sync_thing_checkbox_clicked() self.on_company_name_changed() self.company_line_edit.editingFinished.connect( self.on_company_name_changed) self.root_line_edit.textChanged.connect(self.on_root_changed) self.download_globals_button.clicked.connect(self.set_up_lumbermill) self.projects_checkbox.clicked.connect( self.on_projects_checkbox_clicked) self.sync_thing_checkbox.clicked.connect( self.on_sync_thing_checkbox_clicked) self.import_line_edit.editingFinished.connect( self.on_import_line_edit_changed)
def __init__(self, parent=None, company='', config_dict=None, root=r"C:\CGLUMBERJACK\COMPANIES"): QtWidgets.QDialog.__init__(self, parent) self.app_config = config_dict self.proj_management_label = QtWidgets.QLabel('Project Management') self.contents = {} self.company = company self.global_config = {} self.root = root self.user_name = self.get_user_name() self.api_key = '' self.api_script = '' self.api_user = '' self.project_management = '' self.api_server = '' self.setWindowTitle('Create Globals') layout = QtWidgets.QVBoxLayout(self) self.project_management_label = QtWidgets.QLabel('Project Management:') self.project_management_label.setProperty('class', 'ultra_title') self.proj_management_label = QtWidgets.QLabel('Software:') self.proj_management_combo = QtWidgets.QComboBox() self.proj_management_combo.addItems( ['lumbermill', 'ftrack', 'shotgun']) # self.red_palette, self.green_palette, self.black_palette = define_palettes() self.user_email_label = QtWidgets.QLabel('User Email:') self.user_email_line_edit = QtWidgets.QLineEdit() self.user_name_label = QtWidgets.QLabel('User Name:') self.user_name_line_edit = QtWidgets.QLineEdit() self.user_name_line_edit.setText(self.user_name) self.globals_label = QtWidgets.QLabel('Globals') self.globals_label.setProperty('class', 'ultra_title') self.paths_label = QtWidgets.QLabel('Paths') self.paths_label.setProperty('class', 'ultra_title') self.server_label = QtWidgets.QLabel('server url:') self.api_key_label = QtWidgets.QLabel('api key:') self.api_user_label = QtWidgets.QLabel('api user:'******'api script:') self.root_label = QtWidgets.QLabel('Production Root:') self.server_line_edit = QtWidgets.QLineEdit() self.api_key_line_edit = QtWidgets.QLineEdit() self.api_user_line_edit = QtWidgets.QLineEdit() self.api_script_line_edit = QtWidgets.QLineEdit() self.choose_folder_button = QtWidgets.QToolButton() self.choose_folder_button.setText('...') self.choose_root = QtWidgets.QToolButton() self.choose_root.setText('...') self.choose_code_root_button = QtWidgets.QToolButton() self.choose_code_root_button.setText('...') self.proj_man_grid = QtWidgets.QGridLayout() self.proj_man_grid.addWidget(self.proj_management_label, 0, 0) self.proj_man_grid.addWidget(self.proj_management_combo, 0, 1) self.proj_man_grid.addWidget(self.api_key_label, 1, 0) self.proj_man_grid.addWidget(self.api_key_line_edit, 1, 1) self.proj_man_grid.addWidget(self.api_user_label, 2, 0) self.proj_man_grid.addWidget(self.api_user_line_edit, 2, 1) self.proj_man_grid.addWidget(self.server_label, 3, 0) self.proj_man_grid.addWidget(self.server_line_edit, 3, 1) self.proj_man_grid.addWidget(self.api_script_label, 4, 0) self.proj_man_grid.addWidget(self.api_script_line_edit, 4, 1) self.proj_man_grid.addWidget(self.user_name_label, 5, 0) self.proj_man_grid.addWidget(self.user_name_line_edit, 5, 1) self.proj_man_grid.addWidget(self.user_email_label, 6, 0) self.proj_man_grid.addWidget(self.user_email_line_edit, 6, 1) self.cancel_button = QtWidgets.QPushButton('Cancel') self.ok_button = QtWidgets.QPushButton('Ok') self.button = '' self.ok_button.setEnabled(False) self.create_globals_button = QtWidgets.QPushButton('Create Globals') self.create_globals_button.setEnabled(False) # self.project_management = self.app_config['account_info']['project_management'] button_layout = QtWidgets.QHBoxLayout() button_layout.addStretch(1) button_layout.addWidget(self.cancel_button) button_layout.addWidget(self.create_globals_button) button_layout.addWidget(self.ok_button) # self.globals_tree_widget = DictionaryTreeWidget({}) this = __file__.split('cglumberjack')[0] if not self.app_config: dialog = QuickSync() dialog.exec_() globals_path = dialog.globals_path cgl_tools_path = dialog.cgl_tools_path if globals_path: dict_ = read_write.load_json(globals_path) self.inherited_globals = True else: self.inherited_globals = False this = __file__.split('cglumberjack')[0] dict_ = read_write.load_json( os.path.join(this, 'cglumberjack', 'cgl', 'cfg', 'globals_template.json')) self.proj_man_dict = dict_['project_management'] self.path_item_widget = PathItemWidget(paths_dict=dict_['paths'], hide_on_find=True) if self.path_item_widget.widget_dict['root']['line_edit'].text(): self.show_project_management_basics() else: self.hide_project_management_basics() self.widget_dict = self.path_item_widget.widget_dict layout.addWidget(self.globals_label) layout.addWidget(self.path_item_widget) layout.addWidget(self.project_management_label) layout.addLayout(self.proj_man_grid) # layout.addWidget(self.globals_tree_widget) # layout.addWidget(QHLine()) layout.addLayout(button_layout) layout.addStretch(1) # self.user_globals_line_edit.setEnabled(False) self.proj_management_combo.currentIndexChanged.connect( self.on_pm_changed) self.path_item_widget.line_edit_changed.connect( self.on_line_edits_changed) self.ok_button.clicked.connect(self.on_ok_clicked) self.ok_button.hide() self.cancel_button.clicked.connect(self.cancel_clicked) self.create_globals_button.clicked.connect( self.on_create_globals_clicked) self.path_item_widget.root_set.connect(self.on_root_line_edit_set) self.user_email_line_edit.textChanged.connect( self.check_ok_to_create_globals) self.user_name_line_edit.textChanged.connect( self.check_ok_to_create_globals) self.proj_management_combo.currentIndexChanged.connect( self.check_ok_to_create_globals) self.get_input() self.hide_api_info() self.set_proj_man() self.check_user_config() # self.globals_tree_widget.hide() self.on_globals_changed() self.set_some_stuff()
def __init__(self, parent=None, preflight_name='', preflight_step_name='', attrs=None, preflight_path='', menu_type='preflights'): # TODO - we need to choose better variable names, this is obviously "preflight" specific. QtWidgets.QWidget.__init__(self, parent) try: dialog = self.parent().parent().parent() print dialog self.software = dialog.software_combo.currentText() except AttributeError: # TODO - look into this a bit deeper, this is a fairly generic catch right now. dialog = self.parent().parent().parent().parent().parent() self.software = dialog.software_combo.currentText() self.menu_type = menu_type self.attrs = attrs self.name = preflight_step_name self.preflight_name = preflight_name self.preflight_path = preflight_path self.do_save = True # Create the Layouts layout = QtWidgets.QVBoxLayout(self) grid_layout = QtWidgets.QGridLayout() tool_row = QtWidgets.QHBoxLayout() # labels module_label = QtWidgets.QLabel('module') required_label = QtWidgets.QLabel('required') label_label = QtWidgets.QLabel('label') icon_button = QtWidgets.QToolButton() icon_button.setIcon(QtGui.QIcon(os.path.join(icon_path(), 'folder24px.png'))) self.icon_label = QtWidgets.QLabel('icon') name_label = QtWidgets.QLabel('name') # line edits self.command_line_edit = QtWidgets.QLineEdit() self.command_line_edit.setEnabled(False) self.required_line_edit = QtWidgets.QLineEdit() self.required_line_edit.setText('True') self.icon_path_line_edit = QtWidgets.QLineEdit() # self.required_line_edit.setEnabled(False) self.label_line_edit = QtWidgets.QLineEdit() self.name_line_edit = QtWidgets.QLineEdit() self.attrs_dict = {'module': self.command_line_edit, 'required': self.required_line_edit, 'label': self.label_line_edit, 'name': self.name_line_edit, 'icon': self.icon_path_line_edit} # tool buttons delete_button = QtWidgets.QPushButton('Delete') delete_button.setProperty('class', 'basic') open_button = QtWidgets.QPushButton('Open in Editor') open_button.setProperty('class', 'basic') self.save_button = QtWidgets.QPushButton('Save All') self.save_button.setProperty('class', 'basic') # Text Edit self.code_text_edit = QtWidgets.QPlainTextEdit() metrics = QtGui.QFontMetrics(self.code_text_edit.font()) self.code_text_edit.setTabStopWidth(4 * metrics.width(' ')) Highlighter(self.code_text_edit.document()) # Layout the Grid grid_layout.addWidget(label_label, 0, 0) grid_layout.addWidget(self.label_line_edit, 0, 1) grid_layout.addWidget(module_label, 1, 0) grid_layout.addWidget(self.command_line_edit, 1, 1) grid_layout.addWidget(required_label, 2, 0) grid_layout.addWidget(self.required_line_edit, 2, 1) grid_layout.addWidget(self.icon_label, 3, 0) grid_layout.addWidget(self.icon_path_line_edit, 3, 1) grid_layout.addWidget(icon_button, 3, 2) grid_layout.addWidget(name_label, 4, 0) grid_layout.addWidget(self.name_line_edit, 4, 1) name_label.hide() self.name_line_edit.hide() if self.menu_type != 'shelves': self.icon_label.hide() self.icon_path_line_edit.hide() icon_button.hide() else: self.required_line_edit.hide() required_label.hide() # Layout the tool row tool_row.addStretch(1) tool_row.addWidget(open_button) tool_row.addWidget(delete_button) tool_row.addWidget(self.save_button) # layout the widget layout.addLayout(grid_layout) layout.addWidget(self.code_text_edit) layout.addLayout(tool_row) # Signals and Slots self.code_text_edit.textChanged.connect(self.on_code_changed) icon_button.clicked.connect(self.on_icon_button_clicked) delete_button.clicked.connect(self.on_delete_clicked) open_button.clicked.connect(self.on_open_clicked) self.save_button.clicked.connect(self.on_save_clicked) self.load_attrs() self.label_line_edit.textChanged.connect(self.on_code_changed)
def __init__(self, parent=None): LJDialog.__init__(self, parent) self.setWindowTitle('RoboGary') trifecta_layout = QtWidgets.QHBoxLayout(self) trifecta_layout.setContentsMargins(0, 96, 0, 96) highlight_icon = os.path.join(icon_path(), 'highlight_24px.png') # self.transcript_file = r'B:\Users\tmiko\Downloads\tom_ahmed_conversation_12_10_2019.json' self.transcript_file = r'\\Mac\Home\Downloads\tom_ahmed_conversation_12_10_2019.json' self.transcript = load_json(self.transcript_file) self.words = self.transcript['results']['items'] self.next_words_length = 5 self.cgl_word_dict = self.create_cgl_word_dict() self.tools_layout = QtWidgets.QVBoxLayout() self.script_layout = QtWidgets.QVBoxLayout() self.title_line_edit = QtWidgets.QLineEdit() self.gridA = QtWidgets.QGridLayout() self.gridA.setContentsMargins(96, 0, 0, 12) self.grid = QtWidgets.QGridLayout() self.grid.setContentsMargins(96, 0, 0, 0) # Screenplay stuff self.title_label = QtWidgets.QLabel('TITLE:') self.title_line_edit.setProperty('class', 'screen_play_edit') self.title_line_edit.setText('TYPE TITLE HERE') self.screenplay_text_edit = ScreenPlayTextEdit() self.screenplay_text_edit.setProperty('class', 'screen_play') self.width = 816 self.screenplay_text_edit.setMinimumWidth(self.width) self.screenplay_text_edit.setMaximumWidth(self.width) self.punctuation = [',', '.', '?'] # Details stuff self.description_label = QtWidgets.QLabel("DESCRIPTION:") self.description_line_edit = QtWidgets.QLineEdit('TYPE DESCRIPTION HERE') self.description_line_edit.setProperty('class', 'screen_play_edit') self.location_label = QtWidgets.QLabel("LOCATION: ") self.location_line_edit = QtWidgets.QLineEdit('TYPE LOCATION HERE') self.location_line_edit.setProperty('class', 'screen_play_edit') self.date_label = QtWidgets.QLabel("DATE: ") self.date_line_edit = QtWidgets.QLineEdit('TYPE DATE HERE') self.date_line_edit.setProperty('class', 'screen_play_edit') self.selection_start_label = QtWidgets.QLabel("Start:") self.selection_start_line_edit = QtWidgets.QLineEdit() self.selection_end_label = QtWidgets.QLabel("End:") self.selection_end_line_edit = QtWidgets.QLineEdit() # grid self.gridA.addWidget(self.title_label, 10, 0) self.gridA.addWidget(self.title_line_edit, 10, 1) self.grid.addWidget(self.description_label, 11, 0) self.grid.addWidget(self.description_line_edit, 11, 1) self.grid.addWidget(self.location_label, 12, 0) self.grid.addWidget(self.location_line_edit, 12, 1) self.grid.addWidget(self.date_label, 13, 0) self.grid.addWidget(self.date_line_edit, 13, 1) self.grid.addWidget(self.selection_start_label, 14, 0) self.grid.addWidget(self.selection_start_line_edit, 14, 1) self.grid.addWidget(self.selection_end_label, 15, 0) self.grid.addWidget(self.selection_end_line_edit, 15, 1) # Toolbar toolbar = QtWidgets.QHBoxLayout() toolbar.setContentsMargins(96, 0, 0, 0) self.script_layout.addLayout(self.gridA) self.script_layout.addLayout(toolbar) self.script_layout.addWidget(self.screenplay_text_edit) self.tools_layout.addLayout(self.grid) self.highlight_button = QtWidgets.QToolButton() self.highlight_button.setIcon(QtGui.QIcon(highlight_icon)) toolbar.addWidget(self.highlight_button) toolbar.addStretch(1) trifecta_layout.addLayout(self.script_layout) trifecta_layout.addLayout(self.tools_layout) self.tools_layout.addStretch(1) self.highlight_button.clicked.connect(self.on_highlight_clicked) self.screenplay_text_edit.selectionChanged.connect(self.on_selected) self.load_transcript()
def __init__(self, parent=None, type_=None, menu_path=None, pm_tasks=None): LJDialog.__init__(self, parent) self.type = type_ self.cgl_tools = get_cgl_tools() self.singular = '' self.menu_path = menu_path self.software = '' self.setWindowTitle('Pipeline Designer') self.schema = pm_tasks self.task_list = [] try: for each in self.schema['long_to_short']['assets']: if each not in self.task_list: self.task_list.append(each) for each in self.schema['long_to_short']['shots']: if each not in self.task_list: self.task_list.append(each) except TypeError: print 'Problems found in your globals "schema"' return self.task_list.sort() self.task_list.insert(0, '') # create layouts layout = QtWidgets.QVBoxLayout(self) tool_bar = QtWidgets.QHBoxLayout() self.title_widget = QtWidgets.QWidget() title_widget_layout = QtWidgets.QHBoxLayout() self.title_widget.setLayout(title_widget_layout) grid_layout = QtWidgets.QGridLayout() menu_type_row = QtWidgets.QHBoxLayout() # create widgets self.software_label = QtWidgets.QLabel('Software:') self.software_label.setProperty('class', 'title') self.software_combo = QtWidgets.QComboBox() self.menu_type_label = QtWidgets.QLabel('Menu Type:') self.menu_type_label.setProperty('class', 'title') self.menu_type_combo = QtWidgets.QComboBox() self.menu_type_combo.addItems(['', 'menus', 'context-menus', 'shelves', 'preflights']) self.new_software_button = QtWidgets.QPushButton('Add Software') self.new_software_button.setProperty('class', 'add_button') self.menus = QtWidgets.QTabWidget() self.menus.setMovable(True) self.title_label = QtWidgets.QLabel() self.title_label.setProperty('class', 'ultra_title') self.add_menu_button = QtWidgets.QPushButton('add') self.delete_menu_button = QtWidgets.QPushButton('delete') self.add_menu_button.setProperty('class', 'add_button') self.delete_menu_button.setProperty('class', 'add_button') # self.save_menu_button = QtWidgets.QPushButton('save menu') # self.save_menu_button.setProperty('class', 'add_button') self.title_widget.hide() # layout the GUI title_widget_layout.addWidget(self.title_label) title_widget_layout.addWidget(self.add_menu_button) title_widget_layout.addWidget(self.delete_menu_button) title_widget_layout.addStretch(1) # title_widget_layout.addWidget(self.save_menu_button) grid_layout.addWidget(self.software_label, 0, 0) grid_layout.addWidget(self.software_combo, 0, 1) grid_layout.addWidget(self.new_software_button, 0, 2) grid_layout.addWidget(self.menu_type_label, 1, 0) grid_layout.addWidget(self.menu_type_combo, 1, 1) tool_bar.addLayout(grid_layout) tool_bar.addStretch(1) layout.addLayout(tool_bar) layout.addWidget(self.title_widget) layout.addLayout(menu_type_row) layout.addWidget(self.menus) # SIGNALS AND SLOTS self.add_menu_button.clicked.connect(self.on_add_menu_clicked) self.delete_menu_button.clicked.connect(self.on_delete_menu_clicked) self.new_software_button.clicked.connect(self.on_new_software_clicked) # Load the Menu Designer self.load_software() self.software_combo.currentIndexChanged.connect(self.update_menu_path) self.menu_type_combo.currentIndexChanged.connect(self.update_menu_path)