def startTimerTextColorButtonClicked(self) -> None: set_qcolor( self.startTimerExample, foreground=get_color( self, get_rgb(self.startTimerExample, QPalette.Foreground)), )
def endTextColorButtonClicked(self): set_qcolor( self.endTextExample, foreground=get_color( self, get_rgb(self.endTextExample, QPalette.Foreground)), )
def get_trigger(self) -> Trigger: self.trigger.update({ "name": self.triggerNameLineEdit.text(), "duration": self.triggerDurationLineEdit.text(), "text": self.triggerTextLineEdit.text(), "regex": self.triggerRegexLineEdit.text(), "start_action": { "timer": { "enabled": self.startTimerEnabledCheckBox.isChecked(), "persistent": self.startTimerPersistentCheckBox.isChecked(), "noreplace": self.startTimerNoReplaceCheckBox.isChecked(), "text": self.startTimerTextLineEdit.text(), "duration": self.startTimerDurationLineEdit.text(), "icon": self.startTimerIconSpinBox.value(), "bar_color": get_rgb(self.startTimerExample, QPalette.Background), "text_color": get_rgb(self.startTimerExample, QPalette.Foreground), }, "text": { "enabled": self.startTextEnabledCheckBox.isChecked(), "text": self.startTextTextLineEdit.text(), "text_size": self.startTextSizeSpinBox.value(), "color": get_rgb(self.startTextExample, QPalette.Foreground), }, "sound": { "enabled": self.startSoundEnabledCheckBox.isChecked(), "volume": self.startSoundVolumeSlider.value(), }, }, "end_action": { "timer": { "enabled": self.endTimerEnabledCheckBox.isChecked(), "persistent": self.endTimerPersistentCheckBox.isChecked(), "noreplace": self.endTimerNoReplaceCheckBox.isChecked(), "text": self.endTimerTextLineEdit.text(), "duration": self.endTimerDurationLineEdit.text(), "icon": self.endTimerIconSpinBox.value(), "bar_color": get_rgb(self.endTimerExample, QPalette.Background), "text_color": get_rgb(self.endTimerExample, QPalette.Foreground), }, "text": { "enabled": self.endTextEnabledCheckBox.isChecked(), "text": self.endTextTextLineEdit.text(), "text_size": self.endTextSizeSpinBox.value(), "color": get_rgb(self.endTextExample, QPalette.Foreground), }, "sound": { "enabled": self.endSoundEnabledCheckBox.isChecked(), "volume": self.endSoundVolumeSlider.value(), }, }, }) return self.trigger
def endTimerBarColorButtonClicked(self) -> None: set_qcolor( self.endTimerExample, background=get_color( self, get_rgb(self.endTimerExample, QPalette.Background)), )
def spellsDebuffBarColorButtonClicked(self) -> None: set_qcolor( self.spellsDebuffBarLabel, background=self._get_color( get_rgb(self.spellsDebuffBarLabel, QPalette.Background)), )
def spellsYouColorButtonClicked(self) -> None: set_qcolor( self.spellsYouTargetLabel, background=self._get_color( get_rgb(self.spellsYouTargetLabel, QPalette.Background)), )
def spellsDebuffTextColorButtonClicked(self) -> None: set_qcolor( self.spellsDebuffBarLabel, foreground=self._get_color( get_rgb(self.spellsDebuffBarLabel, QPalette.Foreground)), )
def save_settings(self): # General app_config.update_check = self.updateCheckCheckBox.isChecked() app_config.eq_dir = self.eqDirectoryLabel.text() app_config.qt_scale_factor = self.qtScalingSpinBox.value() # Maps profile.maps.opacity = self.mapOpacitySpinBox.value() profile.maps.line_width = self.mapLineSizeSpinBox.value() profile.maps.grid_line_width = self.mapGridLineSizeSpinBox.value() profile.maps.current_z_alpha = self.mapCurrentLevelSpinBox.value() profile.maps.closest_z_alpha = self.mapClosestLevelSpinBox.value() profile.maps.other_z_alpha = self.mapOtherLevelSpinBox.value() # Spells profile.spells.persistent_buffs = ( self.spellsPersistentBuffTimersCheckBox.isChecked()) profile.spells.persistent_debuffs = ( self.spellsPersistentDebuffTimersCheckBox.isChecked()) profile.spells.use_casting_window = ( self.spellsUseCastingWindowCheckBox.isChecked()) profile.spells.casting_window_buffer = ( self.spellsCastingWindowTimeSpinBox.value()) profile.spells.sound_enabled = self.spellsSoundEnabledCheckBox.isChecked( ) profile.spells.sound_volume = self.spellsSoundVolumeSlider.value() profile.spells.use_secondary_all = ( self.spellsUsePVPSpellDurationsCheckBox.isChecked()) profile.spells.buff_text_color = get_rgb(self.spellsBuffBarLabel, QPalette.Foreground) profile.spells.buff_bar_color = get_rgb(self.spellsBuffBarLabel, QPalette.Background) profile.spells.debuff_text_color = get_rgb(self.spellsDebuffBarLabel, QPalette.Foreground) profile.spells.debuff_bar_color = get_rgb(self.spellsDebuffBarLabel, QPalette.Background) profile.spells.you_target_color = get_rgb(self.spellsYouTargetLabel, QPalette.Background) profile.spells.friendly_target_color = get_rgb( self.spellsFriendlyTargetLabel, QPalette.Background) profile.spells.enemy_target_color = get_rgb( self.spellsEnemyTargetLabel, QPalette.Background) profile.spells.target_text_color = get_rgb(self.spellsEnemyTargetLabel, QPalette.Foreground) # Text profile.text.direction = self.textDirectionComboBox.currentText() profile.text.fade_seconds = self.textFadeSecondsSpinBox.value() profile.text.pixels_per_second = self.textPixelsPerSecondSpinBox.value( ) profile.text.shadow_blur_radius = self.textShadowBlurRadiusSpinBox.value( ) profile.text.shadow_color = get_rgb( self.textShadowColorLabel, self.textShadowColorLabel.backgroundRole()) profile.trigger_choices = self.triggerTree.get_choices() app_config.save() profile.save() trigger_manager.save()
def textShadowColorButtonClicked(self, _) -> None: set_qcolor( self.textShadowColorLabel, background=self._get_color( get_rgb(self.textShadowColorLabel, QPalette.Background)), )
def spellsTargetTextColorButtonClicked(self, _) -> None: color = self._get_color( get_rgb(self.spellsYouTargetLabel, QPalette.Foreground)) set_qcolor(self.spellsYouTargetLabel, foreground=color) set_qcolor(self.spellsFriendlyTargetLabel, foreground=color) set_qcolor(self.spellsEnemyTargetLabel, foreground=color)
def spellsFriendlyColorButtonClicked(self, _) -> None: set_qcolor( self.spellsFriendlyTargetLabel, background=self._get_color( get_rgb(self.spellsFriendlyTargetLabel, QPalette.Background)), )