Ejemplo n.º 1
1
    def setupUi(self, SaveWindow):
        self.SavePath=""
        SaveWindow.setObjectName(_fromUtf8("SaveWindow"))
        SaveWindow.setSizePolicy(QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding))
        SaveWindow.setAcceptDrops(True)
        main_layout = QtGui.QHBoxLayout()
        SaveWindow.setLayout(main_layout)
        self.centralWidget = QtGui.QWidget(SaveWindow)
        main_layout.addWidget(self.centralWidget)
        self.centralWidget.setObjectName(_fromUtf8("centralWidget"))
        self.gridLayout_2 = QtGui.QGridLayout(self.centralWidget)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setSizeConstraint(QtGui.QLayout.SetNoConstraint)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))

# Path label and edit field
        self.PathLabel = QtGui.QLabel("Save path: ",self.centralWidget)
        self.gridLayout.addWidget(self.PathLabel,0,2,1,1)
        self.lineEdit = QtGui.QLineEdit(self.centralWidget)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(False)
        self.lineEdit.setFont(font)
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.gridLayout.addWidget(self.lineEdit, 0, 3, 1, 3)
        #print(QtGui.QMainWindow.findChild(QtGui.QMainWindow.QLabel,'RBEdit'))

# Prefix label and edit field
        self.PrefixLabel = QtGui.QLabel("Prefix: ",self.centralWidget)
        self.gridLayout.addWidget(self.PrefixLabel,0,6,1,1)
        self.lineEdit2 = QtGui.QLineEdit(self.centralWidget)
        self.lineEdit2.setFont(font)
        self.lineEdit2.setObjectName(_fromUtf8("lineEdit2"))
        self.gridLayout.addWidget(self.lineEdit2, 0, 7, 1, 2)

        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lineEdit.sizePolicy().hasHeightForWidth())
        self.lineEdit.setSizePolicy(sizePolicy)
        self.lineEdit2.setSizePolicy(sizePolicy)
        self.filterLabel = QtGui.QLabel("Filter: ",self.centralWidget)
        self.gridLayout.addWidget(self.filterLabel,1,2,1,1)
        self.filterEdit = QtGui.QLineEdit(self.centralWidget)
        self.filterEdit.setFont(font)
        self.filterEdit.setObjectName(_fromUtf8("filterEdit"))
        self.gridLayout.addWidget(self.filterEdit, 1, 3, 1, 1)

        self.regExCheckBox = QtGui.QCheckBox("RegEx", self.centralWidget)
        self.gridLayout.addWidget(self.regExCheckBox, 1, 4, 1, 1)

        self.LogsLabel = QtGui.QLabel("List of logged parameters: ",self.centralWidget)
        self.gridLayout.addWidget(self.LogsLabel,1,6,1,3)

        self.ListLabel = QtGui.QLabel("List of workspaces: ",self.centralWidget)

# List of workspaces
        self.listWidget = QtGui.QListWidget(self.centralWidget)
        self.listWidget.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth())

        self.workspacesLayout = QtGui.QBoxLayout(QtGui.QBoxLayout.TopToBottom)
        self.workspacesLayout.addWidget(self.ListLabel)
        self.workspacesLayout.addWidget(self.listWidget)
        self.gridLayout.addLayout(self.workspacesLayout,2,2,1,3)

# List of Logged Parameters
        self.listWidget2 = QtGui.QListWidget(self.centralWidget)
        self.listWidget2.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.listWidget.sizePolicy().hasHeightForWidth())
        self.gridLayout.addWidget(self.listWidget2, 2, 6, 1, 3)

        spacerItem = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 2, 5, 1, 1)
        spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        self.gridLayout.addItem(spacerItem1, 4, 2, 1, 1)
        spacerItem2 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem2, 2, 0, 1, 1)
        self.pushButton = QtGui.QPushButton(self.centralWidget)

# Save Title
        self.titleCheckBox = QtGui.QCheckBox("Title", self.centralWidget)
        #self.gridLayout.addWidget(self.titleCheckBox, 3, 6, 1, 1)

# Tab check box
        #self.tabCheckBox = QtGui.QCheckBox("tab", self.centralWidget)
        #self.gridLayout.addWidget(self.titleCheckBox, 3, 6, 1, 1)

# Comma check box
        #self.commaCheckBox = QtGui.QCheckBox("comma", self.centralWidget)
        #self.gridLayout.addWidget(self.commaCheckBox, 3, 6, 1, 1)


# Space check box
        #self.spaceCheckBox = QtGui.QCheckBox("space", self.centralWidget)
        #self.gridLayout.addWidget(self.commaCheckBox, 3, 6, 1, 1)

# Save XError
        self.xErrorCheckBox = QtGui.QCheckBox("Q resolution", self.centralWidget)
        #self.gridLayout.addWidget(self.xErrorCheckBox, 3, 7, 1, 1)

# separator
        #self.separatorLabel = QtGui.QLabel("Separator: ", self.centralWidget)
        #self.gridLayout.addWidget(self.separatorLabel,4,6,1,1)
        #self.separatorEdit = QtGui.QLineEdit(self.centralWidget)
        #self.separatorEdit.setObjectName(_fromUtf8("separatorEdit"))
        #self.gridLayout.addWidget(self.separatorEdit, 4, 7, 1, 1)

        self.groupBox = QtGui.QGroupBox("Custom format options")
        self.vbox = QtGui.QVBoxLayout()
        self.hbox = QtGui.QHBoxLayout()
        self.vbox.addWidget(self.titleCheckBox)
        self.vbox.addWidget(self.xErrorCheckBox)

        self.groupBox2 = QtGui.QGroupBox("Separator")
        #self.buttonGroup=QtGui.QButtonGroup("Separator:", self.groupBox)
        self.radio1=QtGui.QRadioButton("Comma", self.centralWidget)
        self.radio2=QtGui.QRadioButton("Space", self.centralWidget)
        self.radio3=QtGui.QRadioButton("Tab", self.centralWidget)

        self.radio1.setChecked(1)
        self.hbox.addWidget(self.radio1)
        self.hbox.addWidget(self.radio2)
        self.hbox.addWidget(self.radio3)
        self.groupBox2.setLayout(self.hbox)
        # self.hbox.addWidget(self.separatorLabel)
        # self.hbox.addWidget(self.commaCheckBox)
        # self.hbox.addWidget(self.spaceCheckBox)
        # self.hbox.addWidget(self.tabCheckBox)

        self.vbox.addWidget(self.groupBox2)
        self.vbox.addStretch(1)
        #self.groupBox.setCheckable(1)
        self.groupBox.setLayout(self.vbox)
        self.gridLayout.addWidget(self.groupBox, 3, 6, 3, 3)

# spectralist
        self.spectraLabel = QtGui.QLabel("Spectra list: ", self.centralWidget)
        self.gridLayout.addWidget(self.spectraLabel,4,2,1,1)
        self.spectraEdit = QtGui.QLineEdit(self.centralWidget)
        self.spectraEdit.setObjectName(_fromUtf8("spectraEdit"))
        self.gridLayout.addWidget(self.spectraEdit, 4, 3, 1, 1)

# file format selector
        self.fileFormatLabel = QtGui.QLabel("File format: ", self.centralWidget)
        self.gridLayout.addWidget(self.fileFormatLabel,5,2,1,1)
        self.comboBox = QtGui.QComboBox(self.centralWidget)
        self.comboBox.setToolTip("Please select the file format")
        self.comboBox.setStatusTip("Please select the file format")
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.comboBox.sizePolicy().hasHeightForWidth())
        self.comboBox.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setWeight(75)
        font.setBold(True)
        self.comboBox.setFont(font)
        self.comboBox.setObjectName(_fromUtf8("comboBox"))
        self.comboBox.addItem(_fromUtf8("Custom format (*.dat)"))
        self.comboBox.addItem(_fromUtf8("3 column (*.dat)"))
        self.comboBox.addItem(_fromUtf8("ANSTO, MotoFit, 4 column (*.txt)"))
        self.comboBox.addItem(_fromUtf8("ILL Cosmos (*.mft)"))
        self.gridLayout.addWidget(self.comboBox, 5, 3, 1, 1)

        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth())
        self.pushButton.setSizePolicy(sizePolicy)
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.gridLayout.addWidget(self.pushButton, 8, 2, 1, 1)
        spacerItem3 = QtGui.QSpacerItem(20, 28, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
        self.gridLayout.addItem(spacerItem3, 8, 3, 1, 1)
        self.pushButton_2 = QtGui.QPushButton(self.centralWidget)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButton_2.sizePolicy().hasHeightForWidth())
        self.pushButton_2.setSizePolicy(sizePolicy)
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
        self.gridLayout.addWidget(self.pushButton_2, 8, 4, 1, 1)

        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)

        self.retranslateUi(SaveWindow)
        self.populateList()
        #self.workspaceSelected()
        QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), self.buttonClickHandler1)
        QtCore.QObject.connect(self.pushButton_2, QtCore.SIGNAL(_fromUtf8("clicked()")), self.populateList)
        QtCore.QObject.connect(self.lineEdit, QtCore.SIGNAL(_fromUtf8("textChanged()")), self.setPath)
        QtCore.QObject.connect(self.filterEdit, QtCore.SIGNAL(_fromUtf8("textChanged(QString)")), self.filterWksp)
        QtCore.QObject.connect(self.listWidget, QtCore.SIGNAL(_fromUtf8("itemActivated(QListWidgetItem*)")), self.workspaceSelected)
     #   QtCore.QObject.connect(self.actionSave_table, QtCore.SIGNAL(_fromUtf8("triggered()")), self.saveDialog)
     #   QtCore.QObject.connect(self.actionLoad_table, QtCore.SIGNAL(_fromUtf8("triggered()")), self.loadDialog)
        QtCore.QMetaObject.connectSlotsByName(SaveWindow)
Ejemplo n.º 2
1
 def __init__(self):
     super(CategoryPanel, self).__init__()
     qtgui.Widget.__init__(self)
     self.layout = QtGui.QBoxLayout(QtGui.QBoxLayout.BottomToTop, self)
