summaryrefslogtreecommitdiffstats
path: root/krita/ui/kis_part_layer_handler.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-26 00:29:37 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-26 00:29:37 +0000
commit2785103a6bd4de55bd26d79e34d0fdd4b329a73a (patch)
treec2738b1095bfdb263da27bc1391403d829522a14 /krita/ui/kis_part_layer_handler.cc
parentf008adb5a77e094eaf6abf3fc0f36958e66896a5 (diff)
downloadkoffice-2785103a6bd4de55bd26d79e34d0fdd4b329a73a.tar.gz
koffice-2785103a6bd4de55bd26d79e34d0fdd4b329a73a.zip
Remove krita* in preparation for name switch from Krita to Chalk
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238361 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/ui/kis_part_layer_handler.cc')
-rw-r--r--krita/ui/kis_part_layer_handler.cc94
1 files changed, 0 insertions, 94 deletions
diff --git a/krita/ui/kis_part_layer_handler.cc b/krita/ui/kis_part_layer_handler.cc
deleted file mode 100644
index f062e4a1..00000000
--- a/krita/ui/kis_part_layer_handler.cc
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2006 Bart Coppens <[email protected]>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-#include "kis_canvas.h"
-#include <fixx11h.h> // kis_canvas.h does X11 stuff
-
-#include <tqpainter.h>
-#include <tqcursor.h>
-
-#include "kis_cursor.h"
-#include "kis_canvas_painter.h"
-#include "kis_move_event.h"
-#include "kis_button_press_event.h"
-#include "kis_button_release_event.h"
-#include "kis_group_layer.h"
-#include "kis_part_layer_handler.h"
-
-KisPartLayerHandler::KisPartLayerHandler(KisView* view, const KoDocumentEntry& entry,
- KisGroupLayerSP tqparent, KisLayerSP above)
- : m_parent(tqparent), m_above(above), m_view(view), m_entry(entry) {
- m_started = false;
- view->getCanvasController()->setCanvasCursor( KisCursor::selectCursor() );
-}
-
-void KisPartLayerHandler::done() {
- emit handlerDone(); // We will get deleted by the view
-}
-
-void KisPartLayerHandler::gotMoveEvent(KisMoveEvent* event) {
- if (!m_started) {
- emit sigGotMoveEvent(event);
- return;
- }
-
- KisCanvasPainter painter(m_view->getCanvasController()->kiscanvas());
- painter.setRasterOp( NotROP );
-
- // erase old lines
- TQRect r(m_start, m_end);
- r = r.normalize();
- if (!r.isEmpty())
- painter.drawRect(r);
-
- m_end = event->pos().roundTQPoint();
- r = TQRect(m_start, m_end).normalize();
-
- painter.drawRect(r);
- painter.end();
-}
-
-void KisPartLayerHandler::gotButtonPressEvent(KisButtonPressEvent* event) {
- m_start = event->pos().roundTQPoint();
- m_end = m_start;
- m_started = true;
-}
-
-void KisPartLayerHandler::gotButtonReleaseEvent(KisButtonReleaseEvent* event) {
- if (!m_started) {
- done();
- return;
- }
-
- m_end = event->pos().roundTQPoint();
-
- TQRect r(m_start, m_end);
-
- m_view->insertPart(r.normalize(), m_entry, m_parent, m_above);
- // We will get deleted by the view through the above
-}
-
-void KisPartLayerHandler::gotKeyPressEvent(TQKeyEvent* event) {
- if (event->key() == Key_Escape) {
- done();
- } else {
- emit sigGotKeyPressEvent(event);
- }
-}
-
-#include "kis_part_layer_handler.moc"