Пример #1
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)

        self.setWindowTitle('Puma')
        self.setWindowIcon(QtGui.QIcon(":/icons/icons/manager.png"))

        screen = QtGui.QDesktopWidget().screenGeometry()
        size = self.geometry()
        self.move((screen.width() - size.width()) / 2,
                  (screen.height() - size.height()) / 2)

        self.ifc = Interface()
Пример #2
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)

        self.setWindowTitle('Puma')
        self.setWindowIcon(QtGui.QIcon(":/icons/icons/manager.png"))

        screen = QtGui.QDesktopWidget().screenGeometry()
        size = self.geometry()
        self.move((screen.width() - size.width()) / 2, (screen.height() - size.height()) / 2)

        self.ifc = Interface()
Пример #3
0
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)

        self.setWindowTitle('Puma')
        self.setWindowIcon(QtGui.QIcon(":/icons/icons/manager.png"))

        screen = QtGui.QDesktopWidget().screenGeometry()
        size = self.geometry()
        self.move((screen.width() - size.width()) / 2,
                  (screen.height() - size.height()) / 2)

        self.ifc = Interface()

    @QtCore.pyqtSignature("bool")
    def on_actionQt_About_triggered(self):
        QtGui.QMessageBox.aboutQt(self)

    @QtCore.pyqtSignature("bool")
    def on_pushButton_clicked(self):
        print self.ifc.adslstart()

    @QtCore.pyqtSignature("bool")
    def on_pushButton_2_clicked(self):
        self.close()

    @QtCore.pyqtSignature("bool")
    def on_actionExit_triggered(self):
        app.exit()

    @QtCore.pyqtSignature("bool")
    def on_actionAbout_triggered(self):
        KAboutApplicationDialog(aboutData, self).show()

    @QtCore.pyqtSignature("bool")
    def on_actionSave_triggered(self):
        self.ifc.saveconf()

    QtCore.pyqtSignature("bool")

    def on_actionHelp_triggered(self):
        QtGui.QMessageBox.question(
            self,
            QtGui.QApplication.translate("MainWindow", "Help Puma"),
            QtGui.QApplication.translate(
                "MainWindow",
                "Authors :\n Cihan Okyay <*****@*****.**>\n\n Project page :\n https://sourceforge.net/projects/pumaproject/\n\n Source code : https://pumaproject.svn.sourceforge.net/svnroot/pumaproject/\n\n  Usage :\n http://pumaproject.sourceforge.net/"
            ),
        )

    @QtCore.pyqtSignature("bool")
    def on_actionDisconnect_triggered(self):
        self.ifc.adslstop()
Пример #4
0
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.setupUi(self)

        self.setWindowTitle('Puma')
        self.setWindowIcon(QtGui.QIcon(":/icons/icons/manager.png"))

        screen = QtGui.QDesktopWidget().screenGeometry()
        size = self.geometry()
        self.move((screen.width() - size.width()) / 2, (screen.height() - size.height()) / 2)

        self.ifc = Interface()

    @QtCore.pyqtSignature("bool")
    def on_actionQt_About_triggered(self):
        QtGui.QMessageBox.aboutQt(self)

    @QtCore.pyqtSignature("bool")
    def on_pushButton_clicked(self):
        print self.ifc.adslstart()

    @QtCore.pyqtSignature("bool")
    def on_pushButton_2_clicked(self):
        self.close()

    @QtCore.pyqtSignature("bool")
    def on_actionExit_triggered(self):
        app.exit()

    @QtCore.pyqtSignature("bool")
    def on_actionAbout_triggered(self):
        KAboutApplicationDialog(aboutData, self).show()

    @QtCore.pyqtSignature("bool")
    def on_actionSave_triggered(self):
        self.ifc.saveconf()


    QtCore.pyqtSignature("bool")
    def on_actionHelp_triggered(self):
        QtGui.QMessageBox.question(self,
                QtGui.QApplication.translate("MainWindow", "Help Puma"),
                QtGui.QApplication.translate("MainWindow", "Authors :\n Cihan Okyay <*****@*****.**>\n\n Project page :\n https://sourceforge.net/projects/pumaproject/\n\n Source code : https://pumaproject.svn.sourceforge.net/svnroot/pumaproject/\n\n  Usage :\n http://pumaproject.sourceforge.net/"),
                )

    @QtCore.pyqtSignature("bool")
    def on_actionDisconnect_triggered(self):
        self.ifc.adslstop()
Пример #5
0
def main(av=None):
    if not av or av[0] == "help":
        print("next")
        print("update [serie]")
        print("add <serie> [season] [ep]")
        print("del <serie>")
        return
    iface = Interface()
    if av[0] == "next":
        if len(av) == 1:
            iface.show()
        elif len(av) == 2:
            iface.show(av[1])
        return
    elif av[0] == "sort":
        repo = Repo(iface) # FIXME AM 20130406: wtf?
        repo.fate()
        repo.couple()
    elif av[0] == "update":
        if len(av) == 1:
            iface.update()
            iface.show()
        elif len(av) == 2:
            iface.update(av[1])
            iface.show(av[1])
    elif av[0] == "add":
        if len(av) == 4:
            iface.add(av[1], av[2], av[3], force=True)
        elif len(av) == 3:
            iface.add(av[1], av[2], 0, force=True)
        elif len(av) == 2:
            iface.add(av[1], 1, 0, force=True)
        iface.show(av[1])
    elif av[0] == "del":
        iface.delete(av[1])