Ejemplo n.º 3
1
    def __init__(self,n,m, sq = 25, th = 2):

        super(Window, self).__init__()

        
        self.grid = CheckerBoard(10,10,20,2,[],[],[],[]); #tu musi coś być                
        #main layout
        self.layout = QtGui.QGridLayout();
        self.layout.addWidget(self.grid, 0,0);
        self.cw = QtGui.QWidget(self);
        self.cw.setLayout(self.layout);
        self.setCentralWidget(self.cw);

        #window central colum 
        self.cLayout = QtGui.QBoxLayout(2,self.cw); # 2 - top to bottom
        #creating board
        self.makeButton = MakeGridButton("Utwórz Planszę", self.cw);
        self.cLayout.addWidget(self.makeButton);
        self.heightEdit = QtGui.QLineEdit(self.cw);
        self.heightEdit.setInputMask("D9");
        self.heightEdit.insert("10");
        self.widthEdit = QtGui.QLineEdit(self.cw);
        self.widthEdit.setInputMask("D9");
        self.widthEdit.insert("10");
        self.sizeLayout = QtGui.QHBoxLayout(self.cw);
        self.sizeLayout.addWidget(self.heightEdit);
        self.sizeLayout.addWidget(self.widthEdit);
        self.cLayout.addLayout(self.sizeLayout);

        

        #Brushes
        self.brushesLayout = QtGui.QBoxLayout(2,self.cw);
        self.checkBoxGroup = QtGui.QButtonGroup(self.cw);
        self.brushesFrame = QtGui.QGroupBox(self.cw)    
        self.normalCell = QtGui.QCheckBox("Normalny", self.cw);
        self.normalCell.setChecked(1); #default brush
        self.obstacleCell = QtGui.QCheckBox("Przeszkoda",self.cw);
        self.materialCell = QtGui.QCheckBox("Surowiec",self.cw);

        self.checkBoxGroup.addButton(self.normalCell);
        self.checkBoxGroup.addButton(self.obstacleCell);
        self.checkBoxGroup.addButton(self.materialCell);
        self.checkBoxGroup.buttonClicked.connect(self.grid.setBrush); #to i tak jest robione przez przycisk, ale jest tam wywoływana też funkcja disconnect, więc jest potrzebne (pewnie się da bardziej elegancko)

        
        self.brushesLayout.addWidget(self.normalCell);
        self.brushesLayout.addWidget(self.obstacleCell);
        self.brushesLayout.addWidget(self.materialCell);
        self.brushesFrame.setLayout(self.brushesLayout);
        self.brushesFrame.setTitle("Pędzel");
        self.cLayout.addWidget(self.brushesFrame);

        #Path list
        self.pathList = PathList(self.cw);
        self.cLayout.addWidget(self.pathList);
        #path List controll buttons
        self.showButton = ShowPathButton("Pokaz", self.cw);
        self.hideButton = HidePathButton("Ukryj", self.cw);

        self.cLayout.addWidget(self.showButton);
        self.cLayout.addWidget(self.hideButton);

        #Stretch
        self.cLayout.addStretch();

        #control buttons
        #control buttons frame
        self.controlButLayout = QtGui.QBoxLayout(2, self.cw);
        self.controlButFrame = QtGui.QGroupBox(self.cw);
        self.controlButFrame.setTitle("Obsługa Plików");
        #loadButton
        self.loadButton = LoadButton("Wczytaj", self.cw);
        self.controlButLayout.addWidget(self.loadButton);
        #Save button
        self.saveButton = SaveButton("Zapisz", self.cw);
        self.controlButLayout.addWidget(self.saveButton);
        self.controlButFrame.setLayout(self.controlButLayout);
        self.cLayout.addWidget(self.controlButFrame);
        #Result name
        self.nameLabel = QtGui.QLabel("Nazwa Pliku Wynikowego");
        self.nameEdit = QtGui.QLineEdit("wyniki",self.cw);        
        self.cLayout.addWidget(self.nameLabel);
        self.cLayout.addWidget(self.nameEdit);


        #Margins in toolbar
        self.cLayout.setContentsMargins(20,50,50,40);


        #right colum - algorithm parameters
        self.rLayout = QtGui.QVBoxLayout(self.cw);

        self.paramLayout = QtGui.QVBoxLayout(self.cw);
        self.paramFrame = QtGui.QGroupBox(self.cw)    

        self.lPlatfromParam = ParamEdit("Liczba platform",self.cw);
        self.paramLayout.addWidget(self.lPlatfromParam);
        self.czasTrParam = ParamEdit("Czas trwania cyklu",self.cw);
        self.paramLayout.addWidget(self.czasTrParam);
        self.rozPopParam = ParamEdit("Rozmiar populacji",self.cw);
        self.paramLayout.addWidget(self.rozPopParam);
        self.lItParam = ParamEdit("Liczba iteracji",self.cw);
        self.paramLayout.addWidget(self.lItParam);
        self.lRParam = ParamEdit("Liczba r",self.cw);
        self.paramLayout.addWidget(self.lRParam);
        self.lRParam.hide(); ##DISABLED
        self.rozPopPoSelParam = ParamEdit("Rozmiar populacji po selekcji",self.cw);
        self.paramLayout.addWidget(self.rozPopPoSelParam);
        self.lOsElitParam = ParamEdit("Liczba osobników elitarnych",self.cw);
        self.paramLayout.addWidget(self.lOsElitParam);
        self.rTurnParam = ParamEdit("Rozmiar turnieju",self.cw);
        self.paramLayout.addWidget(self.rTurnParam);
        self.lOsZMut = ParamEdit("Liczba osobników z mutacji",self.cw);
        self.paramLayout.addWidget(self.lOsZMut);
        self.lOsZKrzyz = ParamEdit("Liczba osobników z krzyżowania",self.cw);
        self.paramLayout.addWidget(self.lOsZKrzyz);
        self.lGenDoMut = ParamEdit("Liczba genów do mutacji",self.cw);
        self.paramLayout.addWidget(self.lGenDoMut);
        
        self.paramFrame.setLayout(self.paramLayout);
        self.paramFrame.setTitle("Parametry Algorytmu Genetycznego");
        self.rLayout.addWidget(self.paramFrame);

        self.startAlgorithmButton = StartAlgorithmButton("Start", self.cw);
        self.rLayout.addWidget(self.startAlgorithmButton);
        self.animateButton = AnimateButton("Animuj", self.cw);
        self.rLayout.addWidget(self.animateButton);

        self.rLayout.setContentsMargins(20,50,50,40);

        #Sublayouts added to main layout

        self.layout.addLayout(self.cLayout, 0,1);
        self.layout.addLayout(self.rLayout, 0,2);
         
        self.show();
