Commits

Arne Babenhauserheide  committed 7118cb9

not yet working try to add a default gesture.

  • Participants
  • Parent commits 9c9ad05

Comments (0)

Files changed (1)

 from user import home
 
 # basic graphical stuff
-from PyQt4.QtGui import QWidget, QGridLayout, QCursor, QIcon, QLabel, QLineEdit, QPushButton, QKeySequence
+from PyQt4.QtGui import QWidget, QGridLayout, QCursor, QIcon, QLabel, QLineEdit, QPushButton, QKeySequence, QPolygon
 # basic definitions and datatypes
-from PyQt4.QtCore import Qt, QPointF, SIGNAL, SLOT
+from PyQt4.QtCore import Qt, QPointF, QPoint, SIGNAL, SLOT
 
 # Basics for KDE integration
-from PyKDE4.kdeui import KIconLoader, KAction, KActionCollection, KShortcut
+from PyKDE4.kdeui import KIconLoader, KAction, KActionCollection, KShortcut, KShapeGesture
 # And a basic dialog class for the edit item dialog.
 from PyKDE4.kdeui import KDialog
 # also the KWindowSystem, so we can get ourselves to the foreground
         short.setAlternate(QKeySequence(Qt.META + Qt.Key_F12))
         self.showAction.setShortcut(short)
         self.showAction.setGlobalShortcut(short)
+        # p0 = QPoint(9,3)
+        # p1 = QPoint(0,0)
+        # poly = QPolygon()
+        # poly.append(p0)
+        # poly.append(p1)
+        # reload_gesture = "0,0.0625,-0.5,0.5,1,0.0625,0.0625,-0.5,0.5,0.875,0.125,0.0625,-0.5,0.5,0.75,0.1875,0.0625,-0.5,0.5,0.625,0.25,0.0625,-0.5,0.5,0.5,0.3125,0.0625,-0.5,0.5,0.375,0.375,0.0625,-0.5,0.5,0.25,0.4375,0.0625,-0.5,0.5,0.125,0.5,0.0625,0.5,0.5,0,0.5625,0.0625,0.5,0.5,0.125,0.625,0.0625,0.5,0.5,0.25,0.6875,0.0625,0.5,0.5,0.375,0.75,0.0625,0.5,0.5,0.5,0.8125,0.0625,0.5,0.5,0.625,0.875,0.0625,0.5,0.5,0.75,0.9375,0.0625,0.5,0.5,0.875,1,0,0,0.5,1"
+        # gest = KShapeGesture(reload_gesture)
+        # gest.setShapeName("line, 1 right, 1/3rd up")
+        # self.showAction.setShapeGesture(gest)
+        # print self.showAction.shapeGesture().toString()
         self.showAction.connect(self.showAction, SIGNAL("triggered(Qt::MouseButtons, Qt::KeyboardModifiers)"), self.showByShortcut)
 
         # Setup the circle - TODO: Call it via KUniqueApplication.newInstance