File indexing completed on 2024-05-05 17:09:08

0001 /*
0002  * This file is part of the KDE project
0003  *
0004  * Copyright (C) 2011 Shantanu Tushar <shaan7in@gmail.com>
0005  * Copyright (C) 2013 Arjen Hiemstra <ahiemstra@heimr.nl>
0006  *
0007  * This program is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU General Public License as
0009  * published by the Free Software Foundation; either version 2 of
0010  * the License, or (at your option) any later version.
0011  *
0012  * This program is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015  * GNU General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU General Public License
0018  * along with this program; if not, write to the Free Software
0019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
0020  * 02110-1301 USA
0021  */
0022 
0023 #ifndef CQPRESENTATIONVIEW_H
0024 #define CQPRESENTATIONVIEW_H
0025 
0026 #include <KoPAViewBase.h>
0027 #include <KoZoomMode.h>
0028 
0029 class KoCanvasController;
0030 class KoZoomMode;
0031 class KPrDocument;
0032 class KoPACanvasBase;
0033 
0034 class CQPresentationView : public QObject, public KoPAViewBase
0035 {
0036     Q_OBJECT
0037 public:
0038     CQPresentationView (KoCanvasController* canvasController, KoPACanvasBase* canvas, KPrDocument* prDocument);
0039     virtual ~CQPresentationView();
0040     virtual void setShowRulers (bool show);
0041     virtual void editPaste();
0042     virtual void pagePaste();
0043     virtual void insertPage();
0044     virtual void updatePageNavigationActions();
0045     virtual void setActionEnabled (int actions, bool enable);
0046     virtual void navigatePage (KoPageApp::PageNavigation pageNavigation);
0047     virtual KoPAPageBase* activePage() const;
0048     virtual void setActivePage (KoPAPageBase* page);
0049     virtual void doUpdateActivePage (KoPAPageBase* page);
0050     virtual KoZoomController* zoomController() const;
0051     virtual KoPADocument* kopaDocument() const;
0052     virtual KoPACanvasBase* kopaCanvas() const;
0053 
0054     void setZoomController(KoZoomController* controller);
0055 
0056 public Q_SLOTS:
0057     void connectToZoomController();
0058 
0059 private:
0060     KoCanvasController* m_canvasController;
0061     KoZoomController* m_zoomController;
0062     KoPACanvasBase* m_paCanvas;
0063     KPrDocument* m_prDocument;
0064     KoPAPageBase* m_page;
0065 
0066 private Q_SLOTS:
0067     void slotZoomChanged (KoZoomMode::Mode mode, qreal zoom);
0068 };
0069 
0070 #endif // CQPRESENTATIONVIEW_H