Ejemplo n.º 1
0
 def __init__(self, parent):
     QDialog.__init__(self, parent)
     self.ui = Ui_Settings()
     self.ui.setupUi(self)
     self.ui.api_edt.setText(config.value('key').toString())
     self.ui.proxy_host_edt.setText(config.value('proxy.host').toString())
     self.ui.proxy_port_edt.setText(config.value('proxy.port').toString())
     self.ui.buttonBox.clicked.connect(self.btn_clicked)
Ejemplo n.º 2
0
 def connect_pushbullet(self):
     if config.value('key') is not None and not config.value('key').toString().isEmpty():
         proxy_host = str(config.value('proxy.host').toString())
         proxy_port, int_conv_ok = config.value('proxy.port').toInt()
         if proxy_host.strip() == '':
             proxy_host = proxy_port = None
         self.pusher = PushBullet(str(config.value('key').toString()))
         self.listener = QPushBulletListener(self, self.pusher, proxy_host, proxy_port)
         self.listener.start()
         self.connect_systray()
         self.connect_pushes_actions()
         self.refresh_devices()
         self.connected.emit(True)
         self._connected = True
     else:
         self.connected.emit(False)