chalk

kis_perspective_grid_manager.h
1/*
2 * This file is part of Chalk
3 *
4 * Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#ifndef KIS_PERSPECTIVE_GRID_MANAGER_H
22#define KIS_PERSPECTIVE_GRID_MANAGER_H
23
24#include <tqobject.h>
25
26class TDEAction;
27class TDEActionCollection;
28class TDEToggleAction;
29class KisView;
30
31class KisPerspectiveGridManager : public TQObject
32{
33 TQ_OBJECT
34
35 public:
36 KisPerspectiveGridManager(KisView * parent);
37 ~KisPerspectiveGridManager();
38 void setup(TDEActionCollection * collection);
39 void drawGrid(TQRect wr, TQPainter *p, bool openGL = false);
40 void startEdition();
41 void stopEdition();
42 void setGridVisible(bool t);
43 public slots:
44 void updateGUI();
45 void clearPerspectiveGrid();
46 private slots:
47 void toggleGrid();
48 private:
49 bool m_toggleEdition;
50 KisView* m_view;
51 TDEToggleAction* m_toggleGrid;
52 TDEAction* m_gridClear;
53};
54
55#endif