1#ifndef BLOBEVENTHANDLER_H
2#define BLOBEVENTHANDLER_H
53 bool eventFilter(QObject *watched, QEvent *event)
override;
92 void windowMoved(
const QPointF &new_position, qint64 timestamp);
QTimer event_re_enable_timer_
Timer used for delayed re-enabling of events.
Definition blob_event_handler.h:151
bool transition_in_progress_
Flag indicating if a visual transition (e.g., animation) is in progress, potentially suppressing even...
Definition blob_event_handler.h:144
bool ProcessResizeEvent(const QResizeEvent *event)
Processes a resize event for the parent widget. Applies throttling and checks for significant size ch...
Definition blob_event_handler.cpp:29
void onEventReEnableTimeout()
Slot connected to the event_re_enable_timer_'s timeout signal. Calls EnableEvents() to re-enable even...
Definition blob_event_handler.cpp:116
~BlobEventHandler() override
Destructor. Removes the event filter from the parent widget's window.
Definition blob_event_handler.cpp:23
void EnableEvents()
Enables event processing. Emits the eventsReEnabled() signal.
Definition blob_event_handler.cpp:107
void significantResizeDetected(const QSize &old_size, const QSize &new_size)
Emitted when a significant resize event is detected after throttling.
void SetTransitionInProgress(const bool inProgress)
Sets the flag indicating whether a visual transition is in progress. When true, event processing migh...
Definition blob_event_handler.h:78
bool is_resizing_
Flag indicating if the window is currently being resized (used to potentially ignore move events duri...
Definition blob_event_handler.h:153
qint64 last_processed_move_time_
Timestamp (ms since epoch) of the last processed move event.
Definition blob_event_handler.h:149
void eventsReEnabled()
Emitted when event processing is re-enabled after being disabled.
bool IsInTransition() const
Checks if a visual transition is currently marked as in progress.
Definition blob_event_handler.h:84
void movementSampleAdded(const QPointF &position, qint64 timestamp)
Emitted periodically during window movement to provide samples for velocity calculation....
void stateResetTimerRequested()
Emitted after a resize event to request resetting any temporary state timers.
void DisableEvents()
Disables event processing. Filtered events will be ignored until EnableEvents() is called.
Definition blob_event_handler.cpp:112
bool eventFilter(QObject *watched, QEvent *event) override
Filters events installed on the parent widget's window. Specifically, intercepts and handles QEvent::...
Definition blob_event_handler.cpp:92
void windowMoved(const QPointF &new_position, qint64 timestamp)
Emitted when a significant window move event is detected after throttling.
QWidget * parent_widget_
Pointer to the parent widget whose window events are monitored.
Definition blob_event_handler.h:140
bool AreEventsEnabled() const
Checks if event processing is currently enabled.
Definition blob_event_handler.h:71
bool events_enabled_
Flag indicating whether event processing is currently enabled.
Definition blob_event_handler.h:142
void HandleMoveEvent(const QMoveEvent *move_event)
Handles the logic for processing QMoveEvent received by the event filter. Applies throttling based on...
Definition blob_event_handler.cpp:59
void resizeStateRequested()
Emitted during a resize event to request a specific "resizing" state in the Blob animation.
QPointF last_processed_position_
Stores the last window position that was processed after throttling.
Definition blob_event_handler.h:147
BlobEventHandler(QWidget *parent_widget)
Constructs a BlobEventHandler. Installs an event filter on the parent widget's window.
Definition blob_event_handler.cpp:7