Ejemplo n.º 4
0
    def __init__(self,  parent=None,  flags = 0,  relative = False,  tabPreferiti = False):
        QtGui.QWidget.__init__(self)
        self.settings = MySettings(relative)
        self.setWindowTitle("Televideo - Opzioni")
        self.setFixedSize(350,  280)
        #tab bar
        self.tabs = QtGui.QTabWidget(self)
        pag1 = QtGui.QWidget()
        self.edizionePredefinita = QtGui.QCheckBox("&Avvia sempre su edizione nazionale")
        label = QtGui.QLabel("Pagina &iniziale")
        self.pagIniziale = QtGui.QSpinBox()
        self.pagIniziale.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.pagIniziale.setRange(100, 899)
        label.setBuddy(self.pagIniziale)
        labelEdizione = QtGui.QLabel("Scegli &edizione")
        self.edizione = QtGui.QComboBox()
        
        #carico edizioni. i nomi sono questi perché se no non trova i percorsi
        self.edizione.addItem("Nazionale")
        self.edizione.addItem("Abruzzo")
        self.edizione.addItem("Altoadige")
        self.edizione.addItem("Aosta")
        self.edizione.addItem("Basilicata")
        self.edizione.addItem("Calabria")
        self.edizione.addItem("Campania")        
        self.edizione.addItem("Emilia")
        self.edizione.addItem("Friuli")
        self.edizione.addItem("Lazio")
        self.edizione.addItem("Liguria")
        self.edizione.addItem("Lombardia")
        self.edizione.addItem("Marche")
        self.edizione.addItem("Molise")
        self.edizione.addItem("Piemonte")
        self.edizione.addItem("Puglia")
        self.edizione.addItem("Sardegna")
        self.edizione.addItem("Sicilia")
        self.edizione.addItem("Toscana")
        self.edizione.addItem("Trentino")
        self.edizione.addItem("Umbria")
        self.edizione.addItem("Veneto")
        labelEdizione.setBuddy(self.edizione)
        self.refreshAutomatico = QtGui.QCheckBox("A&ggiorna pagina ogni")
        self.intervalloRefreshAutomatico = QtGui.QSpinBox()
        self.intervalloRefreshAutomatico.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.intervalloRefreshAutomatico.setRange(15, 6000 )
        labelRefresh = QtGui.QLabel("&sec") 
        labelRefresh.setBuddy(self.intervalloRefreshAutomatico)
        QtCore.QObject.connect(self.refreshAutomatico, QtCore.SIGNAL('stateChanged (int)'), self.attivaIntervalloRefresh)
 
        layoutRefresh = QtGui.QHBoxLayout()
        layoutRefresh.addWidget(self.refreshAutomatico)
        layoutRefresh.addWidget(self.intervalloRefreshAutomatico)
        layoutRefresh.addWidget(labelRefresh) 
        
        layout = QtGui.QGridLayout(pag1)
        layout.addWidget(label,  0,  0)
        layout.addWidget(self.pagIniziale,  0,  1)
        layout.addWidget(self.edizionePredefinita,  2,  0,  1,   2)
        layout.addWidget(labelEdizione,  1,  0)
        layout.addWidget(self.edizione,  1,  1) 
        
        layout.addLayout(layoutRefresh,  3,  0,  1,  2)
        
        labelAzione = QtGui.QLabel("&Se pagina non trovata:")
        self.azione= QtGui.QComboBox()
        self.azione.addItem("Chiedi sempre")
        self.azione.addItem("Rimani su pagina corrente")
        self.azione.addItem("Cerca pagina successiva")
        labelAzione.setBuddy(self.azione)
        layout.addWidget(labelAzione,  4,  0)
        layout.addWidget(self.azione,  4,  1) 
        
        self.tabs.addTab(pag1,  "&Opzioni")
        
        pagCustomButtons = QtGui.QWidget()
        layoutCustomButtons = QtGui.QGridLayout(pagCustomButtons)
        label1 = QtGui.QLabel("Preferito &1")
        self.name1 = QtGui.QLineEdit()
        self.name1.setMaxLength(10)
        self.page1 = QtGui.QSpinBox()
        self.page1.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.page1.setRange(100,  899)
        label1.setBuddy(self.name1)
        layoutCustomButtons.addWidget(label1,  0,  0)
        layoutCustomButtons.addWidget(self.name1,  0,  1)
        layoutCustomButtons.addWidget(self.page1,  0,  2)
        label2 = QtGui.QLabel("Preferito &2")
        self.name2 = QtGui.QLineEdit()
        self.name2.setMaxLength(10)
        self.page2 = QtGui.QSpinBox()
        self.page2.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.page2.setRange(100,  899)
        label2.setBuddy(self.name2)
        layoutCustomButtons.addWidget(label2,  1,  0)
        layoutCustomButtons.addWidget(self.name2,  1,  1)
        layoutCustomButtons.addWidget(self.page2,  1,  2)
        label3 = QtGui.QLabel("Preferito &3")
        self.name3 = QtGui.QLineEdit()
        self.name3.setMaxLength(10)
        self.page3 = QtGui.QSpinBox()
        self.page3.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.page3.setRange(100,  899)
        label3.setBuddy(self.name3)
        layoutCustomButtons.addWidget(label3,  2,  0)
        layoutCustomButtons.addWidget(self.name3,  2,  1)
        layoutCustomButtons.addWidget(self.page3,  2,  2)
        label4 = QtGui.QLabel("Preferito &4")
        self.name4 = QtGui.QLineEdit()
        self.name4.setMaxLength(10)
        self.page4 = QtGui.QSpinBox()
        self.page4.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.page4.setRange(100,  899)
        label4.setBuddy(self.name4)
        layoutCustomButtons.addWidget(label4,  3,  0)
        layoutCustomButtons.addWidget(self.name4,  3,  1)
        layoutCustomButtons.addWidget(self.page4,  3,  2)
        label5 = QtGui.QLabel("Preferito &5")
        self.name5 = QtGui.QLineEdit()
        self.name5.setMaxLength(10)
        self.page5 = QtGui.QSpinBox()
        self.page5.setButtonSymbols(QtGui.QAbstractSpinBox.PlusMinus)
        self.page5.setRange(100,  899)
        label5.setBuddy(self.name5)
        layoutCustomButtons.addWidget(label5,  4,  0)
        layoutCustomButtons.addWidget(self.name5,  4,  1)
        layoutCustomButtons.addWidget(self.page5,  4,  2)
        self.tabs.addTab(pagCustomButtons,  "&Preferiti")
        
        #impostazioni proxy
        pagProxy = QtGui.QWidget()
        self.usaProxy = QtGui.QCheckBox("&Usa server proxy")
        labelProxy1 = QtGui.QLabel("&Host:Port")
        self.hostProxy = QtGui.QLineEdit()
        self.portProxy = QtGui.QLineEdit()
        validator = QtGui.QIntValidator(20,  65535,  pagProxy)
        self.portProxy.setValidator(validator)
        labelProxy1.setBuddy(self.hostProxy)
        layoutProxy = QtGui.QGridLayout(pagProxy)
        layoutProxy.addWidget(self.usaProxy,  0,  0,  1,  3)
        layoutProxy.addWidget(labelProxy1,  1,  0)
        layoutProxy.addWidget(self.hostProxy,  1,  1)
        layoutProxy.addWidget(self.portProxy, 1,  2)
        
        labelUsername = QtGui.QLabel("User&name: ")
        self.userName = QtGui.QLineEdit()
        labelPassword = QtGui.QLabel("Pass&word: ")
        self.password = QtGui.QLineEdit()
        self.password.setEchoMode(QtGui.QLineEdit.Password)
        labelUsername.setBuddy(self.userName)
        labelPassword.setBuddy(self.password)
        layoutProxy.addWidget(labelUsername,  2,  0)
        layoutProxy.addWidget(self.userName,  2,  1,  1,  2)
        layoutProxy.addWidget(labelPassword,  3,  0)
        layoutProxy.addWidget(self.password,  3,  1,  1,  2)
        
        labelWarning = QtGui.QLabel("<b>Attenzione</b>: le impostazioni di questa scheda saranno applicate solo al riavvio.<br />Se desideri usare il proxy definito nelle Opzioni di sistema, lascia deselezionato la casella Usa server proxy")
        labelWarning.setWordWrap(True)
        layoutProxy.addWidget(labelWarning,  4,  0,  1,  3)
        self.tabs.addTab(pagProxy,  "Pro&xy")
        QtCore.QObject.connect(self.usaProxy, QtCore.SIGNAL('stateChanged (int)'), self.selezioneProxy)
        
        #pagina riepilogo scorciatoie
        pagShortcuts = QtGui.QWidget()
        shortcuts1 = QtGui.QLabel("Pagina successiva\t")
        shortcuts2 = QtGui.QLabel("Ctrl +")
        shortcuts3 = QtGui.QLabel("Pagina precedente")
        shortcuts4 = QtGui.QLabel("Ctrl -")
        shortcuts5 = QtGui.QLabel("Sottopagina succ.")
        shortcuts6 = QtGui.QLabel("Alt +")
        shortcuts7 = QtGui.QLabel("Sottopagina prec.")
        shortcuts8 = QtGui.QLabel("Alt -")
        shortcuts9 = QtGui.QLabel("Pagina iniziale")
        shortcuts10 = QtGui.QLabel("Ctrl H")
        shortcuts11 = QtGui.QLabel("Preferito da 1 a 5")
        shortcuts12 = QtGui.QLabel("Ctrl 1 - 5")
        shortcuts13 = QtGui.QLabel("Salva pagina")
        shortcuts14 = QtGui.QLabel("Ctrl S")
        shortcuts15 = QtGui.QLabel("Aggiorna pagina")
        shortcuts16 = QtGui.QLabel("F5")
        shortcuts17 = QtGui.QLabel("Interrompi caricamento")
        shortcuts18 = QtGui.QLabel("Esc")
        layout3 = QtGui.QGridLayout(pagShortcuts)
        layout3.addWidget(shortcuts1,  0,  0)
        layout3.addWidget(shortcuts2,  0,  1)
        layout3.addWidget(shortcuts3,  1,  0)
        layout3.addWidget(shortcuts4,  1,  1)
        layout3.addWidget(shortcuts5,  2,  0)
        layout3.addWidget(shortcuts6,  2,  1)
        layout3.addWidget(shortcuts7,  3,  0)
        layout3.addWidget(shortcuts8,  3,  1)
        layout3.addWidget(shortcuts9,  4,  0)
        layout3.addWidget(shortcuts10,  4,  1)
        layout3.addWidget(shortcuts11,  5,  0)
        layout3.addWidget(shortcuts12,  5,  1)
        layout3.addWidget(shortcuts13,  6,  0)
        layout3.addWidget(shortcuts14,  6,  1)
        layout3.addWidget(shortcuts15,  7,  0)
        layout3.addWidget(shortcuts16,  7,  1)
        layout3.addWidget(shortcuts17,  8,  0)
        layout3.addWidget(shortcuts18,  8,  1)
        self.tabs.addTab(pagShortcuts,  "Scorcia&toie")
        
        #about
        pagAbout = QtGui.QWidget()
        about = QtGui.QLabel("<qt>Scritto per cazzeggio da <a href='mailto:[email protected]'>Andrea 'Klenje' Decorte</a>.  Thanks a <i>elpibe</i> e <i>ildiavolo</i> per idee e betatesting<br /><br />Released under GPL2 or later; icone dai temi CrystalSVG e Tango di KDEmod<br /><br /><a href='http://code.google.com/p/telenonvideo'>Sito ufficiale su Google Code</a></qt>")
        about.setFrameStyle(QtGui.QFrame.StyledPanel)
        about.setWordWrap(True)
        about.setAlignment(QtCore.Qt.AlignJustify)
        about.setOpenExternalLinks(True)
        layout2 = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight,  pagAbout)
        layout2.addWidget(about)
        self.tabs.addTab(pagAbout, "&About")
        
        buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Save | QtGui.QDialogButtonBox.Cancel,  QtCore.Qt.Horizontal)
        QtCore.QObject.connect(buttonBox, QtCore.SIGNAL('accepted()'), self.salvaOpzioni)
        QtCore.QObject.connect(buttonBox, QtCore.SIGNAL('rejected()'), self.reject)
        
        layoutTotale = QtGui.QVBoxLayout(self)
        layoutTotale.addWidget(self.tabs)
        layoutTotale.addWidget(buttonBox)
        
        #parametro per andare direttamente alla tab dei preferiti, se un pulsante non è configurato
        if tabPreferiti:
            self.showTabPreferiti()        
        
        self.caricaOpzioni()
    def __init__(self, parent=None, originatingWidget=None):

        QtGui.QFrame.__init__(self, parent)

        # print '\n\n\n\n\n CREATING NEW GRAPHICS FRAME WIDGET ',self

        # self.allowSaveLayout = True
        self.is_screenshot_widget = False
        self.qvtkWidget = QVTKRenderWindowInteractor(self)  # a QWidget

        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)

        # MDIFIX
        self.parentWidget = originatingWidget
        # self.parentWidget = parent

        self.plane = None
        self.planePos = None

        self.lineEdit = QtGui.QLineEdit()

        self.__initCrossSectionActions()
        self.cstb = self.initCrossSectionToolbar()

        layout = QtGui.QBoxLayout(QtGui.QBoxLayout.TopToBottom)
        layout.addWidget(self.cstb)
        layout.addWidget(self.qvtkWidget)
        self.setLayout(layout)
        self.setMinimumSize(
            100, 100)  #needs to be defined to resize smaller than 400x400
        self.resize(600, 600)

        self.qvtkWidget.Initialize()
        self.qvtkWidget.Start()

        self.ren = vtk.vtkRenderer()
        self.renWin = self.qvtkWidget.GetRenderWindow()
        self.renWin.AddRenderer(self.ren)

        #        print MODULENAME,"GraphicsFrameWidget():__init__:   parent=",parent

        #    some objects below create cyclic dependencies - the widget will not free its memory unless  in the close event e.g.  self.drawModel2D gets set to None
        # # # from weakref import ref

        # # # self_weakref=ref(self)
        # # # self.drawModel2D = MVCDrawModel2D(self_weakref,parent)
        # # # self.draw2D = MVCDrawView2D(self.drawModel2D,self_weakref,parent)

        # # # self.drawModel3D = MVCDrawModel3D(self_weakref,parent)
        # # # self.draw3D = MVCDrawView3D(self.drawModel3D,self_weakref,parent)

        # MDIFIX
        self.drawModel2D = MVCDrawModel2D(self, self.parentWidget)
        self.draw2D = MVCDrawView2D(self.drawModel2D, self, self.parentWidget)

        self.drawModel3D = MVCDrawModel3D(self, self.parentWidget)
        self.draw3D = MVCDrawView3D(self.drawModel3D, self, self.parentWidget)

        # self.drawModel2D = MVCDrawModel2D(self,parent)
        # self.draw2D = MVCDrawView2D(self.drawModel2D,self,parent)
        #
        # self.drawModel3D = MVCDrawModel3D(self,parent)
        # self.draw3D = MVCDrawView3D(self.drawModel3D,self,parent)

        # self.draw2D=Draw2D(self,parent)
        # self.draw3D=Draw3D(self,parent)
        self.camera3D = self.ren.MakeCamera()
        self.camera2D = self.ren.GetActiveCamera()
        self.ren.SetActiveCamera(self.camera2D)

        self.currentDrawingObject = self.draw2D

        self.draw3DFlag = False
        self.usedDraw3DFlag = False
        # self.getattrFcn=self.getattrDraw2D

        # rwh test
        #        print MODULENAME,' self.parentWidget.playerSettingsFileName= ',self.parentWidget.playerSettingsFileName
        if self.parentWidget.playerSettingsFileName:
            # does not work on Windows with Python 2.5
            # with open(self.parentWidget.playerSettingsFileName, 'r') as f:
            f = None
            try:
                f = open(self.parentWidget.playerSettingsFileName, 'r')
                while True:
                    l = f.readline()
                    if l == "": break
                    v = l.split()
                    print v
                    if string.find(v[0], 'CameraPosition') > -1:
                        self.camera3D.SetPosition(float(v[1]), float(v[2]),
                                                  float(v[3]))
                    elif string.find(v[0], 'CameraFocalPoint') > -1:
                        self.camera3D.SetFocalPoint(float(v[1]), float(v[2]),
                                                    float(v[3]))
                    elif string.find(v[0], 'CameraViewUp') > -1:
                        self.camera3D.SetViewUp(float(v[1]), float(v[2]),
                                                float(v[3]))
