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

List:       kde-commits
Subject:    koffice/karbon/tools
From:       Rob Buis <rwlbuis () xs4all ! nl>
Date:       2002-12-05 17:28:36
[Download RAW message or body]

CVS commit by buis: 


Allow arrow up/down bindings here as well, to change nr of edges for polygons and
number of segments for spirals.


  M +19 -0     vpolygontool.cc   1.17
  M +2 -0      vpolygontool.h   1.13
  M +19 -0     vspiraltool.cc   1.22
  M +2 -0      vspiraltool.h   1.14


--- koffice/karbon/tools/vpolygontool.cc:1.16	Sun Nov 17 17:04:25 2002
@@ -91,6 +91,25 @@
 	m_optionsWidget->refreshUnit();
 }
 
+void
+VPolygonTool::arrowKeyReleased( Qt::Key key )
+{
+	int change = 0;
+	if( key == Qt::Key_Up )
+		change = 1;
+	else if( key == Qt::Key_Down )
+		change = -1;
+
+	if( change != 0 )
+	{
+		draw();
+
+		m_optionsWidget->setEdges( m_optionsWidget->edges() + change );
+
+		draw();
+	}
+}
+
 VComposite*
 VPolygonTool::shape( bool interactive ) const
 {
--- koffice/karbon/tools/vpolygontool.h:1.12	Sun Nov 17 17:04:25 2002
@@ -41,6 +41,8 @@
 
 	void refreshUnit();
 
+	virtual void arrowKeyReleased( Qt::Key );
+
 private:
 	class VPolygonOptionsWidget : public QGroupBox
 	{
--- koffice/karbon/tools/vspiraltool.cc:1.21	Sun Nov 17 16:49:45 2002
@@ -117,6 +117,25 @@
 	m_optionsWidget->setClockwise( true );
 }
 
+void
+VSpiralTool::arrowKeyReleased( Qt::Key key )
+{
+	int change = 0;
+	if( key == Qt::Key_Up )
+		change = 1;
+	else if( key == Qt::Key_Down )
+		change = -1;
+
+	if( change != 0 )
+	{
+		draw();
+
+		m_optionsWidget->setSegments( m_optionsWidget->segments() + change );
+
+		draw();
+	}
+}
+
 VSpiralTool::~VSpiralTool()
 {
 	delete( m_optionsWidget );
--- koffice/karbon/tools/vspiraltool.h:1.13	Sun Oct 27 13:59:22 2002
@@ -47,6 +47,8 @@
 
 	void refreshUnit();
 
+	virtual void arrowKeyReleased( Qt::Key );
+
 private:
 	class VSpiralOptionsWidget : public QGroupBox
 	{

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

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