2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
2012-12-18 17:21:20 +00:00
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2012-12-18 17:21:20 +00:00
|
|
|
|
|
|
|
#ifndef ACCORDION_FRAME_H
|
|
|
|
#define ACCORDION_FRAME_H
|
|
|
|
|
|
|
|
#include <QFrame>
|
2015-02-08 20:24:19 +00:00
|
|
|
|
|
|
|
class QPropertyAnimation;
|
2012-12-18 17:21:20 +00:00
|
|
|
|
|
|
|
class AccordionFrame : public QFrame
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit AccordionFrame(QWidget *parent = 0);
|
|
|
|
void animatedShow();
|
|
|
|
void animatedHide();
|
|
|
|
|
|
|
|
signals:
|
2015-07-09 17:29:21 +00:00
|
|
|
void visibilityChanged(bool visible);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void hideEvent(QHideEvent *) { emit visibilityChanged(false); }
|
|
|
|
virtual void showEvent(QShowEvent *) { emit visibilityChanged(true); }
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2012-12-18 17:21:20 +00:00
|
|
|
private:
|
|
|
|
int frame_height_;
|
|
|
|
QPropertyAnimation *animation_;
|
|
|
|
|
|
|
|
private slots:
|
2016-01-08 21:34:12 +00:00
|
|
|
void animationFinished();
|
2014-02-25 20:42:35 +00:00
|
|
|
|
2012-12-18 17:21:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ACCORDION_FRAME_H
|