[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/krita/tools
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2005-07-20 8:42:09
Message-ID: 1121848929.661535.28558.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 436787 by rempt:

Don't code against KisView and KisDoc but against their interfaces.


 M  +1 -0      default_tools.cc  
 M  +1 -3      kis_tool_brush.cc  
 M  +0 -5      kis_tool_colorchanger.cc  
 M  +0 -1      kis_tool_colorchanger.h  
 M  +0 -2      kis_tool_duplicate.cc  
 M  +1 -8      kis_tool_ellipse.cc  
 M  +0 -2      kis_tool_ellipse.h  
 M  +2 -2      kis_tool_fill.cc  
 M  +7 -7      kis_tool_gradient.cc  
 M  +2 -2      kis_tool_line.cc  
 M  +5 -12     kis_tool_rectangle.cc  
 M  +0 -8      kis_tool_stamp.cc  
 M  +0 -1      kis_tool_text.cc  


--- trunk/koffice/krita/tools/default_tools.cc #436786:436787
@@ -52,6 +52,7 @@
 #include "kis_tool_zoom.h"
 #include "kis_tool_ellipse.h"
 #include "kis_tool_pan.h"
+#include "kis_view.h"
 
 typedef KGenericFactory<DefaultTools> DefaultToolsFactory;
 K_EXPORT_COMPONENT_FACTORY( kritadefaulttools, DefaultToolsFactory( "krita" ) )
--- trunk/koffice/krita/tools/kis_tool_brush.cc #436786:436787
@@ -33,12 +33,10 @@
 #include "kis_paintop_registry.h"
 #include "kis_cmb_composite.h"
 #include "kis_cursor.h"
-#include "kis_doc.h"
 #include "kis_painter.h"
 #include "kis_tool_brush.h"
-#include "kis_view.h"
+#include "kis_canvas_subject.h"
 
-
 KisToolBrush::KisToolBrush()
         : super(i18n("Brush"))
 {
--- trunk/koffice/krita/tools/kis_tool_colorchanger.cc #436786:436787
@@ -25,8 +25,6 @@
 
 #include <qcolor.h>
 
-#include "kis_doc.h"
-#include "kis_view.h"
 #include "kis_canvas.h"
 #include "kis_cursor.h"
 #include "kis_tool_colorchanger.h"
@@ -40,7 +38,6 @@
 
 	m_subject = 0;
 
-// 	KisView *view = getCurrentView();
 // 	// initialize color changer settings
 // 	m_opacity = 255;
 // 	m_usePattern  = false;
@@ -76,7 +73,6 @@
 // 	int sGreen;
 // 	int sBlue;
 // 	QRgb srgb;
-// 	KisView *view = getCurrentView();
 // 	KisImage *img = m_doc -> currentImg();
 
 // 	if (!img)
@@ -203,7 +199,6 @@
 
 // 	// User change value ?
 // 	if ( old_usePattern != m_usePattern || old_useGradient != m_useGradient || \
                old_m_opacity != m_opacity ) {
-// 		KisView *view = getCurrentView();
 // 		// note that gradients and patterns are not associated with a
 // 		// particular tool, unlike the other options
 
--- trunk/koffice/krita/tools/kis_tool_colorchanger.h #436786:436787
@@ -24,7 +24,6 @@
 
 #include <qpoint.h>
 
-#include "kis_view.h"
 #include "kis_tool.h"
 #include "kis_tool_paint.h"
 #include "kis_layer.h"
--- trunk/koffice/krita/tools/kis_tool_duplicate.cc #436786:436787
@@ -26,9 +26,7 @@
 #include <klocale.h>
 
 #include "kis_brush.h"
-#include "kis_view.h"
 #include "kis_cursor.h"
-#include "kis_doc.h"
 #include "kis_image.h"
 #include "kis_tool_duplicate.h"
 #include "kis_painter.h"
--- trunk/koffice/krita/tools/kis_tool_ellipse.cc #436786:436787
@@ -27,8 +27,6 @@
 #include <kdebug.h>
 #include <klocale.h>
 
-#include "kis_doc.h"
-#include "kis_view.h"
 #include "kis_painter.h"
 #include "kis_canvas_subject.h"
 #include "kis_canvas_controller.h"
@@ -37,6 +35,7 @@
 #include "kis_button_release_event.h"
 #include "kis_move_event.h"
 #include "kis_paintop_registry.h"
+#include "kis_undo_adapter.h"
 
 KisToolEllipse::KisToolEllipse()
         : super(i18n ("Ellipse")),
@@ -44,12 +43,6 @@
           m_currentImage (0)
 {
 	setName("tool_ellipse");
-	// initialize ellipse tool settings
-//	m_lineThickness = 4;
-// 	m_opacity = 255;
-// 	m_usePattern = false;
-// 	m_useGradient = false;
-// 	m_fillSolid = false;
 }
 
 KisToolEllipse::~KisToolEllipse()
--- trunk/koffice/krita/tools/kis_tool_ellipse.h #436786:436787
@@ -26,9 +26,7 @@
 #include "kis_tool_shape.h"
 
 class KisCanvas;
-class KisDoc;
 class KisPainter;
-class KisView;
 class KisRect;
 
 class KisToolEllipse : public KisToolShape {
--- trunk/koffice/krita/tools/kis_tool_fill.cc #436786:436787
@@ -34,9 +34,7 @@
 
 #include "kis_layer.h"
 #include "kis_cursor.h"
-#include "kis_doc.h"
 #include "kis_painter.h"
-#include "kis_view.h"
 #include "kis_tool_brush.h"
 #include "kis_cmb_composite.h"
 #include "kis_tool_fill.h"
@@ -47,6 +45,8 @@
 #include "kis_pattern.h"
 #include "kis_fill_painter.h"
 #include "kis_progress_display_interface.h"
+#include "kis_undo_adapter.h"
+#include "kis_canvas_subject.h"
 
 KisToolFill::KisToolFill() 
 	: super(i18n("Fill"))
--- trunk/koffice/krita/tools/kis_tool_gradient.cc #436786:436787
@@ -32,18 +32,18 @@
 #include <klocale.h>
 #include <knuminput.h>
 
-#include "kis_cursor.h"
-#include "kis_doc.h"
-#include "kis_painter.h"
-#include "kis_gradient_painter.h"
-#include "kis_tool_gradient.h"
-#include "kis_view.h"
 #include "kis_button_press_event.h"
 #include "kis_button_release_event.h"
-#include "kis_move_event.h"
+#include "kis_canvas_subject.h"
 #include "kis_cmb_composite.h"
+#include "kis_cursor.h"
 #include "kis_double_widget.h"
+#include "kis_gradient_painter.h"
+#include "kis_move_event.h"
+#include "kis_painter.h"
 #include "kis_progress_display_interface.h"
+#include "kis_tool_gradient.h"
+#include "kis_undo_adapter.h"
 
 KisToolGradient::KisToolGradient()
 	: super(i18n("Gradient")),
--- trunk/koffice/krita/tools/kis_tool_line.cc #436786:436787
@@ -28,14 +28,14 @@
 #include <klocale.h>
 
 #include "kis_cursor.h"
-#include "kis_doc.h"
 #include "kis_painter.h"
 #include "kis_tool_line.h"
-#include "kis_view.h"
 #include "kis_button_press_event.h"
 #include "kis_button_release_event.h"
 #include "kis_move_event.h"
 #include "kis_paintop_registry.h"
+#include "kis_canvas_subject.h"
+#include "kis_undo_adapter.h"
 
 KisToolLine::KisToolLine()
 	: super(i18n("Line")),
--- trunk/koffice/krita/tools/kis_tool_rectangle.cc #436786:436787
@@ -27,16 +27,15 @@
 #include <kdebug.h>
 #include <klocale.h>
 
-#include "kis_doc.h"
-#include "kis_view.h"
-#include "kis_painter.h"
-#include "kis_canvas_subject.h"
-#include "kis_canvas_controller.h"
-#include "kis_tool_rectangle.h"
 #include "kis_button_press_event.h"
 #include "kis_button_release_event.h"
+#include "kis_canvas_controller.h"
+#include "kis_canvas_subject.h"
 #include "kis_move_event.h"
+#include "kis_painter.h"
 #include "kis_paintop_registry.h"
+#include "kis_tool_rectangle.h"
+#include "kis_undo_adapter.h"
 
 KisToolRectangle::KisToolRectangle()
 	: super(i18n ("Rectangle")),
@@ -44,12 +43,6 @@
           m_currentImage (0)
 {
 	setName("tool_rectangle");
-// 	// initialize rectangle tool settings
-// 	m_lineThickness = 4;
-// 	m_opacity = 255;
-// 	m_usePattern = false;
-// 	m_useGradient = false;
-// 	m_fillSolid = false;
 }
 
 KisToolRectangle::~KisToolRectangle()
--- trunk/koffice/krita/tools/kis_tool_stamp.cc #436786:436787
@@ -27,10 +27,8 @@
 #include <klocale.h>
 
 #include "kis_cursor.h"
-#include "kis_doc.h"
 #include "kis_painter.h"
 #include "kis_tool_stamp.h"
-#include "kis_view.h"
 #include "kis_button_press_event.h"
 #include "kis_button_release_event.h"
 #include "kis_move_event.h"
@@ -145,8 +143,6 @@
 
 bool KisToolStamp::stampToCanvas(QPoint pos)
 {
-	KisView *view = getCurrentView();
-	KisImage* img = m_doc->currentImg();
 	KisLayer *lay = img->getCurrentLayer();
 	float zF = view->zoomFactor();
 
@@ -227,8 +223,6 @@
 
 bool KisToolStamp::stampColor(QPoint pos)
 {
-	KisView *view = getCurrentView();
-	KisImage *img = m_doc->currentImg();
 	KisLayer *lay = img->getCurrentLayer();
 	QImage  *qimg = m_pattern->image();
 
@@ -343,8 +337,6 @@
 void KisToolStamp::move(KisMoveEvent *e)
 {
 #if 0
-	KisView *view = getCurrentView();
-	KisImage * img = m_doc->currentImg();
 	if(!img) return;
 
 	KisLayer *lay = img->getCurrentLayer();
--- trunk/koffice/krita/tools/kis_tool_text.cc #436786:436787
@@ -35,7 +35,6 @@
 
 #include <qcolor.h>
 
-#include "kis_doc.h"
 #include "kis_point.h"
 #include "kis_image.h"
 #include "kis_layer.h"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic