def createMenu(self): """ Creates a new menu with the given name. """ name, accepted = QInputDialog.getText(self, 'Create Menu', 'Name: ') if (accepted): self.addMenuItem(self.createMenuItem(name), self.uiMenuTREE.currentItem())
def splitHorizontalAdvanced(self): panel = self.currentPanel() if panel is None: return count, accepted = QInputDialog.getInt(None, 'Split Horizontal', 'Number of Columns:', 2, 2) if accepted: panel.splitHorizontal(count)
def renameMenu(self): """ Prompts the user to supply a new name for the menu. """ item = self.uiMenuTREE.currentItem() name, accepted = QInputDialog.getText(self, 'Rename Menu', 'Name:', QLineEdit.Normal, item.text(0)) if (accepted): item.setText(0, name)
def createMenu( self ): """ Creates a new menu with the given name. """ name, accepted = QInputDialog.getText( self, 'Create Menu', 'Name: ') if ( accepted ): self.addMenuItem(self.createMenuItem(name), self.uiMenuTREE.currentItem())
def saveProfileAs( self ): """ Saves the current profile as a new profile to the manager. """ name, ok = QInputDialog.getText(self, 'Create Profile', 'Name:') if ( not name ): return manager = self.parent() prof = manager.viewWidget().saveProfile() prof.setName(nativestring(name)) self.parent().addProfile(prof)
def saveProfileAs(self): """ Saves the current profile as a new profile to the manager. """ name, ok = QInputDialog.getText(self, 'Create Profile', 'Name:') if (not name): return manager = self.parent() prof = manager.viewWidget().saveProfile() prof.setName(nativestring(name)) self.parent().addProfile(prof)
def renameMenu( self ): """ Prompts the user to supply a new name for the menu. """ item = self.uiMenuTREE.currentItem() name, accepted = QInputDialog.getText( self, 'Rename Menu', 'Name:', QLineEdit.Normal, item.text(0)) if ( accepted ): item.setText(0, name)
def renamePanel(self): """ Prompts the user for a custom name for the current panel tab. """ index = self._currentPanel.currentIndex() title = self._currentPanel.tabText(index) new_title, accepted = QInputDialog.getText(self, 'Rename Tab', 'Name:', QLineEdit.Normal, title) if accepted: widget = self._currentPanel.currentView() widget.setWindowTitle(new_title) self._currentPanel.setTabText(index, new_title)
def renamePanel(self): """ Prompts the user for a custom name for the current panel tab. """ index = self._currentPanel.currentIndex() title = self._currentPanel.tabText(index) new_title, accepted = QInputDialog.getText( self, 'Rename Tab', 'Name:', QLineEdit.Normal, title ) if accepted: widget = self._currentPanel.currentView() widget.setWindowTitle(new_title) self._currentPanel.setTabText(index, new_title)