Exemplo n.º 1
0
 def save_settings(self):
     """ save current primary and secondary display settings"""
     file_path = QtGui.QFileDialog.getSaveFileName()[0]
     # just a number. path.exists won't work in case it is a new file.
     if len(file_path) > 5:
         if self.no_of_connected_dev == 1:
             WriteConfig.write_primary_display(
                 self.return_current_primary_settings(), file_path)
         elif self.no_of_connected_dev >= 2:
             WriteConfig.write_both_display(
                 self.return_current_primary_settings(),
                 self.return_current_secondary_settings(), file_path)
Exemplo n.º 2
0
 def save_settings(self, default=False):
     """ save current primary and secondary display settings"""
     file_path = self.default_config if default else QtWidgets.QFileDialog.getSaveFileName(
     )[0]
     # just a number. path.exists won't work in case it is a new file.
     if len(file_path) > 5:
         if default:
             self.ui.actionClearDefault.setVisible(True)
         if self.no_of_connected_dev == 1:
             WriteConfig.write_primary_display(
                 self.return_current_primary_settings(), file_path)
         elif self.no_of_connected_dev >= 2:
             WriteConfig.write_both_display(
                 self.return_current_primary_settings(),
                 self.return_current_secondary_settings(), file_path)
Exemplo n.º 3
0
 def save_settings(self):
     """ save current primary and secondary display settings"""
     file_path = QtGui.QFileDialog.getSaveFileName()[0]
     # just a number. path.exists won't work in case it is a new file.
     if len(file_path) > 5:
         if self.no_of_connected_dev == 1:
             WriteConfig.write_primary_display(
                 self.return_current_primary_settings(),
                 file_path
             )
         elif self.no_of_connected_dev == 2:
             WriteConfig.write_both_display(
                 self.return_current_primary_settings(),
                 self.return_current_secondary_settings(),
                 self.ui.checkBox.isChecked(),
                 file_path
             )
Exemplo n.º 4
0
    def save_settings(self, default=False):
        """ save current primary and secondary display settings"""
        file_path = self.default_config if default else QtGui.QFileDialog.getSaveFileName()[0]
        # just a number. path.exists won't work in case it is a new file.
        if len(file_path) > 5:
            if default:
                self.ui.actionClearDefault.setVisible(True)
            if self.no_of_connected_dev == 1:
                WriteConfig.write_primary_display(
                    self.return_current_primary_settings(),
                    file_path
                )
            elif self.no_of_connected_dev >= 2:
                WriteConfig.write_both_display(
                    self.return_current_primary_settings(),
                    self.return_current_secondary_settings(),
                    file_path

                )