Module morseInput_ui :: Class MorseInput
[hide private]
[frames] | no frames]

Class MorseInput

source code

       object --+                    
                |                    
sip.simplewrapper --+                
                    |                
          sip.wrapper --+            
                        |            
     PyQt4.QtCore.QObject --+        
                            |        
           object --+       |        
                    |       |        
    sip.simplewrapper --+   |        
                        |   |        
 PyQt4.QtGui.QPaintDevice --+        
                            |        
          PyQt4.QtGui.QWidget --+    
                                |    
          PyQt4.QtGui.QMainWindow --+
                                    |
                                   MorseInput

Manages all UI interactions with the Morse code generation.

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QMainWindow: DockOption, DockOptions

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
initCursorConstrainer(self) source code
 
computeInnerButtonEdges(self) source code
 
startCursorConstraint(self) source code
 
stopCursorConstraint(self) source code
 
createColors(self) source code
 
findFile(self, path, matchFunc=<function isfile at 0x7f1aa1fc6d70>) source code
 
insertGestureButtons(self) source code
 
installMenuBar(self) source code
 
installStatusBar(self) source code
 
connectWidgets(self) source code
 
expandMorePanel(self, expansion)
Expand or hide the main window's bottom panel, which holds the speed meter.
source code
QRect
getAdjustedWinGeo(self, pixels)
Given a positive or negative number of pixels, return a rectangle that is respectively higher or shorter than the current main window.
source code
 
adjustMainWindowHeight(self, x, y, width, height)
Given a rectangle, adjust the main window dimensions to take that shape.
source code
 
togglePanelExpansion(self) source code
 
showOptions(self) source code
 
showCheatSheet(self) source code
 
setOptions(self) source code
 
initOptionsDialogFromOptions(self) source code
 
sliderReadoutModified(self, slider) source code
 
checkboxStateChanged(self, checkbox, newState)
Called when any of the option dialog's checkboxes change:
source code
 
sliderStateChanged(self, slider, newValue) source code
 
setCursorDeceleration(self, newValue)
Change deceleration multiplier for cursor movement inside the rest zone.
source code
 
optionsSaveButton(self) source code
 
optionsCancelButton(self)
Undo option changes user played with while option box was open.
source code
 
buttonEntered(self, buttonObj) source code
 
buttonExited(self, buttonObj) source code
 
eventFilter(self, target, event) source code
 
moveEvent(self, event)
Called when window is repositioned.
source code
 
mousePressEvent(self, mouseEvent) source code
 
mouseReleaseEvent(self, mouseEvent) source code
 
resizeEvent(self, event) source code
 
cursorInRestZone(self, pos) source code
 
cursorInButton(self, buttonObj, pos, tolerance=0)
Return True if given position is within the given button object.
source code
 
handleCursorConstraint(self, mouseEvent)
Manages constraining the cursor to vertical/horizontal.
source code
 
unconstrainTheCursor(self) source code
 
deliverInput(self, reason, detail) source code
 
outputLetters(self, lettersToSend) source code
 
outputBackspace(self) source code
 
outputNewline(self) source code
 
tickerTapeSet(self, text) source code
 
tickerTapeClear(self, dummy) source code
 
tickerTapeAppend(self, text) source code
 
showCrossHair(self, crossHairColor) source code
 
hideCrossHair(self) source code
 
flashCrosshair(self, crossHairColor=0) source code
 
restoreCrosshair(self, crossHairColor=0)
Show the crosshair with the given color.
source code
 
blinkCrosshair(self, doBlink=True, crossHairColor=0) source code
 
toggleBlink(self, crossHairColor)
If alternates between crosshair on and off.
source code
 
powerToggled(self) source code
 
exit(self) source code
 
closeEvent(self, event) source code
 
cleanup(self) source code

Inherited from PyQt4.QtGui.QMainWindow: addDockWidget, addToolBar, addToolBarBreak, centralWidget, contextMenuEvent, corner, createPopupMenu, dockOptions, dockWidgetArea, documentMode, event, iconSize, iconSizeChanged, insertToolBar, insertToolBarBreak, isAnimated, isDockNestingEnabled, isSeparator, menuBar, menuWidget, removeDockWidget, removeToolBar, removeToolBarBreak, restoreDockWidget, restoreState, saveState, setAnimated, setCentralWidget, setCorner, setDockNestingEnabled, setDockOptions, setDocumentMode, setIconSize, setMenuBar, setMenuWidget, setStatusBar, setTabPosition, setTabShape, setToolButtonStyle, setUnifiedTitleAndToolBarOnMac, splitDockWidget, statusBar, tabPosition, tabShape, tabifiedDockWidgets, tabifyDockWidget, toolBarArea, toolBarBreak, toolButtonStyle, toolButtonStyleChanged, unifiedTitleAndToolBarOnMac

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsMargins, contentsRect, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontChange, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, handle, hasFocus, hasMouseTracking, height, heightForWidth, hide, hideEvent, inputContext, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isEnabledToTLW, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isTopLevel, isVisible, isVisibleTo, isWindow, isWindowModified, keyPressEvent, keyReleaseEvent, keyboardGrabber, languageChange, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, move, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, paletteChange, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resetInputContext, resize, restoreGeometry, saveGeometry, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputContext, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setShown, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, show, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, topLevelWidget, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, winId, window, windowActivationChange, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, x, x11Info, x11PictureHandle, y

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from PyQt4.QtGui.QPaintDevice: colorCount, depth, heightMM, logicalDpiX, logicalDpiY, numColors, paintingActive, physicalDpiX, physicalDpiY, widthMM

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
letterCompleteNotification(reason, details='')
Called from MorseGenerator when one letter has become available, or when a dwell end-of-letter, or dwell end-of-word was detected.
source code
Class Variables [hide private]
  MORSE_BUTTON_WIDTH = 100
  MORSE_BUTTON_HEIGHT = 100
  SUPPORT_BUTTON_WIDTHS = 80
  SUPPORT_BUTTON_HEIGHTS = 80
  MOUSE_UNCONSTRAIN_TIMEOUT = 300
  HEAD_TRACKER = True

