Пример #1
0
 def set_controls(self, updated_files):
     for to_update in updated_files:
         item = QListWidgetItem('[%s] %s' % to_update)
         item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
         #if to_update[0] == "U":
         #    item.setCheckState(Qt.Unchecked)
         #else:
         item.setCheckState(Qt.Checked)
         self.ui.listFiles.addItem(item)
Пример #2
0
 def set_controls(self, updated_files):
     for to_update in updated_files:
         item = QListWidgetItem('[%s] %s' % to_update)
         item.setFlags(item.flags() | Qt.ItemIsUserCheckable)
         #if to_update[0] == "U":
         #    item.setCheckState(Qt.Unchecked)
         #else:
         item.setCheckState(Qt.Checked)
         self.ui.listFiles.addItem(item)
Пример #3
0
 def _add_task(self, title, checked):
     """ inserts a task at the beginning of the ui.taskList widget """
     item = QListWidgetItem()
     item.setText(title)
     if checked:
         item.setCheckState(Qt.Checked)
     else:
         item.setCheckState(Qt.Unchecked)
     self.ui.taskList.insertItem(0, item)
Пример #4
0
 def createWidgets(self):
     self.listWidget = QListWidget()
     for row, (gid, name) in enumerate(self.state.model.normalGroups()):
         item = QListWidgetItem(name)
         item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsUserCheckable |
                       Qt.ItemIsEnabled)
         item.setBackground(self.palette().base() if row % 2 else
                            self.palette().alternateBase())
         item.setCheckState(Qt.Unchecked)
         item.setData(Qt.UserRole, gid)
         item.setIcon(QIcon(":/groups.svg"))
         self.listWidget.addItem(item)
     self.tooltips.append((self.listWidget, "List of Normal Groups"))
     self.buttons = QDialogButtonBox(QDialogButtonBox.Ok |
                                     QDialogButtonBox.Cancel)
Пример #5
0
 def secondPage(self):
     
     for i in range( self.mainLayout.count() ):
         item = self.mainLayout.itemAt(0)
         item.widget().setParent( None )
     
     title = QLabel( "설치할 플러그인을 선택하십시오.".decode( 'utf-8' ) )
     title.setFixedHeight( 50 )
     
     listWidget = QListWidget()
     listWidget.setFixedHeight( 273 )
     widgetItem_for2015 = QListWidgetItem("PingoTools for Maya2015", listWidget )
     widgetItem_for2016 = QListWidgetItem("PingoTools for Maya2016", listWidget )
     widgetItem_for2017 = QListWidgetItem("PingoTools for Maya2017", listWidget )
     
     widgetItem_for2015.setCheckState( QtCore.Qt.Checked )
     widgetItem_for2016.setCheckState( QtCore.Qt.Checked )
     widgetItem_for2017.setCheckState( QtCore.Qt.Checked )
     #widgetItem_for2015.setFlags( not QtCore.Qt.ItemIsSelectable )
     
     buttonsWidget = QWidget(); buttonsWidget.setMaximumHeight( 50 )
     buttonsLayout = QHBoxLayout( buttonsWidget )
     emptyArea = QLabel()
     buttonBack = QPushButton( 'Back < ' )
     buttonNext = QPushButton( 'Install' )
     buttonCancel = QPushButton( 'Cancel' )
     buttonsLayout.addWidget( emptyArea )
     buttonsLayout.addWidget( buttonBack ); buttonBack.setFixedWidth( 100 )
     buttonsLayout.addWidget( buttonNext ); buttonNext.setFixedWidth( 100 )
     buttonsLayout.addWidget( buttonCancel ); buttonCancel.setFixedWidth( 100 )
     
     self.mainLayout.addWidget( title )
     self.mainLayout.addWidget( listWidget )
     self.mainLayout.addWidget( buttonsWidget )
     
     QtCore.QObject.connect( buttonBack, QtCore.SIGNAL( 'clicked()' ), self.firstPage )
     QtCore.QObject.connect( buttonNext, QtCore.SIGNAL( 'clicked()' ), self.lastPage )
     QtCore.QObject.connect( buttonCancel, QtCore.SIGNAL( 'clicked()' ), self.cmd_cancel )