chalk

kis_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_GRID_MANAGER_H
22#define KIS_GRID_MANAGER_H
23
24#include <tqobject.h>
25
26#include "kis_types.h"
27
28class KisView;
29class TDEActionCollection;
30class TDEToggleAction;
31class TDEAction;
32
33class KisGridManager : public TQObject
34{
35 TQ_OBJECT
36
37 public:
38 KisGridManager(KisView * parent);
39 ~KisGridManager();
40 public:
41 void setup(TDEActionCollection * collection);
42 void drawGrid(TQRect wr, TQPainter *p, bool openGL = false);
43 public slots:
44 void updateGUI();
45 private slots:
46 void toggleGrid();
47 void fastConfig1x1();
48 void fastConfig2x2();
49 void fastConfig5x5();
50 void fastConfig10x10();
51 void fastConfig20x20();
52 void fastConfig40x40();
53 private:
54 KisView* m_view;
55 TDEToggleAction* m_toggleGrid;
56 TDEAction* m_gridConfig;
57 TDEAction* m_gridFastConfig1x1;
58 TDEAction* m_gridFastConfig2x2;
59 TDEAction* m_gridFastConfig5x5;
60 TDEAction* m_gridFastConfig10x10;
61 TDEAction* m_gridFastConfig20x20;
62 TDEAction* m_gridFastConfig40x40;
63};
64
65#endif