Inherited from PyQt4.QtGui.QMainWindow: AllowNestedDocks, AllowTabbedDocks, AnimatedDocks, ForceTabbedDocks, VerticalTabs

Inherited from PyQt4.QtGui.QWidget: DrawChildren, DrawWindowBackground, IgnoreMask

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Inherited from PyQt4.QtGui.QPaintDevice: PdmDepth, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

expandMorePanel(self, expansion)

source code 

Expand or hide the main window's bottom panel, which holds the speed meter.

Parameters:
  • expansion (PanelExpansion) - expand vs. hide

getAdjustedWinGeo(self, pixels)

source code 

Given a positive or negative number of pixels, return a rectangle that is respectively higher or shorter than the current main window.

Parameters:
  • pixels (int) - number of pixels to add or subtract from the height
Returns: QRect
new rectangle

adjustMainWindowHeight(self, x, y, width, height)

source code 

Given a rectangle, adjust the main window dimensions to take that shape.

Parameters:
  • x (int)
  • y (int)
  • width (int)
  • height (int)
Decorators:
  • @QtCore.Slot(int, int, int, int)

checkboxStateChanged(self, checkbox, newState)

source code 

Called when any of the option dialog's checkboxes change:

Parameters:
  • checkbox (QCheckBox) - the affected checkbox
  • newState (QCheckState) - the new state, though Qt docs are cagey about what this means: an int of some kind.

setCursorDeceleration(self, newValue)

source code 

Change deceleration multiplier for cursor movement inside the rest zone. Value should vary between 0.001 and 1.0

Parameters:
  • newValue (float.) - multiplier that decelerates cursor.

eventFilter(self, target, event)

source code 
Overrides: PyQt4.QtCore.QObject.eventFilter

moveEvent(self, event)

source code 

Called when window is repositioned. Need to recompute the cashed global-x positions of the right-side dot button, and the left-side dash button.

Parameters:
  • event (QMoveEvent) - move event
Overrides: PyQt4.QtGui.QWidget.moveEvent

mousePressEvent(self, mouseEvent)

source code 
Overrides: PyQt4.QtGui.QWidget.mousePressEvent

mouseReleaseEvent(self, mouseEvent)

source code 
Overrides: PyQt4.QtGui.QWidget.mouseReleaseEvent

resizeEvent(self, event)

source code 
Overrides: PyQt4.QtGui.QWidget.resizeEvent

cursorInButton(self, buttonObj, pos, tolerance=0)

source code 

Return True if given position is within the given button object. An optional positive or negative tolerance is added to the button dimensions. This addition allows for caller to compensate for cursor drift by 'blurring' the true button edges.

Parameters:
  • buttonObj (QPushButton) - QPushButton or derivative to check.
  • pos (QPoint) - x/y coordinate to test
  • tolerance (int) - number of pixels the cursor may be outside the button, yet still be reported as inside.

handleCursorConstraint(self, mouseEvent)

source code 

Manages constraining the cursor to vertical/horizontal. Caller is responsible for checking that cursor constraining is wanted. This method assumes so.

Parameters:
  • mouseEvent (QMouseEvent) - mouse move event that needs to be addressed

letterCompleteNotification(reason, details='')
Static Method

source code 

Called from MorseGenerator when one letter has become available, or when a dwell end-of-letter, or dwell end-of-word was detected. Sends a signal and returns right away.

Parameters:
  • reason (TimeoutReason) - indicator whether regular letter, or end of word.

deliverInput(self, reason, detail)

source code 
Decorators:
  • @QtCore.Slot(int, str)

restoreCrosshair(self, crossHairColor=0)

source code 

Show the crosshair with the given color. Stop the flash timer. This is a timeout method. Used by flashCrosshair().

Parameters:
  • crossHairColor ()

toggleBlink(self, crossHairColor)

source code 

If alternates between crosshair on and off. This is a timeout method. Used by blinkCrosshair()

Parameters:
  • crossHairColor ()

closeEvent(self, event)

source code 
Overrides: PyQt4.QtGui.QWidget.closeEvent