Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
accordion_frame.h
Go to the documentation of this file.
1
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 *) { emit visibilityChanged(false); }
53
55 virtual void showEvent(QShowEvent *) { emit visibilityChanged(true); }
56
57private:
58 int frame_height_;
59 QPropertyAnimation *animation_;
62private slots:
66 void animationFinished();
67};
68
69#endif // ACCORDION_FRAME_H
A QFrame that shows and hides itself with a slide animation.
Definition accordion_frame.h:21
void updateStyleSheet()
Reapply the stylesheet after a palette or style change.
Definition accordion_frame.cpp:89
void visibilityChanged(bool visible)
Emitted when the frame's visibility changes.
virtual void showEvent(QShowEvent *)
Emit visibilityChanged(true) when the frame is shown.
Definition accordion_frame.h:55
void animatedHide()
Hide the frame with a slide-up animation.
Definition accordion_frame.cpp:65
void animatedShow()
Show the frame with a slide-down animation.
Definition accordion_frame.cpp:36
virtual void hideEvent(QHideEvent *)
Emit visibilityChanged(false) when the frame is hidden.
Definition accordion_frame.h:52