Exemplo n.º 1
0
    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())
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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)
Exemplo n.º 4
0
 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)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 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)
Exemplo n.º 9
0
    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)
Exemplo n.º 10
0
 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)