Warning, file /office/calligra/gemini/TouchDeclarativeView.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the KDE project 0002 * Copyright (C) Boudewijn Rempt <boud@valdyas.org>, (C) 2013 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef TOUCHDECLARATIVEVIEW_H 0008 #define TOUCHDECLARATIVEVIEW_H 0009 0010 #include <QQuickView> 0011 #include <QPointer> 0012 0013 /** 0014 * @brief The SketchDeclarativeView class overrides QGraphicsView's drawBackground 0015 */ 0016 class TouchDeclarativeView : public QQuickView 0017 { 0018 Q_OBJECT 0019 0020 Q_PROPERTY(bool drawCanvas READ drawCanvas WRITE setDrawCanvas NOTIFY drawCanvasChanged); 0021 Q_PROPERTY(QWidget* canvasWidget READ canvasWidget WRITE setCanvasWidget NOTIFY canvasWidgetChanged); 0022 0023 public: 0024 explicit TouchDeclarativeView(QWindow *parent = 0); 0025 TouchDeclarativeView(const QUrl &url, QWindow *parent = 0); 0026 virtual ~TouchDeclarativeView(); 0027 0028 QWidget* canvasWidget() const; 0029 void setCanvasWidget(QWidget *canvasWidget); 0030 0031 bool drawCanvas() const; 0032 void setDrawCanvas(bool drawCanvas); 0033 0034 Q_SIGNALS: 0035 void canvasWidgetChanged(); 0036 void drawCanvasChanged(); 0037 0038 protected: 0039 // void resizeEvent(QResizeEvent *event); 0040 // virtual bool event(QEvent* event); 0041 // virtual bool eventFilter(QObject* watched, QEvent* e); 0042 0043 // void drawBackground(QPainter *painter, const QRectF &rect); 0044 0045 private: 0046 bool m_drawCanvas; 0047 QPointer<QWidget> m_canvasWidget; 0048 bool m_GLInitialized; 0049 Q_SLOT void resetInitialized(); 0050 }; 0051 0052 #endif // TOUCHDECLARATIVEVIEW_H