~benomrane-b/avogadro/avogadro

« back to all changes in this revision

Viewing changes to libavogadro/examples/python/tooltemplate.py

  • Committer: benomrane_b at yahoo
  • Date: 2014-07-02 17:22:21 UTC
  • Revision ID: benomrane_b@yahoo.fr-20140702172221-vf3hdle85h6szhhf
Release version 1.1.1 2013-12-11

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from PyQt4.Qt import *
 
2
import Avogadro
 
3
 
 
4
class Tool(QObject):
 
5
  # constructor
 
6
  def __init__(self):
 
7
    QObject.__init__(self)
 
8
 
 
9
  # widget = GLWidget
 
10
  def paint(self, widget):
 
11
    # Painter
 
12
    # print("paint(", widget, ")")
 
13
    return None
 
14
 
 
15
  # widget = GLWidget
 
16
  # mouseEvent = QMouseEvent
 
17
  def mousePressEvent(self, widget, mouseEvent):
 
18
    # print("mousePressEvent(", widget, ",", mouseEvent, ")")
 
19
    # mouseEvent.accept()
 
20
    return None
 
21
  
 
22
  def mouseMoveEvent(self, widget, mouseEvent):
 
23
    # print("mouseMoveEvent(", widget, ",", mouseEvent, ")")
 
24
    # mouseEvent.accept()
 
25
    return None
 
26
 
 
27
  def mouseReleaseEvent(self, widget, mouseEvent):
 
28
    # print("mouseReleaseEvent(", widget, ",", mouseEvent, ")")
 
29
    # mouseEvent.accept()
 
30
    return None
 
31
 
 
32
  def wheelEvent(self, widget, wheelEvent):
 
33
    # print("wheelEvent(", widget, ",", wheelEvent, ")")
 
34
    # wheelEvent.accept()
 
35
    return None