Exemplo n.º 1
0
    def settings_dialog(self, window):
        print "window:", window
        d = QDialog(window)
        vbox = QVBoxLayout(d)
        layout = QGridLayout()
        vbox.addLayout(layout)

        layout.addWidget(QLabel("Label sync options: "), 2, 0)

        self.upload = ThreadedButton("Force upload",
                                     partial(self.push_thread, window),
                                     self.done_processing)
        layout.addWidget(self.upload, 2, 1)

        self.download = ThreadedButton("Force download",
                                       partial(self.pull_thread, window, True),
                                       self.done_processing)
        layout.addWidget(self.download, 2, 2)

        self.accept = OkButton(d, _("Done"))
        vbox.addLayout(Buttons(CancelButton(d), self.accept))

        if d.exec_():
            return True
        else:
            return False
Exemplo n.º 2
0
 def settings_dialog(self, window):
     wallet = window.parent().wallet
     d = WindowModalDialog(window, _("Label Settings"))
     vbox = QVBoxLayout(d)
     layout = QGridLayout()
     vbox.addLayout(layout)
     layout.addWidget(QLabel("Label sync options: "), 2, 0)
     self.upload = ThreadedButton("Force upload",
                                  partial(self.push_thread, wallet),
                                  self.done_processing)
     layout.addWidget(self.upload, 2, 1)
     self.download = ThreadedButton("Force download",
                                    partial(self.pull_thread, wallet, True),
                                    self.done_processing)
     layout.addWidget(self.download, 2, 2)
     self.accept = OkButton(d, _("Done"))
     vbox.addLayout(Buttons(CancelButton(d), self.accept))
     return bool(d.exec_())
Exemplo n.º 3
0
 def settings_dialog(self, window):
     wallet = window.parent().wallet
     d = WindowModalDialog(window, _("Label Settings"))
     hbox = QHBoxLayout()
     hbox.addWidget(QLabel("Label sync options:"))
     upload = ThreadedButton("Force upload",
                             partial(self.push_thread, wallet),
                             partial(self.done_processing, d))
     download = ThreadedButton("Force download",
                               partial(self.pull_thread, wallet, True),
                               partial(self.done_processing, d))
     vbox = QVBoxLayout()
     vbox.addWidget(upload)
     vbox.addWidget(download)
     hbox.addLayout(vbox)
     vbox = QVBoxLayout(d)
     vbox.addLayout(hbox)
     vbox.addSpacing(20)
     vbox.addLayout(Buttons(OkButton(d)))
     return bool(d.exec_())