File indexing completed on 2024-05-12 15:28:21

0001 /***************************************************************************
0002 File                 : DynamicPresenterWidget.h
0003 Project              : LabPlot
0004 Description          : Widget for dynamic presenting of worksheets
0005 --------------------------------------------------------------------
0006 Copyright            : (C) 2016 by Fabian Kristof (fkristofszabolcs@gmail.com)
0007 ***************************************************************************/
0008 
0009 /***************************************************************************
0010 *                                                                         *
0011 *  This program is free software; you can redistribute it and/or modify   *
0012 *  it under the terms of the GNU General Public License as published by   *
0013 *  the Free Software Foundation; either version 2 of the License, or      *
0014 *  (at your option) any later version.                                    *
0015 *                                                                         *
0016 *  This program is distributed in the hope that it will be useful,        *
0017 *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
0018 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
0019 *  GNU General Public License for more details.                           *
0020 *                                                                         *
0021 *   You should have received a copy of the GNU General Public License     *
0022 *   along with this program; if not, write to the Free Software           *
0023 *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
0024 *   Boston, MA  02110-1301  USA                                           *
0025 *                                                                         *
0026 ***************************************************************************/
0027 #ifndef DYNAMICPRESENTERWIDGET_H
0028 #define DYNAMICPRESENTERWIDGET_H
0029 
0030 #include <QWidget>
0031 
0032 class QLabel;
0033 class QTimeLine;
0034 class QPushButton;
0035 class SlidingPanel;
0036 class WorksheetView;
0037 class Worksheet;
0038 
0039 class DynamicPresenterWidget : public QWidget {
0040     Q_OBJECT
0041 
0042 public:
0043     explicit DynamicPresenterWidget(Worksheet* worksheet, QWidget *parent = nullptr);
0044     ~DynamicPresenterWidget() override;
0045 
0046 private:
0047     WorksheetView* m_view;
0048     QTimeLine* m_timeLine;
0049     SlidingPanel* m_panel;
0050     void startTimeline();
0051 
0052 protected:
0053     void keyPressEvent(QKeyEvent*) override;
0054     bool eventFilter(QObject*, QEvent*) override;
0055     void focusOutEvent(QFocusEvent*) override;
0056 #ifdef Q_OS_MAC
0057     void closeEvent(QCloseEvent*) override;
0058 #endif
0059 
0060 private slots:
0061     void slideDown();
0062     void slideUp();
0063 };
0064 
0065 #endif // DYNAMICPRESENTERWIDGET_H