Example #1
0
 def sync(self, load=True):
     try:
         Settings.set(self.kBrokerList, json.dumps(self._brokers))
     except Exception as e:
         Log.critical(e)
     if load:
         self.load()
Example #2
0
 def sync(self, load=True):
     try:
         Settings.set(self.kBrokerList,json.dumps(self._brokers))
     except Exception as e:
         Log.critical(e)
     if load:
         self.load()
Example #3
0
    def _file(self):
        if self._jsonfile == self._defaultFile:
            fileName = QFileDialog.getSaveFileName(None, "Location for Brokers File",  # translate
                                                   "~/",
                                                   "*.json")
            if fileName:
                Settings.set(self.kBrokerFile, fileName)
                self._jsonfile = fileName
            else:
                Log.critical("Broker data being saved to plugin directory and will be lost on upgrade!")

        return self._jsonfile
Example #4
0
    def _file(self):
        if self._jsonfile == self._defaultFile:
            fileName = QFileDialog.getSaveFileName(
                None,
                "Location for Brokers File",  # translate
                "~/",
                "*.json")
            if fileName:
                Settings.set(self.kBrokerFile, fileName)
                self._jsonfile = fileName
            else:
                Log.critical(
                    "Broker data being saved to plugin directory and will be lost on upgrade!"
                )

        return self._jsonfile