krita

kis_part_layer_handler.h

00001 /*
00002  *  Copyright (c) 2006 Bart Coppens <kde@bartcoppens.be>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 #ifndef KIS_PART_LAYER_HANDLER_
00019 #define KIS_PART_LAYER_HANDLER_
00020 
00021 #include <qobject.h>
00022 #include <KoQueryTrader.h> // KoDocumentEntry
00023 
00024 #include "kis_types.h"
00025 #include "kis_doc.h"
00026 #include "kis_view.h"
00027 
00028 class QKeyEvent;
00029 
00030 class KisPartLayerHandler : public QObject {
00031 Q_OBJECT
00032 public:
00033     KisPartLayerHandler(KisView* view, const KoDocumentEntry& entry,
00034                         KisGroupLayerSP parent, KisLayerSP above);
00035 signals:
00036     void sigGotMoveEvent(KisMoveEvent* event);
00037     void sigGotKeyPressEvent(QKeyEvent* event);
00038     void handlerDone();
00039 
00040 protected slots:
00041 
00042     void gotMoveEvent(KisMoveEvent* event);
00043     void gotButtonPressEvent(KisButtonPressEvent* event);
00044     void gotButtonReleaseEvent(KisButtonReleaseEvent* event);
00045     void gotKeyPressEvent(QKeyEvent* event);
00046 protected:
00047     void done();
00048     KisGroupLayerSP m_parent;
00049     KisLayerSP m_above;
00050     KisView* m_view;
00051     KoDocumentEntry m_entry;
00052     QPoint m_start;
00053     QPoint m_end;
00054     bool m_started;
00055 };
00056 
00057 #endif // KIS_PART_LAYER_HANDLER
KDE Home | KDE Accessibility Home | Description of Access Keys