minor edits

This commit is contained in:
Luke Campagnola 2013-07-03 08:54:18 -04:00
parent f03703e78f
commit 79e2b1403b
4 changed files with 16 additions and 41 deletions

View File

@ -11,6 +11,12 @@ Extension for building Qt-like documentation.
def setup(app):
# probably we will be making a wrapper around autodoc
app.setup_extension('sphinx.ext.autodoc')
# would it be useful to define a new domain?
#app.add_domain(QtDomain)
## Add new configuration options
app.add_config_value('todo_include_todos', False, False)

View File

@ -27,7 +27,7 @@ sys.path.insert(0, os.path.join(path, '..', 'extensions'))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'qt_doc']
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@ -76,15 +76,23 @@ Qt detects and reacts to user interaction by executing its *event loop*.
GraphicsView and GraphicsItems
------------------------------
More information about the architecture of Qt GraphicsView:
http://qt-project.org/doc/qt-4.8/graphicsview.html
Coordinate Systems and Transformations
--------------------------------------
More information about the coordinate systems in Qt GraphicsView:
http://qt-project.org/doc/qt-4.8/graphicsview.html#the-graphics-view-coordinate-system
Mouse and Keyboard Input
------------------------
QTimer, Multi-Threading
-----------------------

View File

@ -1621,7 +1621,7 @@ class PolyLineROI(ROI):
if pos is None:
pos = [0,0]
#pen=args.get('pen', fn.mkPen((100,100,255)))
ROI.__init__(self, pos, size=[1,1], **args)
self.closed = closed
self.segments = []
@ -1632,33 +1632,6 @@ class PolyLineROI(ROI):
start = -1 if self.closed else 0
for i in range(start, len(self.handles)-1):
self.addSegment(self.handles[i]['item'], self.handles[i+1]['item'])
#for i in range(len(positions)-1):
#h2 = self.addFreeHandle(positions[i+1])
#segment = LineSegmentROI(handles=(h, h2), pen=pen, parent=self, movable=False)
#self.segments.append(segment)
#h = h2
#for i, s in enumerate(self.segments):
#h = s.handles[0]
#self.addFreeHandle(h['pos'], item=h['item'])
#s.setZValue(self.zValue() +1)
#h = self.segments[-1].handles[1]
#self.addFreeHandle(h['pos'], item=h['item'])
#if closed:
#h1 = self.handles[-1]['item']
#h2 = self.handles[0]['item']
#self.segments.append(LineSegmentROI([positions[-1], positions[0]], pos=pos, handles=(h1, h2), pen=pen, parent=self, movable=False))
#h2.setParentItem(self.segments[-1])
#for s in self.segments:
#self.setSegmentSettings(s)
#def movePoint(self, *args, **kargs):
#pass
def addSegment(self, h1, h2, index=None):
seg = LineSegmentROI(handles=(h1, h2), pen=self.pen, parent=self, movable=False)
@ -1675,9 +1648,6 @@ class PolyLineROI(ROI):
def setMouseHover(self, hover):
## Inform all the ROI's segments that the mouse is(not) hovering over it
#if self.mouseHovering == hover:
#return
#self.mouseHovering = hover
ROI.setMouseHover(self, hover)
for s in self.segments:
s.setMouseHover(hover)
@ -1702,15 +1672,6 @@ class PolyLineROI(ROI):
self.addSegment(h3, h2, index=i+1)
segment.replaceHandle(h2, h3)
#def report(self):
#for s in self.segments:
#print s
#for h in s.handles:
#print " ", h
#for h in self.handles:
#print h
def removeHandle(self, handle, updateSegments=True):
ROI.removeHandle(self, handle)
handle.sigRemoveRequested.disconnect(self.removeHandle)