#                    elif string.find(v[0], 'ViewPlaneNormal') > -1:   # deprecated
#                        self.camera3D.SetViewPlaneNormal(float(v[1]), float(v[2]), float(v[3]))
                    elif string.find(v[0], 'CameraClippingRange') > -1:
                        self.camera3D.SetClippingRange(float(v[1]),
                                                       float(v[2]))
                    elif string.find(v[0], 'CameraDistance') > -1:
                        print 'SetDistance = ', float(v[1])
                        self.camera3D.SetDistance(float(v[1]))
                    elif string.find(v[0], 'ViewAngle') > -1:
                        self.camera3D.SetViewAngle(float(v[1]))

            except IOError:
                pass

        self.screenshotWindowFlag = False
Ejemplo n.º 6
0
    def __init__(self, *args, **kwargs):
        global uiIsBuildable
        if (uiIsBuildable == True):
            super(theWindow, self).__init__(*args, **kwargs)
            #PARENT WIDGET UNDER MAYA'S MAIN WINDOW
            self.setParent(get_maya_window())
            self.setWindowFlags(qtc.Qt.Window)
            #SET OPACITY
            self.setWindowOpacity(0.8)
            #SET NAME AND DIMENSIONS
            self.setGeometry(500, 300, width, height)
            self.setWindowTitle(officialTitle)
            #p = self.palette();
            #p.setColor(self.backgroundRole(), qt.blue);
            #self.setPalette(p);
            mainLayout = qt.QVBoxLayout()
            ###############################################################################
            #"""# TABS                                                                    #
            ###############################################################################
            tabs = qt.QTabWidget()
            characterTab = qt.QWidget()
            weaponTab = qt.QWidget()
            tabs.addTab(characterTab, "CHARACTER LIBRARY")
            tabs.addTab(weaponTab, "WEAPON LIBRARY")
            mainLayout.addWidget(tabs)
            importExportLayout = qt.QVBoxLayout()
            ###############################################################################
            #"""# CHARACTER WIDGETS                                                       #
            ###############################################################################
            self.characterLabel = qt.QLabel("FILTER:")
            self.characterEdit = qt.QLineEdit()
            ###############################################################################
            #"""# WEAPON WIDGETS                                                          #
            ###############################################################################
            self.weaponLabel = qt.QLabel("FILTER:")
            self.weaponEdit = qt.QLineEdit()
            ###############################################################################
            #"""# CHARACTER LIST WIDGETS                                                  #
            ###############################################################################
            tabName = "characters/"
            characterLibraryLayout = qt.QVBoxLayout()
            self.characterListWidget = qt.QListWidget()
            self.characterListWidget.setViewMode(qt.QListWidget.IconMode)
            self.characterListWidget.setDragEnabled(False)
            self.characterListWidget.setResizeMode(qt.QListView.Adjust)
            #ADD ITEMS TO GRID
            thumbnailSize = [130, 240]
            self.characterListWidget.setIconSize(
                qtc.QSize(thumbnailSize[0], thumbnailSize[1]))
            characterList = glob.glob(home + tabName + "*_CHAR.txt")
            i = 0
            while (i < len(characterList)):
                if (len(characterList[i]) > 0
                        and py.file(characterList[i], q=1, ex=1) == 1):
                    if (py.file(characterList[i].replace(".txt", ".png"),
                                q=1,
                                ex=1) == 1):
                        name = characterList[i].split("/")[-1].split(
                            ".")[0].split("_")[1]
                        thumbnailItem = qt.QListWidgetItem(name)

                        thumbnailItem.setSizeHint(
                            qtc.QSize(width / 3.45, height / 2.45))

                        thumbnailImage = qt.QIcon()
                        thumbnailImage.addPixmap(
                            qt.QPixmap(
                                _fromUtf8(characterList[i].replace(
                                    ".txt", ".png"))), qt.QIcon.Normal,
                            qt.QIcon.Off)
                        thumbnailItem.setIcon(thumbnailImage)
                        self.characterListWidget.addItem(thumbnailItem)
                i += 1
            self.characterLoadButton = qt.QPushButton("LOAD")
            self.characterLoadButton.clicked.connect(
                lambda: runLoadItem(self.characterListWidget, tabName, "CHAR"))
            self.characterEdit.textChanged.connect(lambda: runFilterList(
                self.characterListWidget, self.characterEdit, tabName, "CHAR"))
            ###############################################################################
            #"""# LAYOUT                                                                  #
            ###############################################################################
            divider = qt.QFrame()
            divider.setFrameShape(qt.QFrame.HLine)
            divider.setFrameShadow(qt.QFrame.Sunken)
            #HORIZONTAL LAYOUT: CHARACTER FILTER
            characterLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            characterLayout.addWidget(self.characterLabel)
            characterLayout.addWidget(self.characterEdit)
            #HORIZONTAL LAYOUT: WEAPON FILTER
            weaponLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            weaponLayout.addWidget(self.weaponLabel)
            weaponLayout.addWidget(self.weaponEdit)
            ###############################################################################
            #"""# ADD HORIZONTAL LAYOUTS TO CHARACTER LIBRARY TAB'S LAYOUT                #
            ###############################################################################
            characterLibraryLayout.addLayout(characterLayout)
            characterLibraryLayout.addWidget(self.characterListWidget)
            characterLibraryLayout.addWidget(self.characterLoadButton)
            ###############################################################################
            #"""# ADD HORIZONTAL LAYOUTS TO CHARACTER LIBRARY TAB'S LAYOUT                #
            ###############################################################################
            #weaponLibraryLayout.addLayout(weaponLayout);
            #weaponLibraryLayout.addWidget(self.weaponListWidget);
            #weaponLibraryLayout.addWidget(self.weaponLoadButton);
            ###############################################################################
            #"""# ADD TAB LAYOUTS TO THEIR CORRESPONDING TABS                             #
            ###############################################################################

            characterTab.setLayout(characterLibraryLayout)
            #weaponTab.setLayout(weaponLibraryLayout);

            self.setLayout(mainLayout)
