chalk

kis_part_layer_handler.h
1/*
2 * Copyright (c) 2006 Bart Coppens <kde@bartcoppens.be>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18#ifndef KIS_PART_LAYER_HANDLER_
19#define KIS_PART_LAYER_HANDLER_
20
21#include <tqobject.h>
22#include <KoQueryTrader.h> // KoDocumentEntry
23
24#include "kis_types.h"
25#include "kis_doc.h"
26#include "kis_view.h"
27
28class TQKeyEvent;
29
30class KisPartLayerHandler : public TQObject {
31TQ_OBJECT
32
33public:
34 KisPartLayerHandler(KisView* view, const KoDocumentEntry& entry,
35 KisGroupLayerSP parent, KisLayerSP above);
36signals:
37 void sigGotMoveEvent(KisMoveEvent* event);
38 void sigGotKeyPressEvent(TQKeyEvent* event);
39 void handlerDone();
40
41protected slots:
42
43 void gotMoveEvent(KisMoveEvent* event);
44 void gotButtonPressEvent(KisButtonPressEvent* event);
45 void gotButtonReleaseEvent(KisButtonReleaseEvent* event);
46 void gotKeyPressEvent(TQKeyEvent* event);
47protected:
48 void done();
49 KisGroupLayerSP m_parent;
50 KisLayerSP m_above;
51 KisView* m_view;
52 KoDocumentEntry m_entry;
53 TQPoint m_start;
54 TQPoint m_end;
55 bool m_started;
56};
57
58#endif // KIS_PART_LAYER_HANDLER