Wireshark 5.1.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
accordion_frame.h
Go to the documentation of this file.
1
9
10#ifndef ACCORDION_FRAME_H
11#define ACCORDION_FRAME_H
12
13#include <QFrame>
14
15class QPropertyAnimation;
16
20class AccordionFrame : public QFrame
21{
22 Q_OBJECT
23public:
28 explicit AccordionFrame(QWidget *parent = 0);
29
33 void animatedShow();
34
38 void animatedHide();
39
41 void updateStyleSheet();
42
43signals:
48 void visibilityChanged(bool visible);
49
50protected:
52 virtual void hideEvent(QHideEvent *) override { emit visibilityChanged(false); }
53
55 virtual void showEvent(QShowEvent *) override { emit visibilityChanged(true); }
56
57private:
58 int frame_height_;
59 int design_max_height_;
60 QPropertyAnimation *animation_;
61
63 int zoomedMaxHeight();
64
65private slots:
69 void animationFinished();
70
74 void applyZoomedMaxHeight();
75};
76
77#endif // ACCORDION_FRAME_H
void updateStyleSheet()
Reapply the stylesheet after a palette or style change.
Definition accordion_frame.cpp:120
void visibilityChanged(bool visible)
Emitted when the frame's visibility changes.
void animatedHide()
Hide the frame with a slide-up animation.
Definition accordion_frame.cpp:94
AccordionFrame(QWidget *parent=0)
Create an AccordionFrame with the given parent.
Definition accordion_frame.cpp:24
void animatedShow()
Show the frame with a slide-down animation.
Definition accordion_frame.cpp:61
virtual void showEvent(QShowEvent *) override
Emit visibilityChanged(true) when the frame is shown.
Definition accordion_frame.h:55
virtual void hideEvent(QHideEvent *) override
Emit visibilityChanged(false) when the frame is hidden.
Definition accordion_frame.h:52