File indexing completed on 2024-05-12 16:36:46

0001 /* This file is part of the KDE project
0002  * Copyright (C) 2008 Fredy Yanardi <fyanardi@gmail.com>
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Library General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0012  * Library General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Library General Public License
0015  * along with this library; see the file COPYING.LIB.  If not, write to
0016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0017  * Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef KPRPRESENTERVIEWWIDGET
0021 #define KPRPRESENTERVIEWWIDGET
0022 
0023 #include <QWidget>
0024 
0025 class QStackedLayout;
0026 
0027 class KoPACanvas;
0028 class KoPAPageBase;
0029 
0030 class KPrViewModePresentation;
0031 
0032 class KPrPresenterViewBaseInterface;
0033 class KPrPresenterViewInterface;
0034 class KPrPresenterViewSlidesInterface;
0035 class KPrPresenterViewToolWidget;
0036 
0037 class KPrPresenterViewWidget : public QWidget
0038 {
0039     Q_OBJECT
0040 public:
0041     KPrPresenterViewWidget( KPrViewModePresentation *viewMode, const QList<KoPAPageBase *> &pages, KoPACanvas *canvas, QWidget *parent=0 );
0042     ~KPrPresenterViewWidget() override;
0043     void setActivePage( KoPAPageBase *page );
0044     void setActivePage( int pageIndex );
0045     void updateWidget( const QSize &widgetSize, const QSize &canvasSize );
0046 
0047 private Q_SLOTS:
0048     void showSlideThumbnails( bool show );
0049     void requestPreviousSlide();
0050     void requestNextSlide();
0051     void requestChangePage( int index, bool enableMainView );
0052 
0053 private:
0054     KPrViewModePresentation *m_viewMode;
0055     QList<KoPAPageBase *> m_pages;
0056     KoPACanvas *m_canvas;
0057 
0058     QStackedLayout *m_stackedLayout;
0059 
0060     KPrPresenterViewInterface *m_mainWidget;
0061     KPrPresenterViewSlidesInterface *m_slidesWidget;
0062     KPrPresenterViewBaseInterface *m_activeWidget;
0063     KPrPresenterViewToolWidget *m_toolWidget;
0064 };
0065 
0066 #endif
0067