Ejemplo n.º 7
0
    def __init__(self, *args, **kwargs):   
        global uiIsBuildable;
        global scaleVar
        if(uiIsBuildable == True):
            super(theWindow, self).__init__(*args, **kwargs);
            #PARENT WIDGET UNDER MAYA'S MAIN WINDOW       
            self.setParent(get_maya_window());  
            self.setWindowFlags(qtc.Qt.Window);
            self.setGeometry(500, 500, width, height);   
            self.setWindowTitle(officialTitle);
            mainLayout = qt.QVBoxLayout();
            self.setLayout(mainLayout);
            tabs = qt.QTabWidget();
            ############################################################
            #                        ADD TABS                          #
            ############################################################
            bipedTab	= qt.QWidget();
            bipedHandTab = qt.QWidget();
            quadrupedTab	= qt.QWidget();
            tabs.addTab(bipedTab, "BIPED");
            tabs.addTab(bipedHandTab, "BIPED HAND");
            tabs.addTab(quadrupedTab, "QUADRUPED");
            mainLayout.addWidget(tabs);
            ############################################################
            #                        ADD MAIN LAYOUTS                  #
            ############################################################
            bipedMidLayout = qt.QVBoxLayout();
            bipedHandLayout = qt.QVBoxLayout();
            quadrupedMidLayout = qt.QVBoxLayout();
            
            ############################################################
            #                        ADD IMAGE CALL                    #
            ############################################################
            tabs.setStyleSheet('QTabBar::tab:first {background-color: skyblue;}QTabWidget>QWidget{border-image: url("R:/Jx4/tools/dcc/maya/scripts/autoRigger/charPickerUI/pickerBackground.png");}')
            tabs.currentChanged.connect(lambda: setImage());

            ############################################################
            #                        ADD BUTTONS                       #
            ############################################################
            
            #  BIPED BUTTONS  #
            self.generateRigButton = qt.QPushButton("GENERATE RIG!")
            self.generateRigButton.setMaximumWidth(150)
            self.generateRigButton.setMinimumHeight(20)
            self.generateRigButton.setStyleSheet('QPushButton {backgroundColor: white;}QPushButton {color: black;}')
            
            self.optionsDropdown = qt.QComboBox()
            self.optionsDropdown.addItem("Adult")
            self.optionsDropdown.addItem("Child")
            self.optionsDropdown.addItem("Female")
            self.optionsDropdown.setStyleSheet('QComboBox {color: black;}')
            
            self.finishButton = qt.QPushButton("FINISHED PLACING JOINTS!")
            self.finishButton.setMaximumWidth(150)
            self.finishButton.setMinimumHeight(20)
            self.finishButton.setStyleSheet('QPushButton {backgroundColor: white;}QPushButton {color: black;}')
            self.headButton = qt.QPushButton("HEAD")
            self.headButton.setMaximumWidth(50)
            self.headButton.setMinimumHeight(50)
            self.headButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.neckButton = qt.QPushButton("NECK")
            self.neckButton.setMaximumWidth(40)
            self.neckButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.chestButton = qt.QPushButton("CHEST")
            self.chestButton.setMaximumWidth(100)
            self.chestButton.setMinimumHeight(30)
            self.chestButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.spine3Button = qt.QPushButton("SPINE 3")
            self.spine3Button.setMaximumWidth(50)
            self.spine3Button.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.spine2Button = qt.QPushButton("SPINE 2")
            self.spine2Button.setMaximumWidth(50)
            self.spine2Button.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.spine1Button = qt.QPushButton("SPINE 1")
            self.spine1Button.setMaximumWidth(50)
            self.spine1Button.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.rootButton = qt.QPushButton("ROOT")
            self.rootButton.setMaximumWidth(75)
            self.rootButton.setMinimumHeight(30)
            self.rootButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.clavButton = qt.QPushButton("CLAV")
            self.clavButton.setMaximumWidth(50)
            self.clavButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.shoulderButton = qt.QPushButton("SHOULDER")
            self.shoulderButton.setMaximumWidth(75)
            self.shoulderButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.elbowButton = qt.QPushButton("ELBOW")
            self.elbowButton.setMaximumWidth(50)
            self.elbowButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.wristButton = qt.QPushButton("WRIST")
            self.wristButton.setMaximumWidth(50)
            self.wristButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.thighButton = qt.QPushButton("THIGH")
            self.thighButton.setMaximumWidth(50)
            self.thighButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.kneeButton = qt.QPushButton("KNEE")
            self.kneeButton.setMaximumWidth(50)
            self.kneeButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.ankleButton = qt.QPushButton("ANKLE")
            self.ankleButton.setMaximumWidth(50)
            self.ankleButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.ballButton = qt.QPushButton("BALL")
            self.ballButton.setMaximumWidth(50)
            self.ballButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            
            #  HAND BUTTONS  #
            self.HBIndex1Button = qt.QPushButton("Index 1")
            self.HBIndex1Button.setMaximumWidth(50)
            self.HBIndex1Button.setMinimumWidth(50)
            self.HBIndex1Button.setStyleSheet('QPushButton {background-color: ivory;}QPushButton {color: black;}')
            self.HBIndex2Button = qt.QPushButton("Index 2")
            self.HBIndex2Button.setMaximumWidth(50)
            self.HBIndex2Button.setMinimumWidth(50)
            self.HBIndex2Button.setStyleSheet('QPushButton {background-color: ivory;}QPushButton {color: black;}')
            self.HBIndex3Button = qt.QPushButton("Index 3")
            self.HBIndex3Button.setMaximumWidth(50)
            self.HBIndex3Button.setMinimumWidth(50)
            self.HBIndex3Button.setStyleSheet('QPushButton {background-color: ivory;}QPushButton {color: black;}')
            self.HBMiddle1Button = qt.QPushButton("Middle 1")
            self.HBMiddle1Button.setMaximumWidth(50)
            self.HBMiddle1Button.setMinimumWidth(50)
            self.HBMiddle1Button.setStyleSheet('QPushButton {background-color: lightCyan;}QPushButton {color: black;}')
            self.HBMiddle2Button = qt.QPushButton("Middle 2")
            self.HBMiddle2Button.setMaximumWidth(50)
            self.HBMiddle2Button.setMinimumWidth(50)
            self.HBMiddle2Button.setStyleSheet('QPushButton {background-color: lightCyan;}QPushButton {color: black;}')
            self.HBMiddle3Button = qt.QPushButton("Middle 3")
            self.HBMiddle3Button.setMaximumWidth(50)
            self.HBMiddle3Button.setMinimumWidth(50)
            self.HBMiddle3Button.setStyleSheet('QPushButton {background-color: lightCyan;}QPushButton {color: black;}')
            self.HBRing1Button = qt.QPushButton("Ring 1")
            self.HBRing1Button.setMaximumWidth(50)
            self.HBRing1Button.setMinimumWidth(50)
            self.HBRing1Button.setStyleSheet('QPushButton {background-color: lightSalmon;}QPushButton {color: black;}')
            self.HBRing2Button = qt.QPushButton("Ring 2")
            self.HBRing2Button.setMaximumWidth(50)
            self.HBRing2Button.setMinimumWidth(50)
            self.HBRing2Button.setStyleSheet('QPushButton {background-color: lightSalmon;}QPushButton {color: black;}')
            self.HBRing3Button = qt.QPushButton("Ring 3")
            self.HBRing3Button.setMaximumWidth(50)
            self.HBRing3Button.setMinimumWidth(50)
            self.HBRing3Button.setStyleSheet('QPushButton {background-color: lightSalmon;}QPushButton {color: black;}')
            self.HBPinky1Button = qt.QPushButton("Pinky 1")
            self.HBPinky1Button.setMaximumWidth(50)
            self.HBPinky1Button.setMinimumWidth(50)
            self.HBPinky1Button.setStyleSheet('QPushButton {background-color: orchid;}QPushButton {color: black;}')
            self.HBPinky2Button = qt.QPushButton("Pinky 2")
            self.HBPinky2Button.setMaximumWidth(50)
            self.HBPinky2Button.setMinimumWidth(50)
            self.HBPinky2Button.setStyleSheet('QPushButton {background-color: orchid;}QPushButton {color: black;}')
            self.HBPinky3Button = qt.QPushButton("Pinky 3")
            self.HBPinky3Button.setMaximumWidth(50)
            self.HBPinky3Button.setMinimumWidth(50)
            self.HBPinky3Button.setStyleSheet('QPushButton {background-color: orchid;}QPushButton {color: black;}')
            self.HBThumb1Button = qt.QPushButton("Thumb 1")
            self.HBThumb1Button.setMaximumWidth(50)
            self.HBThumb1Button.setMinimumWidth(50)
            self.HBThumb1Button.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.HBThumb2Button = qt.QPushButton("Thumb 2")
            self.HBThumb2Button.setMaximumWidth(50)
            self.HBThumb2Button.setMinimumWidth(50)
            self.HBThumb2Button.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.HBThumb3Button = qt.QPushButton("Thumb 3")
            self.HBThumb3Button.setMaximumWidth(50)
            self.HBThumb3Button.setMinimumWidth(50)
            self.HBThumb3Button.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            
            #  QUADRUPED BUTTONS  #
            self.qGenerateRigButton = qt.QPushButton("GENERATE Q-RIG!")
            self.qGenerateRigButton.setMaximumWidth(150)
            self.qGenerateRigButton.setMinimumHeight(20)
            self.qGenerateRigButton.setStyleSheet('QPushButton {backgroundColor: gray;}QPushButton {color: black;}')
            
            self.qOptionsDropdown = qt.QComboBox()
            self.qOptionsDropdown.addItem("Horse")
            self.qOptionsDropdown.setStyleSheet('QComboBox {color: black;}')
            
            self.qFinishButton = qt.QPushButton("FINISHED PLACING Q-JOINTS!")
            self.qFinishButton.setMaximumWidth(150)
            self.qFinishButton.setMinimumHeight(20)
            self.qFinishButton.setStyleSheet('QPushButton {backgroundColor: gray;}QPushButton {color: black;}')
            self.qHeadButton = qt.QPushButton("HEAD")
            self.qHeadButton.setMaximumWidth(50)
            self.qHeadButton.setMinimumHeight(50)
            self.qHeadButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qNeckButton = qt.QPushButton("NECK")
            self.qNeckButton.setMaximumWidth(40)
            self.qNeckButton.setMinimumHeight(20)
            self.qNeckButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qNeckButton1 = qt.QPushButton("NECK1")
            self.qNeckButton1.setMaximumWidth(40)
            self.qNeckButton1.setMinimumHeight(20)
            self.qNeckButton1.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qNeckButton2 = qt.QPushButton("NECK2")
            self.qNeckButton2.setMaximumWidth(40)
            self.qNeckButton2.setMinimumHeight(20)
            self.qNeckButton2.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qChestButton = qt.QPushButton("CHEST")
            self.qChestButton.setMaximumWidth(100)
            self.qChestButton.setMinimumHeight(25)
            self.qChestButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qSpine3Button = qt.QPushButton("SPINE 3")
            self.qSpine3Button.setMaximumWidth(50)
            self.qSpine3Button.setMinimumHeight(25)
            self.qSpine3Button.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qSpine2Button = qt.QPushButton("SPINE 2")
            self.qSpine2Button.setMaximumWidth(50)
            self.qSpine2Button.setMinimumHeight(25)
            self.qSpine2Button.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qSpine1Button = qt.QPushButton("SPINE 1")
            self.qSpine1Button.setMaximumWidth(50)
            self.qSpine1Button.setMinimumHeight(25)
            self.qSpine1Button.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qRootButton = qt.QPushButton("PELVIS")
            self.qRootButton.setMaximumWidth(75)
            self.qRootButton.setMinimumHeight(25)
            self.qRootButton.setStyleSheet('QPushButton {background-color: yellow;}QPushButton {color: black;}')
            self.qShoulderButton = qt.QPushButton("SHOULDER")
            self.qShoulderButton.setMaximumWidth(80)
            self.qShoulderButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.qElbowButton = qt.QPushButton("ELBOW")
            self.qElbowButton.setMaximumWidth(50)
            self.qElbowButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.qWristButton = qt.QPushButton("WRIST")
            self.qWristButton.setMaximumWidth(50)
            self.qWristButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.qHandButton = qt.QPushButton("HAND")
            self.qHandButton.setMaximumWidth(50)
            self.qHandButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.qHandEndButton = qt.QPushButton("HAND END")
            self.qHandEndButton.setMaximumWidth(80)
            self.qHandEndButton.setStyleSheet('QPushButton {background-color: tomato;}QPushButton {color: black;}')
            self.qHipButton = qt.QPushButton("HIP")
            self.qHipButton.setMaximumWidth(50)
            self.qHipButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.qStifleButton = qt.QPushButton("STIFLE")
            self.qStifleButton.setMaximumWidth(50)
            self.qStifleButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.qHockButton = qt.QPushButton("HOCK")
            self.qHockButton.setMaximumWidth(50)
            self.qHockButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.qFetlockButton = qt.QPushButton("HIND FETLOCK")
            self.qFetlockButton.setMaximumWidth(80)
            self.qFetlockButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.qCoronetButton = qt.QPushButton("HIND CORONET")
            self.qCoronetButton.setMaximumWidth(100)
            self.qCoronetButton.setStyleSheet('QPushButton {background-color: skyblue;}QPushButton {color: black;}')
            self.qTailButton = qt.QPushButton("TAIL")
            self.qTailButton.setMaximumWidth(20)
            self.qTailButton.setMaximumHeight(20)
            self.qTailButton.setStyleSheet('QPushButton {background-color: red;}QPushButton {color: black;}')
            self.qTailButton1 = qt.QPushButton("TAIL1")
            self.qTailButton1.setMaximumWidth(20)
            self.qTailButton1.setMaximumHeight(20)
            self.qTailButton1.setStyleSheet('QPushButton {background-color: red;}QPushButton {color: black;}')
            self.qTailButton2 = qt.QPushButton("TAIL2")
            self.qTailButton2.setMaximumWidth(20)
            self.qTailButton2.setMaximumHeight(20)
            self.qTailButton2.setStyleSheet('QPushButton {background-color: red;}QPushButton {color: black;}')
            self.qTailButton3 = qt.QPushButton("TAIL3")
            self.qTailButton3.setMaximumWidth(20)
            self.qTailButton3.setMaximumHeight(20)
            self.qTailButton3.setStyleSheet('QPushButton {background-color: red;}QPushButton {color: black;}')
            self.qTailButton4 = qt.QPushButton("TAIL4")
            self.qTailButton4.setMaximumWidth(20)
            self.qTailButton4.setMaximumHeight(20)
            self.qTailButton4.setStyleSheet('QPushButton {background-color: red;}QPushButton {color: black;}')
            self.qTailButton5 = qt.QPushButton("TAIL5")
            self.qTailButton5.setMaximumWidth(20)
            self.qTailButton5.setMaximumHeight(20)
            self.qTailButton5.setStyleSheet('QPushButton {background-color: red;}QPushButton {color: black;}')

            
            ############################################################
            #                        ADD DIVIDER                       #
            ############################################################
            
            #    BIPED DIVIDERS    #
            chestDivider = qt.QFrame();
            chestDivider.setFrameShape(qt.QFrame.HLine);
            chestDivider.setMaximumWidth(55)
            chestDivider.setFrameShadow(qt.QFrame.Sunken);
            
            spine3Divider = qt.QFrame();
            spine3Divider.setFrameShape(qt.QFrame.HLine);
            spine3Divider.setMaximumWidth(70)
            spine3Divider.setFrameShadow(qt.QFrame.Sunken);
            
            spine1Divider = qt.QFrame();
            spine1Divider.setFrameShape(qt.QFrame.HLine);
            spine1Divider.setMaximumWidth(40)
            spine1Divider.setFrameShadow(qt.QFrame.Sunken);
            
            legDivider = qt.QFrame();
            legDivider.setFrameShape(qt.QFrame.HLine);
            legDivider.setMaximumWidth(40)
            legDivider.setFrameShadow(qt.QFrame.Sunken);
            
            legDivider1 = qt.QFrame();
            legDivider1.setFrameShape(qt.QFrame.HLine);
            legDivider1.setMaximumWidth(50)
            
            legDivider2 = qt.QFrame();
            legDivider2.setFrameShape(qt.QFrame.HLine);
            legDivider2.setMaximumWidth(30)
            
            verticalDivider = qt.QFrame()
            verticalDivider.setFrameShape(qt.QFrame.VLine)
            verticalDivider.setMaximumHeight(50)
            
            armDivider = qt.QFrame();
            armDivider.setFrameShape(qt.QFrame.HLine);
            armDivider.setMaximumWidth(55)
            
            armDivider1 = qt.QFrame();
            armDivider1.setFrameShape(qt.QFrame.HLine);
            armDivider1.setMaximumWidth(55)
            
            armDivider2 = qt.QFrame();
            armDivider2.setFrameShape(qt.QFrame.HLine);
            armDivider2.setMaximumWidth(25)
            
            utilDivider = qt.QFrame()
            utilDivider.setFrameShape(qt.QFrame.HLine)
            
            #    HAND DIVIDERS    #
            handDivider = qt.QFrame();
            handDivider.setFrameShape(qt.QFrame.HLine);
            handDivider.setMaximumHeight(50)
            handDivider1 = qt.QFrame();
            handDivider1.setFrameShape(qt.QFrame.HLine);
            handDivider1.setMaximumHeight(10)
            handDivider2 = qt.QFrame();
            handDivider2.setFrameShape(qt.QFrame.HLine);
            handDivider2.setMaximumHeight(5)
            handDivider3 = qt.QFrame();
            handDivider3.setFrameShape(qt.QFrame.HLine);
            handDivider3.setMaximumHeight(5)
            
            handDivider4 = qt.QFrame();
            handDivider4.setFrameShape(qt.QFrame.HLine);
            handDivider4.setMaximumHeight(30)
            handDivider5 = qt.QFrame();
            handDivider5.setFrameShape(qt.QFrame.HLine);
            handDivider5.setMaximumHeight(10)
            handDivider6 = qt.QFrame();
            handDivider6.setFrameShape(qt.QFrame.HLine);
            handDivider6.setMaximumHeight(5)
            handDivider7 = qt.QFrame();
            handDivider7.setFrameShape(qt.QFrame.HLine);
            handDivider7.setMaximumHeight(5)
            
            
            #    QUADRUPED DIVIDERS    #
            headSpacer = qt.QFrame();
            headSpacer.setFrameShape(qt.QFrame.HLine);
            headSpacer.setMaximumWidth(300)
            headSpacer1 = qt.QFrame();
            headSpacer1.setFrameShape(qt.QFrame.HLine);
            headSpacer1.setMaximumWidth(75)
            
            neck1Spacer = qt.QFrame();
            neck1Spacer.setFrameShape(qt.QFrame.HLine);
            neck1Spacer.setMaximumWidth(225)
            neck1Spacer1 = qt.QFrame();
            neck1Spacer1.setFrameShape(qt.QFrame.HLine);
            neck1Spacer1.setMaximumWidth(225)
            
            neck2Spacer = qt.QFrame();
            neck2Spacer.setFrameShape(qt.QFrame.HLine);
            neck2Spacer.setMaximumWidth(250)
            neck2Spacer1 = qt.QFrame();
            neck2Spacer1.setFrameShape(qt.QFrame.HLine);
            neck2Spacer1.setMaximumWidth(200)
            
            neck3Spacer = qt.QFrame();
            neck3Spacer.setFrameShape(qt.QFrame.HLine);
            neck3Spacer.setMaximumWidth(275)
            neck3Spacer1 = qt.QFrame();
            neck3Spacer1.setFrameShape(qt.QFrame.HLine);
            neck3Spacer1.setMaximumWidth(175)
            
            qVerticalSpacer = qt.QFrame();
            qVerticalSpacer.setFrameShape(qt.QFrame.VLine);
            qVerticalSpacer.setMaximumWidth(50)
            
            qVerticalSpacer1 = qt.QFrame();
            qVerticalSpacer1.setFrameShape(qt.QFrame.VLine);
            qVerticalSpacer1.setMaximumWidth(5)
            
            qSpineSpacer = qt.QFrame();
            qSpineSpacer.setFrameShape(qt.QFrame.HLine);
            qSpineSpacer.setMaximumWidth(75)
            qSpineSpacer1 = qt.QFrame();
            qSpineSpacer1.setFrameShape(qt.QFrame.HLine);
            qSpineSpacer1.setMaximumWidth(150)
            
            qHipShoulderSpacer = qt.QFrame();
            qHipShoulderSpacer.setFrameShape(qt.QFrame.HLine);
            qHipShoulderSpacer.setMaximumWidth(25)
            qHipShoulderSpacer1 = qt.QFrame();
            qHipShoulderSpacer1.setFrameShape(qt.QFrame.HLine);
            qHipShoulderSpacer1.setMaximumWidth(150)
            
            qHockWristSpacer = qt.QFrame();
            qHockWristSpacer.setFrameShape(qt.QFrame.HLine);
            qHockWristSpacer.setMaximumWidth(25)
            qHockWristSpacer1 = qt.QFrame();
            qHockWristSpacer1.setFrameShape(qt.QFrame.HLine);
            qHockWristSpacer1.setMaximumWidth(150)
            
            qFetlockHandSpacer = qt.QFrame();
            qFetlockHandSpacer.setFrameShape(qt.QFrame.HLine);
            qFetlockHandSpacer.setMaximumWidth(25)
            qFetlockHandSpacer1 = qt.QFrame();
            qFetlockHandSpacer1.setFrameShape(qt.QFrame.HLine);
            qFetlockHandSpacer1.setMaximumWidth(150)
            
            qCoronetHandEndSpacer = qt.QFrame();
            qCoronetHandEndSpacer.setFrameShape(qt.QFrame.HLine);
            qCoronetHandEndSpacer.setMaximumWidth(5)
            qCoronetHandEndSpacer1 = qt.QFrame();
            qCoronetHandEndSpacer1.setFrameShape(qt.QFrame.HLine);
            qCoronetHandEndSpacer1.setMaximumWidth(150)
            
            qUtilDivider = qt.QFrame()
            qUtilDivider.setFrameShape(qt.QFrame.HLine)
            
            qhnDivider = qt.QFrame()
            qhnDivider.setFrameShape(qt.QFrame.VLine)
            
            ############################################################
            #                        BUTTON COMMANDS                   #
            ############################################################
            #   BIPED BUTTONS   #
            self.generateRigButton.clicked.connect(lambda: runVisScript("first"))
            self.finishButton.clicked.connect(lambda: runVisScript("second"))
            self.headButton.clicked.connect(lambda: runButton("obj_loc_head_joint"));
            self.neckButton.clicked.connect(lambda: runButton("obj_loc_neck_joint"));
            self.chestButton.clicked.connect(lambda: runButton("obj_loc_chest_joint"));
            self.spine3Button.clicked.connect(lambda: runButton("obj_loc_spine_3_joint"));
            self.spine2Button.clicked.connect(lambda: runButton("obj_loc_spine_2_joint"));
            self.spine1Button.clicked.connect(lambda: runButton("obj_loc_spine_1_joint"));
            self.rootButton.clicked.connect(lambda: runButton("obj_loc_root_joint"));
            self.clavButton.clicked.connect(lambda: runButton("obj_loc_L_clav_joint"));
            self.shoulderButton.clicked.connect(lambda: runButton("obj_loc_L_shoulder_joint"))
            self.elbowButton.clicked.connect(lambda: runButton("obj_loc_L_elbow_joint"))
            self.wristButton.clicked.connect(lambda: runButton("obj_loc_L_hand_joint"))
            self.thighButton.clicked.connect(lambda: runButton("obj_loc_L_thigh_joint"))
            self.kneeButton.clicked.connect(lambda: runButton("obj_loc_L_knee_joint"))
            self.ankleButton.clicked.connect(lambda: runButton("obj_loc_L_ankle_joint"))
            self.ballButton.clicked.connect(lambda: runButton("obj_loc_L_ball_joint"))
            self.optionsDropdown.activated.connect(lambda: selectionChanged())
            self.qOptionsDropdown.activated.connect(lambda: qSelectionChanged())
            
            #  HAND BUTTONS  #
            self.HBIndex1Button.clicked.connect(lambda: runButton("obj_loc_L_index_joint_3"));
            self.HBIndex2Button.clicked.connect(lambda: runButton("obj_loc_L_index_joint_2"));
            self.HBIndex3Button.clicked.connect(lambda: runButton("obj_loc_L_index_joint_1"));
            self.HBMiddle1Button.clicked.connect(lambda: runButton("obj_loc_L_middle_joint_3"));
            self.HBMiddle2Button.clicked.connect(lambda: runButton("obj_loc_L_middle_joint_2"));
            self.HBMiddle3Button.clicked.connect(lambda: runButton("obj_loc_L_middle_joint_1"));
            self.HBRing1Button.clicked.connect(lambda: runButton("obj_loc_L_ring_joint_3"));
            self.HBRing2Button.clicked.connect(lambda: runButton("obj_loc_L_ring_joint_2"));
            self.HBRing3Button.clicked.connect(lambda: runButton("obj_loc_L_ring_joint_1"));
            self.HBPinky1Button.clicked.connect(lambda: runButton("obj_loc_L_pinkie_joint_3"));
            self.HBPinky2Button.clicked.connect(lambda: runButton("obj_loc_L_pinkie_joint_2"));
            self.HBPinky3Button.clicked.connect(lambda: runButton("obj_loc_L_pinkie_joint_1"));
            self.HBThumb1Button.clicked.connect(lambda: runButton("obj_loc_L_thumb_joint_3"));
            self.HBThumb2Button.clicked.connect(lambda: runButton("obj_loc_L_thumb_joint_2"));
            self.HBThumb3Button.clicked.connect(lambda: runButton("obj_loc_L_thumb_joint_1"));
            
            #   QUADRUPED BUTTONS    #
            self.qGenerateRigButton.clicked.connect(lambda: runVisScript("third"));
            self.qFinishButton.clicked.connect(lambda: runVisScript("fourth"));
            self.qHeadButton.clicked.connect(lambda: runButton("obj_loc_head_joint"));
            self.qNeckButton.clicked.connect(lambda: runButton("obj_loc_neck_joint"));
            self.qNeckButton1.clicked.connect(lambda: runButton("obj_loc_neck_1_joint"));
            self.qNeckButton2.clicked.connect(lambda: runButton("obj_loc_neck_2_joint"));
            self.qChestButton.clicked.connect(lambda: runButton("obj_loc_chest_joint"));
            self.qSpine3Button.clicked.connect(lambda: runButton("obj_loc_spine_3_joint"));
            self.qSpine2Button.clicked.connect(lambda: runButton("obj_loc_spine_2_joint"));
            self.qSpine1Button.clicked.connect(lambda: runButton("obj_loc_spine_1_joint"));
            self.qRootButton.clicked.connect(lambda: runButton("obj_loc_root_joint"));
            self.qShoulderButton.clicked.connect(lambda: runButton("obj_loc_L_shoulder_joint"));
            self.qElbowButton.clicked.connect(lambda: runButton("obj_loc_L_elbow_joint"));
            self.qWristButton.clicked.connect(lambda: runButton("obj_loc_L_knee_joint"));
            self.qHandButton.clicked.connect(lambda: runButton("obj_loc_L_frontFetlock_joint"));
            self.qHandEndButton.clicked.connect(lambda: runButton("obj_loc_L_frontCoronet_joint"));
            self.qHipButton.clicked.connect(lambda: runButton("obj_loc_L_hip_joint"));
            self.qStifleButton.clicked.connect(lambda: runButton("obj_loc_L_stifle_joint"));
            self.qHockButton.clicked.connect(lambda: runButton("obj_loc_L_hock_joint"));
            self.qFetlockButton.clicked.connect(lambda: runButton("obj_loc_L_hindFetlock_joint"));
            self.qCoronetButton.clicked.connect(lambda: runButton("obj_loc_L_hindCoronet_joint"));
            self.qTailButton.clicked.connect(lambda: runButton("obj_loc_tail_joint"));
            self.qTailButton1.clicked.connect(lambda: runButton("obj_loc_tail1_joint"));
            self.qTailButton2.clicked.connect(lambda: runButton("obj_loc_tail2_joint"));
            self.qTailButton3.clicked.connect(lambda: runButton("obj_loc_tail3_joint"));
            self.qTailButton4.clicked.connect(lambda: runButton("obj_loc_tail4_joint"));
            self.qTailButton5.clicked.connect(lambda: runButton("obj_loc_tail5_joint"));
            
            ############################################################
            #                        ADD LAYOUTS                       #
            ############################################################
            
            #    BIPED LAYOUTS    # 
            generateRigLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            generateRigLayout.addWidget(self.generateRigButton)
            generateRigLayout.addWidget(utilDivider)
            generateRigLayout.addWidget(self.optionsDropdown)
            
            finishedLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            finishedLayout.addWidget(self.finishButton)
            finishedLayout.addWidget(utilDivider)
            
            headButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight);
            headButtonLayout.addWidget(self.headButton);
            
            neckButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            neckButtonLayout.addWidget(self.neckButton)
            
            chestButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            chestButtonLayout.addWidget(chestDivider)
            chestButtonLayout.addWidget(chestDivider)
            chestButtonLayout.addWidget(chestDivider)
            chestButtonLayout.addWidget(self.chestButton)
            chestButtonLayout.addWidget(self.clavButton)
            chestButtonLayout.addWidget(chestDivider)
            chestButtonLayout.addWidget(armDivider)
            
            spine3ButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            spine3ButtonLayout.addWidget(spine3Divider)
            spine3ButtonLayout.addWidget(spine3Divider)
            spine3ButtonLayout.addWidget(self.spine3Button)
            spine3ButtonLayout.addWidget(self.shoulderButton)
            spine3ButtonLayout.addWidget(armDivider1)
            
            spine2ButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            spine2ButtonLayout.addWidget(chestDivider)
            spine2ButtonLayout.addWidget(chestDivider)
            spine2ButtonLayout.addWidget(self.spine2Button)
            spine2ButtonLayout.addWidget(self.elbowButton)
            spine2ButtonLayout.addWidget(armDivider1)
            
            spine1ButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            spine1ButtonLayout.addWidget(spine1Divider)
            spine1ButtonLayout.addWidget(spine1Divider)
            spine1ButtonLayout.addWidget(self.spine1Button)
            spine1ButtonLayout.addWidget(self.wristButton)
            spine1ButtonLayout.addWidget(armDivider2)
            
            rootButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            rootButtonLayout.addWidget(self.rootButton)
            
            thighButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            thighButtonLayout.addWidget(legDivider)
            thighButtonLayout.addWidget(legDivider)
            thighButtonLayout.addWidget(self.thighButton)
            thighButtonLayout.addWidget(legDivider1)
            
            kneeButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            kneeButtonLayout.addWidget(legDivider)
            kneeButtonLayout.addWidget(legDivider)
            kneeButtonLayout.addWidget(self.kneeButton)
            kneeButtonLayout.addWidget(legDivider2)
            
            ankleButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            ankleButtonLayout.addWidget(legDivider)
            ankleButtonLayout.addWidget(legDivider)
            ankleButtonLayout.addWidget(self.ankleButton)
            ankleButtonLayout.addWidget(legDivider2)
            
            ballButtonLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            ballButtonLayout.addWidget(legDivider)
            ballButtonLayout.addWidget(legDivider)
            ballButtonLayout.addWidget(self.ballButton)
            ballButtonLayout.addWidget(legDivider2)
            
            #    HAND LAYOUTS    #
            '''
            HBThumbLayout = qt.QBoxLayout(qt.QBoxLayout.TopToBottom)
            HBThumbLayout.addWidget(handDivider)
            HBThumbLayout.addWidget(self.HBThumb1Button)
            HBThumbLayout.addWidget(self.HBThumb2Button)
            HBThumbLayout.addWidget(self.HBThumb3Button)
            HBIndexLayout = qt.QBoxLayout(qt.QBoxLayout.TopToBottom)
            HBIndexLayout.addWidget(self.HBIndex1Button)
            HBIndexLayout.addWidget(self.HBIndex2Button)
            HBIndexLayout.addWidget(self.HBIndex3Button)
            HBIndexLayout.addWidget(handDivider1)
            HBMiddleLayout = qt.QBoxLayout(qt.QBoxLayout.TopToBottom)
            HBMiddleLayout.addWidget(self.HBMiddle1Button)
            HBMiddleLayout.addWidget(self.HBMiddle2Button)
            HBMiddleLayout.addWidget(self.HBMiddle3Button)
            HBRingLayout = qt.QBoxLayout(qt.QBoxLayout.TopToBottom)
            HBRingLayout.addWidget(self.HBRing1Button)
            HBRingLayout.addWidget(self.HBRing2Button)
            HBRingLayout.addWidget(self.HBRing3Button)
            HBPinkyLayout = qt.QBoxLayout(qt.QBoxLayout.TopToBottom)
            HBPinkyLayout.addWidget(self.HBPinky1Button)
            HBPinkyLayout.addWidget(self.HBPinky2Button)
            HBPinkyLayout.addWidget(self.HBPinky3Button)
            '''
            
            HTopLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            HTopLayout.addWidget(handDivider)
            HTopLayout.addWidget(handDivider)
            HTopLayout.addWidget(self.HBIndex1Button)
            HTopLayout.addWidget(handDivider2)
            HTopLayout.addWidget(self.HBMiddle1Button)
            HTopLayout.addWidget(handDivider3)
            HTopLayout.addWidget(self.HBRing1Button)
            HTopLayout.addWidget(handDivider1)
            HTopLayout.addWidget(handDivider1)
            
            HTopLayout1 = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            HTopLayout1.addWidget(handDivider)
            HTopLayout1.addWidget(handDivider)
            HTopLayout1.addWidget(handDivider)
            HTopLayout1.addWidget(handDivider)
            HTopLayout1.addWidget(handDivider)
            HTopLayout1.addWidget(handDivider)
            HTopLayout1.addWidget(self.HBIndex2Button)
            HTopLayout1.addWidget(handDivider2)
            HTopLayout1.addWidget(handDivider2)
            HTopLayout1.addWidget(self.HBMiddle2Button)
            HTopLayout1.addWidget(handDivider2)
            HTopLayout1.addWidget(handDivider2)
            HTopLayout1.addWidget(self.HBRing2Button)
            HTopLayout1.addWidget(handDivider1)
            HTopLayout1.addWidget(handDivider1)
            HTopLayout1.addWidget(self.HBPinky1Button)
            HTopLayout1.addWidget(handDivider1)
            HTopLayout1.addWidget(handDivider1)

            
            
            HTopLayout2 = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            HTopLayout2.addWidget(handDivider7)
            HTopLayout2.addWidget(self.HBThumb1Button)
            HTopLayout2.addWidget(handDivider4)
            HTopLayout2.addWidget(handDivider4)
            HTopLayout2.addWidget(self.HBIndex3Button)
            HTopLayout2.addWidget(handDivider5)
            HTopLayout2.addWidget(self.HBMiddle3Button)
            HTopLayout2.addWidget(handDivider5)
            HTopLayout2.addWidget(self.HBRing3Button)
            HTopLayout2.addWidget(handDivider6)
            HTopLayout2.addWidget(self.HBPinky2Button)
            HTopLayout2.addWidget(handDivider7)
            HTopLayout2.addWidget(handDivider7)
            HTopLayout2.addWidget(handDivider7)
            
            HTopLayout3 = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            HTopLayout3.addWidget(handDivider1)
            HTopLayout3.addWidget(self.HBThumb2Button)
            HTopLayout3.addWidget(handDivider)
            HTopLayout3.addWidget(handDivider)
            HTopLayout3.addWidget(handDivider)
            HTopLayout3.addWidget(self.HBPinky3Button)
            HTopLayout3.addWidget(handDivider1)
            HTopLayout3.addWidget(handDivider1)
            
            HTopLayout4 = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            HTopLayout4.addWidget(handDivider3)
            HTopLayout4.addWidget(self.HBThumb3Button)
            HTopLayout4.addWidget(handDivider)
            HTopLayout4.addWidget(handDivider)
            HTopLayout4.addWidget(handDivider)
            
            
            #    QUADRUPED LAYOUTS    #
            qGenerateRigLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qGenerateRigLayout.addWidget(self.qGenerateRigButton)
            qGenerateRigLayout.addWidget(qUtilDivider)
            qGenerateRigLayout.addWidget(self.qOptionsDropdown)
            
            qFinishedLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qFinishedLayout.addWidget(self.qFinishButton)
            qFinishedLayout.addWidget(qUtilDivider)
            
            qSpineChainLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qSpineChainLayout.addWidget(qSpineSpacer)
            qSpineChainLayout.addWidget(self.qRootButton)
            qSpineChainLayout.addWidget(self.qSpine1Button)
            qSpineChainLayout.addWidget(self.qSpine2Button)
            qSpineChainLayout.addWidget(self.qSpine3Button)
            qSpineChainLayout.addWidget(qSpineSpacer1)
            
            qHeadLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qHeadLayout.addWidget(headSpacer)
            qHeadLayout.addWidget(headSpacer)
            qHeadLayout.addWidget(headSpacer)
            qHeadLayout.addWidget(self.qHeadButton)
            qHeadLayout.addWidget(headSpacer1)
            
            qNeck3Layout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qNeck3Layout.addWidget(neck3Spacer)
            qNeck3Layout.addWidget(neck3Spacer)
            qNeck3Layout.addWidget(neck3Spacer)
            qNeck3Layout.addWidget(self.qNeckButton2)
            qNeck3Layout.addWidget(neck3Spacer1)

            
            qNeck2Layout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qNeck2Layout.addWidget(neck2Spacer)
            qNeck2Layout.addWidget(neck2Spacer)
            qNeck2Layout.addWidget(neck2Spacer)
            qNeck2Layout.addWidget(self.qNeckButton1)
            qNeck2Layout.addWidget(neck2Spacer1)

            qNeck1Layout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qNeck1Layout.addWidget(neck1Spacer)
            qNeck1Layout.addWidget(neck1Spacer)
            qNeck1Layout.addWidget(neck1Spacer)
            qNeck1Layout.addWidget(self.qNeckButton)
            qNeck1Layout.addWidget(neck1Spacer1)
            
            qHLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qHLayout.addWidget(neck2Spacer)
            qHLayout1 = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qHLayout1.addWidget(neck2Spacer)
            qHLayout2 = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qHLayout2.addWidget(neck2Spacer)
            
            qShoulderHipLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qShoulderHipLayout.addWidget(qHipShoulderSpacer)
            qShoulderHipLayout.addWidget(self.qHipButton)
            qShoulderHipLayout.addWidget(qHipShoulderSpacer1)
            qShoulderHipLayout.addWidget(self.qShoulderButton)
            qShoulderHipLayout.addWidget(qHipShoulderSpacer)
            
            qStifleElbowLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qStifleElbowLayout.addWidget(self.qStifleButton)
            qStifleElbowLayout.addWidget(self.qElbowButton)
            
            qHockWristLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qHockWristLayout.addWidget(self.qHockButton)
            qHockWristLayout.addWidget(qHockWristSpacer1)
            qHockWristLayout.addWidget(self.qWristButton)
            qHockWristLayout.addWidget(qHockWristSpacer)
            
            qFetlockHandLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qFetlockHandLayout.addWidget(self.qFetlockButton)
            qFetlockHandLayout.addWidget(qFetlockHandSpacer1)
            qFetlockHandLayout.addWidget(self.qHandButton)
            qFetlockHandLayout.addWidget(qFetlockHandSpacer)
            
            qCoronetHandEndLayout = qt.QBoxLayout(qt.QBoxLayout.LeftToRight)
            qCoronetHandEndLayout.addWidget(qCoronetHandEndSpacer)
            qCoronetHandEndLayout.addWidget(self.qCoronetButton)
            qCoronetHandEndLayout.addWidget(qCoronetHandEndSpacer1)
            qCoronetHandEndLayout.addWidget(self.qHandEndButton)
            qCoronetHandEndLayout.addWidget(qCoronetHandEndSpacer)
            qCoronetHandEndLayout.addWidget(qCoronetHandEndSpacer)

            ############################################################
            #                        SET LAYOUTS                       #
            ############################################################
            
            #    BIPED LAYOUTS    #
            #bipedMidLayout.addWidget(verticalDivider)
            bipedMidLayout.addLayout(generateRigLayout)
            bipedMidLayout.addLayout(finishedLayout)
            bipedMidLayout.addLayout(headButtonLayout)
            bipedMidLayout.addLayout(neckButtonLayout)
            bipedMidLayout.addLayout(chestButtonLayout)
            bipedMidLayout.addLayout(spine3ButtonLayout)
            bipedMidLayout.addLayout(spine2ButtonLayout)
            bipedMidLayout.addLayout(spine1ButtonLayout)
            bipedMidLayout.addLayout(rootButtonLayout)
            bipedMidLayout.addLayout(thighButtonLayout)
            bipedMidLayout.addWidget(verticalDivider)
            bipedMidLayout.addLayout(kneeButtonLayout)
            bipedMidLayout.addWidget(verticalDivider)
            bipedMidLayout.addLayout(ankleButtonLayout)
            bipedMidLayout.addLayout(ballButtonLayout)
            
            #    HAND LAYOUTS    #
            bipedHandLayout.addWidget(handDivider)
            bipedHandLayout.addLayout(HTopLayout)
            bipedHandLayout.addLayout(HTopLayout1)
            bipedHandLayout.addLayout(HTopLayout2)
            bipedHandLayout.addLayout(HTopLayout3)
            bipedHandLayout.addLayout(HTopLayout4)
            bipedHandLayout.addWidget(handDivider)
            
            
            
            
            #    QUADRUPEED LAYOUTS    #
            quadrupedMidLayout.addLayout(qGenerateRigLayout)
            quadrupedMidLayout.addLayout(qFinishedLayout)
            quadrupedMidLayout.addWidget(qVerticalSpacer)
            quadrupedMidLayout.addLayout(qHeadLayout)
            quadrupedMidLayout.addLayout(qNeck3Layout)
            quadrupedMidLayout.addLayout(qNeck2Layout)
            quadrupedMidLayout.addLayout(qNeck1Layout)
            quadrupedMidLayout.addLayout(qHLayout)
            quadrupedMidLayout.addLayout(qSpineChainLayout)
            quadrupedMidLayout.addLayout(qHLayout1)
            quadrupedMidLayout.addLayout(qShoulderHipLayout)
            quadrupedMidLayout.addWidget(qVerticalSpacer)
            quadrupedMidLayout.addLayout(qStifleElbowLayout)
            quadrupedMidLayout.addWidget(qVerticalSpacer)
            quadrupedMidLayout.addLayout(qHockWristLayout)
            quadrupedMidLayout.addWidget(qVerticalSpacer)
            quadrupedMidLayout.addLayout(qFetlockHandLayout)
            quadrupedMidLayout.addLayout(qHLayout2)
            quadrupedMidLayout.addLayout(qCoronetHandEndLayout)
            quadrupedMidLayout.addWidget(qVerticalSpacer)
            
            ############################################################
            #                SET LAYOUTS TO MAIN LAYOUT                #
            ############################################################
            bipedTab.setLayout(bipedMidLayout);
            bipedHandTab.setLayout(bipedHandLayout);
            quadrupedTab.setLayout(quadrupedMidLayout);
            
            ############################################################
            #                        FUNCTIONS                         #
            ############################################################
            
            def checkTab():
                return tabs.currentIndex()
                
            def setImage():
                if checkTab() == 0:
                    tabs.setStyleSheet('QTabBar::tab:first {background-color: skyblue;}QTabWidget>QWidget{border-image: url("R:/Jx4/tools/dcc/maya/scripts/autoRigger/charPickerUI/pickerBackground.png");}')
                elif checkTab() == 1:
                    tabs.setStyleSheet('QTabBar::tab:middle {background-color: green;}QTabWidget>QWidget{border-image: url("R:/Jx4/tools/dcc/maya/scripts/autoRigger/charPickerUI/handImage.png");}')
                else:
                    tabs.setStyleSheet('QTabBar::tab:last {background-color: tomato;}QTabWidget>QWidget{border-image: url("R:/Jx4/tools/dcc/maya/scripts/autoRigger/charPickerUI/horseAdult1.png");}')

            def selectionChanged():
                print "Items in the list are :"
            	global scaleVar
                for count in range(self.optionsDropdown.count()):
                    print self.optionsDropdown.itemText(count)
                print "Current index",i,"selection changed ",self.optionsDropdown.currentText()
                scaleVar = self.optionsDropdown.currentText()
                print scaleVar
            def qSelectionChanged():
                print "Items in the list are :"
            	global scaleVar
                for count in range(self.optionsDropdown.count()):
                    print self.qOptionsDropdown.itemText(count)
                print "Current index",i,"selection changed ",self.qOptionsDropdown.currentText()
                scaleVar = self.qOptionsDropdown.currentText()
                print scaleVar