Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
accordion_frame.h
1 /* accordion_frame.cpp
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9 
10 #ifndef ACCORDION_FRAME_H
11 #define ACCORDION_FRAME_H
12 
13 #include <QFrame>
14 
15 class QPropertyAnimation;
16 
17 class AccordionFrame : public QFrame
18 {
19  Q_OBJECT
20 public:
21  explicit AccordionFrame(QWidget *parent = 0);
22  void animatedShow();
23  void animatedHide();
24 
25 signals:
26  void visibilityChanged(bool visible);
27 
28 protected:
29  virtual void hideEvent(QHideEvent *) { emit visibilityChanged(false); }
30  virtual void showEvent(QShowEvent *) { emit visibilityChanged(true); }
31 
32 private:
33  int frame_height_;
34  QPropertyAnimation *animation_;
35 
36 private slots:
37  void animationFinished();
38 
39 };
40 
41 #endif // ACCORDION_FRAME_H
42 
43 /*
44  * Editor modelines
45  *
46  * Local Variables:
47  * c-basic-offset: 4
48  * tab-width: 8
49  * indent-tabs-mode: nil
50  * End:
51  *
52  * ex: set shiftwidth=4 tabstop=8 expandtab:
53  * :indentSize=4:tabSize=8:noTabs=true:
54  */
Definition: accordion_frame.h:17