File indexing completed on 2025-02-23 04:08:59

0001 /*
0002  * This file is part of Krita
0003  *
0004  *  SPDX-FileCopyrightText: 2006 Cyrille Berger <cberger@cberger.net>
0005  *  SPDX-FileCopyrightText: 2014 Sven Langkamp <sven.langkamp@gmail.com>
0006  *
0007  *  SPDX-License-Identifier: GPL-2.0-or-later
0008  */
0009 
0010 #ifndef KIS_GRID_DECORATION_H
0011 #define KIS_GRID_DECORATION_H
0012 
0013 #include <QScopedPointer>
0014 #include <kis_canvas_decoration.h>
0015 
0016 class KisGridConfig;
0017 
0018 
0019 class KisGridDecoration : public KisCanvasDecoration
0020 {
0021     Q_OBJECT
0022 public:
0023     KisGridDecoration(KisView* parent);
0024     ~KisGridDecoration() override;
0025 
0026     void setGridConfig(const KisGridConfig &config);
0027 
0028 protected:
0029     void drawDecoration(QPainter& gc, const QRectF& updateArea, const KisCoordinatesConverter* converter, KisCanvas2* canvas) override;
0030 
0031 private:
0032     struct Private;
0033     const QScopedPointer<Private> m_d;
0034 };
0035 
0036 #endif // KIS_GRID_DECORATION_H