MIDI2LR 6.3.0.1
MIDI2LR is an application that interfaces MIDI controllers with Lightroom 6+/CC Classic. It processes MIDI input into develop parameter updates and photo actions, and sends MIDI output when parameters are changed for motorized feedback (on controllers that have motorized faders). A listing of available LightRoom commands is in the Wiki. Assistance on the code and design is welcome.
Loading...
Searching...
No Matches
MainWindow Class Referencefinal

#include <MainWindow.h>

Inheritance diagram for MainWindow:

Public Member Functions

 MainWindow (const juce::String &name, const CommandSet &command_set, Profile &profile, ProfileManager &profile_manager, SettingsManager &settings_manager, LrIpcOut &lr_ipc_out, MidiReceiver &midi_receiver, MidiSender &midi_sender)
 MainWindow (const MainWindow &other)=delete
 MainWindow (MainWindow &&other)=delete
 ~MainWindow ()
MainWindowoperator= (const MainWindow &other)=delete
MainWindowoperator= (MainWindow &&other)=delete
void SaveProfile () const

Private Member Functions

void closeButtonPressed () override
void timerCallback () override

Private Attributes

std::unique_ptr< MainContentComponentwindow_content_ {}

Constructor & Destructor Documentation

◆ MainWindow() [1/3]

MainWindow::MainWindow ( const juce::String & name,
const CommandSet & command_set,
Profile & profile,
ProfileManager & profile_manager,
SettingsManager & settings_manager,
LrIpcOut & lr_ipc_out,
MidiReceiver & midi_receiver,
MidiSender & midi_sender )
25 : juce
26 ::DocumentWindow {name, juce::Colours::lightgrey,
27 juce::DocumentWindow::minimiseButton | juce::DocumentWindow::closeButton},
28 window_content_ {std::make_unique<MainContentComponent>(command_set, profile,
29 profile_manager, settings_manager, lr_ipc_out, midi_receiver, midi_sender)}
30 {
31 juce::TopLevelWindow::setUsingNativeTitleBar(true);
32 juce::ResizableWindow::setContentNonOwned(window_content_.get(), true);
33 juce::Component::centreWithSize(getWidth(), getHeight());
34 juce::Component::setVisible(true);
35 window_content_->Init();
36 if (const auto hide_sec {settings_manager.GetAutoHideTime()}) { /* don't start timer if time
37 is zero */
38 juce::Timer::startTimer(1000 * hide_sec);
39 }
40 }
41
42catch (const std::exception& e) {
43 rsj::ExceptionResponse(e, std::source_location::current());
44 throw;
45}
std::unique_ptr< MainContentComponent > window_content_
Definition MainWindow.h:62
int GetAutoHideTime() const noexcept
Definition SettingsManager.h:37
void ExceptionResponse(gsl::czstring id, gsl::czstring fu, const std::exception &e) noexcept

◆ ~MainWindow()

MainWindow::~MainWindow ( )
inline
40{ juce::Timer::stopTimer(); } // NOLINT(modernize-use-override)

◆ MainWindow() [2/3]

MainWindow::MainWindow ( const MainWindow & other)
delete

◆ MainWindow() [3/3]

MainWindow::MainWindow ( MainWindow && other)
delete

Member Function Documentation

◆ closeButtonPressed()

void MainWindow::closeButtonPressed ( )
inlineoverrideprivate
56 {
57 juce::JUCEApplication::getInstance()->systemRequestedQuit();
58 }

◆ operator=() [1/2]

MainWindow & MainWindow::operator= ( const MainWindow & other)
delete

◆ operator=() [2/2]

MainWindow & MainWindow::operator= ( MainWindow && other)
delete

◆ SaveProfile()

void MainWindow::SaveProfile ( ) const
inline
47{ window_content_->SaveProfile(); }

◆ timerCallback()

void MainWindow::timerCallback ( )
overrideprivate
48{
49 try {
50 juce::Timer::stopTimer();
51 if (!juce::ResizableWindow::isMinimised()) { juce::DocumentWindow::minimiseButtonPressed(); }
52 }
53 catch (const std::exception& e) {
54 rsj::ExceptionResponse(e, std::source_location::current());
55 throw;
56 }
57}

Member Data Documentation

◆ window_content_

std::unique_ptr<MainContentComponent> MainWindow::window_content_ {}
private
62{};

The documentation for this class was generated from the following files:
  • C:/Users/rsjaf/source/repos/MIDI2LR/src/application/MainWindow.h
  • C:/Users/rsjaf/source/repos/MIDI2LR/src/application/MainWindow.cpp