예제 #1
0
파일: ScrWelcome.py 프로젝트: Tayyib/uludag
class Widget(QtGui.QWidget, ScreenWidget):
    title = _("Welcome to Pardus")
    # FIXME: Use system's pardus release to gather version info and use it if needed
    help = _("""
<font size="+2">Welcome</font>
<font size="+1"><p>Pardus offers many easy-to-use tools for your desktop. The first of all, is this application which will help you to install Pardus easily.</p>
<p>After you accept General Public License (GPL), and please read it as it guarantees <strong>your freedom</strong>, you can start installation steps, where you can choose which disk/partition to use, your username/password etc. then Pardus will be configure your hardware and be installed.</p>
<p>We strongly suggest you to backup your data before starting.</p>
</font>
""")

    def __init__(self, *args):
        QtGui.QWidget.__init__(self,None)
        self.ui = Ui_WelcomeWidget()
        self.ui.setupUi(self)

        self.connect(self.ui.not_accept, SIGNAL("toggled(bool)"),
                     self.slotNotAcceptToggled)

        self.connect(self.ui.accept, SIGNAL("toggled(bool)"),
                     self.slotAcceptToggled)

        self.connect(self.ui.rebootButton, SIGNAL("clicked()"),
                     self.slotReboot)

        self.connect(self.ui.gplButton, SIGNAL("clicked()"),
                     self.showGPL)

    def slotAcceptToggled(self, b):
        if b:
            self.__enable_next(True)

    def slotNotAcceptToggled(self, b):
        if b:
            self.__enable_next(False)

    def __enable_next(self, b):
        if b:
            ctx.mainScreen.enableNext()
        else:
            ctx.mainScreen.disableNext()

    def showGPL(self):
        # make a GPL dialog
        d = Dialog("GPL", Gpl(self), self)
        d.resize(500,400)
        d.exec_()

    def slotReboot(self):
        yali.sysutils.ejectCdrom()
        yali.sysutils.reboot()

    def shown(self):
        ctx.mainScreen.disableBack()
        if self.ui.accept.isChecked():
            ctx.mainScreen.enableNext()
        else:
            ctx.mainScreen.disableNext()
        ctx.mainScreen.processEvents()
예제 #2
0
파일: ScrWelcome.py 프로젝트: Tayyib/uludag
    def __init__(self, *args):
        QtGui.QWidget.__init__(self,None)
        self.ui = Ui_WelcomeWidget()
        self.ui.setupUi(self)

        self.connect(self.ui.accept, SIGNAL("toggled(bool)"),
                     self.slotAcceptToggled)

        self.connect(self.ui.gplButton, SIGNAL("clicked()"),
                     self.showGPL)
예제 #3
0
파일: ScrWelcome.py 프로젝트: Tayyib/uludag
class Widget(QtGui.QWidget, ScreenWidget):
    title = _("Welcome to Pardus 2011 Alpha2")
    # FIXME: Use system's pardus release to gather version info and use it if needed
    icon = "applications-other"
    help = _("""
<p>Welcome to Pardus that contains many easy-to-use software components. You can do everything you need to, including, but not limited to, connecting to the Internet, creating documents, playing games, listening to music using Pardus.</p>
<p>This application will help you with the installation of Pardus to your computer in few and easy steps and then do what is necessary to identify and configure your hardware. We advise you to backup your data in your disk(s) before starting with the installation.</p>
<p>You can start the installation process (and step in on a free world) by pressing the Next button.</p>
""")

    def __init__(self, *args):
        QtGui.QWidget.__init__(self,None)
        self.ui = Ui_WelcomeWidget()
        self.ui.setupUi(self)

        self.connect(self.ui.accept, SIGNAL("toggled(bool)"),
                     self.slotAcceptToggled)

        self.connect(self.ui.gplButton, SIGNAL("clicked()"),
                     self.showGPL)

    def slotAcceptToggled(self, state):
        if state:
            ctx.mainScreen.enableNext()
        else:
            ctx.mainScreen.disableNext()

    def showGPL(self):
        d = Dialog("GPL", LicenseBrowser(self), self)
        d.resize(500,400)
        d.exec_()

    def shown(self):
        ctx.mainScreen.disableBack()
        if self.ui.accept.isChecked():
            ctx.mainScreen.enableNext()
        else:
            ctx.mainScreen.disableNext()
        ctx.mainScreen.processEvents()