예제 #1
0
    def __init__(self, parent, type):
        QDialog.__init__(self, parent, Qt.Window)
        self.parent = parent
        aqt.form = ankiqt.forms.getshared.Ui_Dialog()
        self.form.setupUi(self)
        self.ok = True
        self.conErrMsg = _("""\
<b>Unable to connect to the server.<br><br>
Please check your network connection or try again in a few minutes.</b><br>
<br>
Error was:<pre>%s</pre>""")
        restoreGeom(self, "getshared")
        self.setupTable()
        self.onChangeType(type)
        if type == 0:
            self.setWindowTitle(_("Download Shared Col"))
        else:
            self.setWindowTitle(_("Download Shared Plugin"))
        if self.ok:
            self.exec_()
예제 #2
0
    def __init__(self, parent, type):
        QDialog.__init__(self, parent, Qt.Window)
        self.parent = parent
        aqt.form = ankiqt.forms.getshared.Ui_Dialog()
        self.form.setupUi(self)
        self.ok = True
        self.conErrMsg = _("""\
<b>Unable to connect to the server.<br><br>
Please check your network connection or try again in a few minutes.</b><br>
<br>
Error was:<pre>%s</pre>""")
        restoreGeom(self, "getshared")
        self.setupTable()
        self.onChangeType(type)
        if type == 0:
            self.setWindowTitle(_("Download Shared Deck"))
        else:
            self.setWindowTitle(_("Download Shared Plugin"))
        if self.ok:
            self.exec_()
예제 #3
0
파일: activetags.py 프로젝트: ChYi/ankiqt
 def __init__(self, parent, type):
     QDialog.__init__(self, parent, Qt.Window)
     self.parent = parent
     self.deck = self.parent.deck
     self.dialog = aqt.forms.activetags.Ui_Dialog()
     self.dialog.setupUi(self)
     if type == "new":
         self.active = "newActive"
         self.inactive = "newInactive"
     else:
         self.active = "revActive"
         self.inactive = "revInactive"
     if (self.deck.getVar("newActive") == self.deck.getVar("revActive") and
         self.deck.getVar("newInactive") == self.deck.getVar("revInactive")):
         self.dialog.bothButton.click()
     elif type == "new":
         self.dialog.newButton.click()
     else:
         self.dialog.revButton.click()
     self.connect(self.dialog.buttonBox, SIGNAL("helpRequested()"),
                  self.onHelp)
     self.rebuildTagList()
     restoreGeom(self, "activeTags")
예제 #4
0
파일: activetags.py 프로젝트: ChYi/ankiqt
 def __init__(self, parent, type):
     QDialog.__init__(self, parent, Qt.Window)
     self.parent = parent
     self.deck = self.parent.deck
     self.dialog = aqt.forms.activetags.Ui_Dialog()
     self.dialog.setupUi(self)
     if type == "new":
         self.active = "newActive"
         self.inactive = "newInactive"
     else:
         self.active = "revActive"
         self.inactive = "revInactive"
     if (self.deck.getVar("newActive") == self.deck.getVar("revActive")
             and self.deck.getVar("newInactive")
             == self.deck.getVar("revInactive")):
         self.dialog.bothButton.click()
     elif type == "new":
         self.dialog.newButton.click()
     else:
         self.dialog.revButton.click()
     self.connect(self.dialog.buttonBox, SIGNAL("helpRequested()"),
                  self.onHelp)
     self.rebuildTagList()
     restoreGeom(self, "activeTags")