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)
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)
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 )
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 )