krita

kis_perspective_grid_manager.h

00001 /*
00002  * This file is part of Krita
00003  *
00004  *  Copyright (c) 2006 Cyrille Berger <cberger@cberger.net>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef KIS_PERSPECTIVE_GRID_MANAGER_H
00022 #define KIS_PERSPECTIVE_GRID_MANAGER_H
00023 
00024 #include <qobject.h>
00025 
00026 class KAction;
00027 class KActionCollection;
00028 class KToggleAction;
00029 class KisView;
00030 
00031 class KisPerspectiveGridManager : public QObject
00032 {
00033     Q_OBJECT
00034     public:
00035         KisPerspectiveGridManager(KisView * parent);
00036         ~KisPerspectiveGridManager();
00037         void setup(KActionCollection * collection);
00038         void drawGrid(QRect wr, QPainter *p, bool openGL = false);
00039         void startEdition();
00040         void stopEdition();
00041         void setGridVisible(bool t);
00042     public slots:
00043         void updateGUI();
00044         void clearPerspectiveGrid();
00045     private slots:
00046         void toggleGrid();
00047     private:
00048         bool m_toggleEdition;
00049         KisView* m_view;
00050         KToggleAction* m_toggleGrid;
00051         KAction* m_gridClear;
00052 };
00053 
00054 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys