Exemplo n.º 1
0
    def __init__(self, rootWidget, partList):
        QtGui.QWidget.__init__(self, ctx.mainScreen)
        self.ui = Ui_autoPartQuestion()
        self.ui.setupUi(self)
        self.setStyleSheet("""
                QFrame#mainFrame {
                    background-image: url(:/gui/pics/transBlack.png);
                    border: 1px solid #BBB;
                    border-radius:8px;
                }
                QWidget#autoPartQuestion {
                    background-image: url(:/gui/pics/trans.png);
                }
        """)

        self.rootWidget = rootWidget

        self.connect(self.ui.bestChoice, SIGNAL("clicked()"),
                     self.slotDisableList)
        self.connect(self.ui.cancelButton, SIGNAL("clicked()"),
                     self.slotCancelSelected)
        self.connect(self.ui.userChoice, SIGNAL("clicked()"),
                     self.slotEnableList)
        self.connect(self.ui.useSelectedButton, SIGNAL("clicked()"),
                     self.slotUseSelected)

        for part in partList:
            pi = PartitionItem(self.ui.partition_list, part)

        self.ui.partition_list.setCurrentRow(0)
        self.ui.bestChoice.toggle()
        self.slotDisableList()
        self.resize(ctx.mainScreen.size())
Exemplo n.º 2
0
class AutoPartQuestionWidget(QtGui.QWidget):
    def __init__(self, rootWidget, partList):
        QtGui.QWidget.__init__(self, ctx.mainScreen)
        self.ui = Ui_autoPartQuestion()
        self.ui.setupUi(self)
        self.setStyleSheet("""
                QFrame#mainFrame {
                    background-image: url(:/gui/pics/transBlack.png);
                    border: 1px solid #BBB;
                    border-radius:8px;
                }
                QWidget#autoPartQuestion {
                    background-image: url(:/gui/pics/trans.png);
                }
        """)

        self.rootWidget = rootWidget

        self.connect(self.ui.bestChoice, SIGNAL("clicked()"),
                     self.slotDisableList)
        self.connect(self.ui.cancelButton, SIGNAL("clicked()"),
                     self.slotCancelSelected)
        self.connect(self.ui.userChoice, SIGNAL("clicked()"),
                     self.slotEnableList)
        self.connect(self.ui.useSelectedButton, SIGNAL("clicked()"),
                     self.slotUseSelected)

        for part in partList:
            pi = PartitionItem(self.ui.partition_list, part)

        self.ui.partition_list.setCurrentRow(0)
        self.ui.bestChoice.toggle()
        self.slotDisableList()
        self.resize(ctx.mainScreen.size())

    def slotEnableList(self):
        self.ui.partition_list.setEnabled(True)

    def slotDisableList(self):
        self.rootWidget.autoPartPartition = self.ui.partition_list.item(
            0).getPartition()
        self.ui.partition_list.setEnabled(False)

    def slotUseSelected(self):
        self.hide()
        if self.ui.partition_list.isEnabled():
            self.rootWidget.autoPartPartition = self.ui.partition_list.currentItem(
            ).getPartition()
        ctx.mainScreen.processEvents()
        self.rootWidget.execute_(True)

    def slotCancelSelected(self):
        self.hide()
        ctx.mainScreen.enableNext()
Exemplo n.º 3
0
class AutoPartQuestionWidget(QtGui.QWidget):
    def __init__(self, rootWidget, partList):
        QtGui.QWidget.__init__(self, ctx.mainScreen)
        self.ui = Ui_autoPartQuestion()
        self.ui.setupUi(self)
        self.setStyleSheet(
            """
                QFrame#mainFrame {
                    background-image: url(:/gui/pics/transBlack.png);
                    border: 1px solid #BBB;
                    border-radius:8px;
                }
                QWidget#autoPartQuestion {
                    background-image: url(:/gui/pics/trans.png);
                }
        """
        )

        self.rootWidget = rootWidget

        self.connect(self.ui.bestChoice, SIGNAL("clicked()"), self.slotDisableList)
        self.connect(self.ui.cancelButton, SIGNAL("clicked()"), self.slotCancelSelected)
        self.connect(self.ui.userChoice, SIGNAL("clicked()"), self.slotEnableList)
        self.connect(self.ui.useSelectedButton, SIGNAL("clicked()"), self.slotUseSelected)

        for part in partList:
            pi = PartitionItem(self.ui.partition_list, part)

        self.ui.partition_list.setCurrentRow(0)
        self.ui.bestChoice.toggle()
        self.slotDisableList()
        self.resize(ctx.mainScreen.size())

    def slotEnableList(self):
        self.ui.partition_list.setEnabled(True)

    def slotDisableList(self):
        self.rootWidget.autoPartPartition = self.ui.partition_list.item(0).getPartition()
        self.ui.partition_list.setEnabled(False)

    def slotUseSelected(self):
        self.hide()
        if self.ui.partition_list.isEnabled():
            self.rootWidget.autoPartPartition = self.ui.partition_list.currentItem().getPartition()
        ctx.mainScreen.processEvents()
        self.rootWidget.execute_(True)

    def slotCancelSelected(self):
        self.hide()
        ctx.mainScreen.enableNext()
Exemplo n.º 4
0
    def __init__(self, rootWidget, partList):
        QtGui.QWidget.__init__(self, ctx.mainScreen)
        self.ui = Ui_autoPartQuestion()
        self.ui.setupUi(self)
        self.setStyleSheet(
            """
                QFrame#mainFrame {
                    background-image: url(:/gui/pics/transBlack.png);
                    border: 1px solid #BBB;
                    border-radius:8px;
                }
                QWidget#autoPartQuestion {
                    background-image: url(:/gui/pics/trans.png);
                }
        """
        )

        self.rootWidget = rootWidget

        self.connect(self.ui.bestChoice, SIGNAL("clicked()"), self.slotDisableList)
        self.connect(self.ui.cancelButton, SIGNAL("clicked()"), self.slotCancelSelected)
        self.connect(self.ui.userChoice, SIGNAL("clicked()"), self.slotEnableList)
        self.connect(self.ui.useSelectedButton, SIGNAL("clicked()"), self.slotUseSelected)

        for part in partList:
            pi = PartitionItem(self.ui.partition_list, part)

        self.ui.partition_list.setCurrentRow(0)
        self.ui.bestChoice.toggle()
        self.slotDisableList()
        self.resize(ctx.mainScreen.size())