39{
40 try {
41 setSize(kSettingsWidth, kSettingsHeight);
47 pickup_label_.setText(juce::translate(
"Disabling the pickup mode may be better for "
48 "touchscreen interfaces and may solve issues with "
49 "Lightroom not picking up fast fader/knob movements"),
50 juce::NotificationType::dontSendNotification);
51 pickup_label_.setBounds(kSettingsLeft, 15, kSettingsWidth - 2 * kSettingsLeft, 50);
54 pickup_label_.setColour(juce::Label::textColourId, juce::Colours::darkgrey);
56
58 juce::NotificationType::dontSendNotification);
59 pickup_enabled_.setBounds(kSettingsLeft, 60, kSettingsWidth - 2 * kSettingsLeft,
60 32);
66 rsj::Log(pickup_state ?
"Pickup set to enabled." :
"Pickup set to disabled.");
67 };
68
69
74
76 25);
80 juce::FileChooser chooser {juce::translate("Select Folder"),
81 juce::File::getSpecialLocation(juce::File::userDocumentsDirectory), "", true};
82 if (chooser.browseForDirectory()) {
83 const auto profile_location {chooser.getResult().getFullPathName()};
85 rsj::Log(fmt::format(FMT_STRING(
"Profile location set to {}."),
86 profile_location.toStdString()));
88 juce::NotificationType::dontSendNotification);
89 }
90 };
91
98 juce::NotificationType::dontSendNotification);
99
100
105
108 "select 0 for disabling autohide"),
109 juce::NotificationType::dontSendNotification);
116
117 autohide_setting_.setBounds(kSettingsLeft, 245, kSettingsWidth - 2 * kSettingsLeft, 50);
120 juce::NotificationType::dontSendNotification);
121
127 rsj::Log(fmt::format(FMT_STRING(
"Autohide time set to {} seconds."),
129 };
130
131 activateLayout();
132 }
133 catch (const std::exception& e) {
135 throw;
136 }
137}
juce::GroupComponent profile_group_
Definition SettingsComponent.h:41
juce::Label profile_location_label_
Definition SettingsComponent.h:44
juce::Label autohide_explain_label_
Definition SettingsComponent.h:42
juce::GroupComponent pickup_group_
Definition SettingsComponent.h:40
juce::ToggleButton pickup_enabled_
Definition SettingsComponent.h:47
juce::Label pickup_label_
Definition SettingsComponent.h:43
juce::TextButton profile_location_button_
Definition SettingsComponent.h:46
juce::GroupComponent autohide_group_
Definition SettingsComponent.h:39
juce::Slider autohide_setting_
Definition SettingsComponent.h:45
int GetAutoHideTime() const noexcept
Definition SettingsManager.h:37
void SetPickupEnabled(bool enabled)
Definition SettingsManager.h:75
bool GetPickupEnabled() const noexcept
Definition SettingsManager.h:52
juce::String GetProfileDirectory() const noexcept
Definition SettingsManager.h:57
void SetAutoHideTime(int new_time)
Definition SettingsManager.h:63
void SetProfileDirectory(const juce::String &profile_directory)
Definition SettingsManager.h:81
void ExceptionResponse(gsl::czstring id, gsl::czstring fu, const std::exception &e) noexcept
void Log(const juce::String &info, const std::source_location &location=std::source_location::current()) noexcept
Definition Misc.cpp:131