krita

kis_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_GRID_MANAGER_H
00022 #define KIS_GRID_MANAGER_H
00023 
00024 #include <qobject.h>
00025 
00026 #include "kis_types.h"
00027 
00028 class KisView;
00029 class KActionCollection;
00030 class KToggleAction;
00031 class KAction;
00032 
00033 class KisGridManager : public QObject
00034 {
00035     Q_OBJECT
00036     public:
00037         KisGridManager(KisView * parent);
00038         ~KisGridManager();
00039     public:
00040         void setup(KActionCollection * collection);
00041         void drawGrid(QRect wr, QPainter *p, bool openGL = false);
00042     public slots:
00043         void updateGUI();
00044     private slots:
00045         void toggleGrid();
00046         void fastConfig1x1();
00047         void fastConfig2x2();
00048         void fastConfig5x5();
00049         void fastConfig10x10();
00050         void fastConfig20x20();
00051         void fastConfig40x40();
00052     private:
00053         KisView* m_view;
00054         KToggleAction* m_toggleGrid;
00055         KAction* m_gridConfig;
00056         KAction* m_gridFastConfig1x1;
00057         KAction* m_gridFastConfig2x2;
00058         KAction* m_gridFastConfig5x5;
00059         KAction* m_gridFastConfig10x10;
00060         KAction* m_gridFastConfig20x20;
00061         KAction* m_gridFastConfig40x40;
00062 };
00063 
00064 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys