1#ifndef CYBER_ATTACHMENT_VIEWER_H
2#define CYBER_ATTACHMENT_VIEWER_H
QTimer * animation_timer_
Timer potentially used for secondary animations (like status label glitches).
Definition attachment_viewer.h:172
void UpdateDecryptionStatus() const
Updates the status label text to show the current decryption percentage.
Definition attachment_viewer.cpp:325
void paintEvent(QPaintEvent *event) override
Overridden paint event handler. Draws the custom cyberpunk border and AR markers. Renders the clipped...
Definition attachment_viewer.cpp:183
int decryption_counter_
Current decryption progress (0-100).
Definition attachment_viewer.h:155
bool is_decrypted_
Flag indicating if the decryption process has completed.
Definition attachment_viewer.h:159
bool is_scanning_
Flag indicating if the viewer is currently in the "scanning" phase.
Definition attachment_viewer.h:157
QWidget * content_container_
Container widget holding the content_widget_ and mask_overlay_.
Definition attachment_viewer.h:164
QVBoxLayout * content_layout_
Layout for the content_container_.
Definition attachment_viewer.h:166
void decryptionCounterChanged(int value)
Emitted when the decryptionCounter property changes. Connected to the MaskOverlay's SetRevealProgress...
TranslationManager * translator_
Pointer to the translation manager for handling UI translations.
Definition attachment_viewer.h:176
void SetDecryptionCounter(int counter)
Sets the decryption progress counter (0-100). Updates the internal value, updates the status label te...
Definition attachment_viewer.cpp:77
QVBoxLayout * layout_
Main layout for the viewer.
Definition attachment_viewer.h:162
void SetContent(QWidget *content)
Sets the widget to be displayed after the decryption animation. Removes any previous content,...
Definition attachment_viewer.cpp:105
AttachmentViewer(QWidget *parent=nullptr)
Constructs a CyberAttachmentViewer. Initializes the layout, status label, content container,...
Definition attachment_viewer.cpp:16
QLabel * status_label_
Label displaying status messages (Scanning, Decrypting %, Finished).
Definition attachment_viewer.h:170
MaskOverlayEffect * mask_overlay_
The overlay widget that handles the scanline and reveal effect.
Definition attachment_viewer.h:174
void OnActionButtonClicked()
Slot triggered automatically after a short delay or potentially by a user action (though currently au...
Definition attachment_viewer.cpp:247
void StartScanningAnimation()
Starts the visual scanning phase. Updates the status label, ensures the MaskOverlay is visible and an...
Definition attachment_viewer.cpp:257
QSize sizeHint() const override
Returns the recommended size for the viewer based on its content and layout. Calculates the size need...
Definition attachment_viewer.cpp:147
~AttachmentViewer() override
Destructor. Ensures graphics effects are removed from the content widget if set.
Definition attachment_viewer.cpp:71
QWidget * content_widget_
Pointer to the widget being displayed (e.g., an image viewer).
Definition attachment_viewer.h:168
void StartDecryptionAnimation()
Starts the decryption phase. Updates the status label, ensures the MaskOverlay is visible,...
Definition attachment_viewer.cpp:282
int decryptionCounter
Property controlling the decryption progress (0-100). Animatable. Drives the MaskOverlay reveal.
Definition attachment_viewer.h:29
int GetDecryptionCounter() const
Gets the current decryption progress counter (0-100).
Definition attachment_viewer.h:50
void CloseViewer()
Closes the viewer by emitting the viewingFinished signal.
Definition attachment_viewer.cpp:347
void resizeEvent(QResizeEvent *event) override
Overridden resize event handler. Ensures the MaskOverlay is resized to match the content container's ...
Definition attachment_viewer.cpp:175
void UpdateAnimation() const
Slot called by animation_timer_ (if active) to update visual elements during animation....
Definition attachment_viewer.cpp:304
void viewingFinished()
Emitted when the viewer is closed (either manually or automatically after decryption).
void FinishDecryption()
Slot called when the decryption animation finishes. Sets the state to decrypted, updates the status l...
Definition attachment_viewer.cpp:331
void UpdateContentLayout()
Forces an update of the content layout and geometry. Useful after the content widget's size changes d...
Definition attachment_viewer.cpp:85
A custom overlay widget that creates a "reveal" effect using a moving scanline.
Definition mask_overlay_effect.h:15
Manages the loading and delivery of translations for applications.
Definition translation_manager.h:15