1#ifndef WAVELENGTH_DIALOG_H
2#define WAVELENGTH_DIALOG_H
AnimatedDialog(QWidget *parent=nullptr, AnimationType type=kSlideFromBottom)
Constructs an AnimatedDialog. Sets necessary window flags and attributes for transparency and animati...
Definition animated_dialog.cpp:14
double corner_glow_progress_
Progress property (0.0 to 1.0) potentially for corner glow effects. Animatable.
Definition animated_dialog.h:81
double digitalization_progress_
Progress property (0.0 to 1.0) for the digital materialization effect. Animatable.
Definition animated_dialog.h:79
CyberButton * cancel_button_
Button to cancel the dialog.
Definition create_wavelength_dialog.h:186
double GetDigitalizationProgress() const
Gets the current digitalization progress (vertical scanline position).
Definition create_wavelength_dialog.h:50
double scanlineOpacity
Property controlling the opacity of the horizontal scanlines effect (0.0 to 1.0). Animatable.
Definition create_wavelength_dialog.h:27
QString GetFrequency() const
Gets the frequency assigned by the server (or the default if search failed).
Definition create_wavelength_dialog.h:94
void OnFrequencyFound()
Slot triggered when the frequency search (FindLowestAvailableFrequency) completes....
Definition create_wavelength_dialog.cpp:401
QLabel * status_label_
Label to display status or error messages.
Definition create_wavelength_dialog.h:182
QLabel * loading_indicator_
Label indicating that the frequency search is in progress.
Definition create_wavelength_dialog.h:176
void ValidateInputs() const
Validates the input fields (currently just the password if protection is enabled)....
Definition create_wavelength_dialog.cpp:345
CyberLineEdit * password_edit_
Input field for the wavelength password.
Definition create_wavelength_dialog.h:180
void TryGenerate()
Attempts to finalize the wavelength generation process. Checks if a password is required and entered....
Definition create_wavelength_dialog.cpp:380
double digitalizationProgress
Property controlling the progress of the main vertical scanline reveal animation (0....
Definition create_wavelength_dialog.h:29
double GetCornerGlowProgress() const
Gets the current corner glow progress.
Definition create_wavelength_dialog.h:56
QLabel * frequency_label_
Label displaying the assigned frequency.
Definition create_wavelength_dialog.h:174
bool IsPasswordProtected() const
Checks if the "Password Protected" checkbox is checked.
Definition create_wavelength_dialog.cpp:236
CyberCheckBox * password_protected_checkbox_
Checkbox to enable/disable password protection.
Definition create_wavelength_dialog.h:178
int last_scanline_y_
Stores the last Y position of the scanline to optimize repaint regions.
Definition create_wavelength_dialog.h:202
void StopRefreshTimer() const
Stops the refresh timer.
Definition create_wavelength_dialog.h:77
CyberButton * generate_button_
Button to confirm wavelength creation and close the dialog.
Definition create_wavelength_dialog.h:184
double cornerGlowProgress
Property controlling the visibility/intensity of the corner highlight markers (0.0 to 1....
Definition create_wavelength_dialog.h:31
void SetCornerGlowProgress(double progress)
Sets the corner glow progress and triggers a repaint.
Definition create_wavelength_dialog.cpp:226
QTimer * refresh_timer_
Timer used to trigger repaints for the vertical scanline animation.
Definition create_wavelength_dialog.h:190
double GetScanlineOpacity() const
Gets the current opacity of the horizontal scanlines.
Definition create_wavelength_dialog.h:62
static QString FormatFrequencyText(double frequency)
Static utility function to format a frequency value (double) into a display string with units (Hz,...
Definition create_wavelength_dialog.cpp:465
static QString FindLowestAvailableFrequency()
Static function executed concurrently to query the relay server for the next available frequency....
Definition create_wavelength_dialog.cpp:484
TranslationManager * translator_
Pointer to the translation manager for handling UI translations.
Definition create_wavelength_dialog.h:206
int previous_height_
Stores the previous height to detect resize events for buffer reinitialization.
Definition create_wavelength_dialog.h:204
void InitRenderBuffers()
Initializes or reinitializes the QPixmap buffer used for rendering the vertical scanline effect....
Definition create_wavelength_dialog.cpp:532
void paintEvent(QPaintEvent *event) override
Overridden paint event handler. Draws the custom dialog appearance. Renders the background gradient,...
Definition create_wavelength_dialog.cpp:244
void StartFrequencySearch()
Starts the asynchronous process of finding the lowest available frequency via the relay server....
Definition create_wavelength_dialog.cpp:356
bool frequency_found_
Flag indicating if the frequency search has completed successfully or timed out.
Definition create_wavelength_dialog.h:194
bool buffers_initialized_
Flag indicating if the render buffers (scanline_buffer_) have been initialized.
Definition create_wavelength_dialog.h:200
QFutureWatcher< QString > * frequency_watcher_
Watches the QFuture returned by the concurrent frequency search.
Definition create_wavelength_dialog.h:188
QPixmap scanline_buffer_
Buffer holding the pre-rendered vertical scanline gradient.
Definition create_wavelength_dialog.h:198
void SetRefreshTimerInterval(const int interval) const
Sets the interval for the refresh timer.
Definition create_wavelength_dialog.h:84
void SetScanlineOpacity(double opacity)
Sets the opacity of the horizontal scanlines and triggers a repaint.
Definition create_wavelength_dialog.cpp:231
CreateWavelengthDialog(QWidget *parent=nullptr)
Constructs a WavelengthDialog. Sets up the UI elements (labels, input fields, buttons,...
Definition create_wavelength_dialog.cpp:27
QString frequency_
Stores the frequency found by the server or the default value.
Definition create_wavelength_dialog.h:192
double scanline_opacity_
Current opacity for the horizontal scanline effect.
Definition create_wavelength_dialog.h:196
QTimer * GetRefreshTimer() const
Gets a pointer to the internal refresh timer used for scanline animation updates.
Definition create_wavelength_dialog.h:68
void StartRefreshTimer() const
Starts the refresh timer.
Definition create_wavelength_dialog.h:70
void SetDigitalizationProgress(double progress)
Sets the digitalization progress and triggers a repaint. Starts the refresh timer if needed.
Definition create_wavelength_dialog.cpp:219
QString GetPassword() const
Gets the password entered by the user.
Definition create_wavelength_dialog.cpp:240
bool animation_started_
Flag indicating if the show animation has started (used to control scanline drawing).
Definition create_wavelength_dialog.h:172
A custom QCheckBox styled with a cyberpunk aesthetic.
Definition cyber_checkbox.h:14
A custom QLineEdit styled with a cyberpunk aesthetic.
Definition cyber_line_edit.h:13
Manages the loading and delivery of translations for applications.
Definition translation_manager.h:15