Package tboard :: Module tboard :: Class TBoard
[hide private]
[frames] | no frames]

Class TBoard

source code

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

Nested Classes [hide private]

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
 
initNewDictWordDialog(self)
Initializes dialog window for user to add a new word to the dictionary.
source code
 
populateGestureButtons(self)
Creates GestureButton instances for each telephone pad button.
source code
 
connectWidgets(self)
Connect signals and button slots to their handlers.
source code
 
preparePixmaps(self)
Pull icons from the file system, and turn them into pixmaps.
source code
 
createColors(self)
Create QColor objects from RGB values.
source code
 
setGestureButtonStyle(self, buttonObj, styleID)
Style a gesture button.
source code
 
handleButtonFlicks(self, gestureButton, flickDirection)
Action on flicking in and out of a gesture button.
source code
 
handleButtonEntered(self, gestureButtonObj) source code
 
handleButtonExited(self, gestureButtonObj)
Handler for cursor having entered a gesture button.
source code
 
handleEraseWordButton(self)
Handler for erase-word button clicked.
source code
 
handleCrossoutTimeout(self)
Timeout handler that detects crossing out a letter by running through a gesture button and back.
source code
 
handleNumPad(self, numButton)
Handler for number pad button pressed.
source code
 
handleSpecialChars(self, specCharButton)
Handler: special character button pushed.
source code
 
handleGestureButtonClick(self, buttonObj)
Handler for gesture button click.
source code
 
handleSaveWordButton(self) source code
 
handleAddDictWordCapitalizeStateChanged(self, newCapsState) source code
 
handleAddDictWordOK_Cancel(self, button) source code
 
handleCopyAll(self) source code
 
doAddWordButton(self, newWord, rank) source code
 
switchButtonMode(self, buttonObj, newEditMode) source code
 
highlightNextLetter(self, buttonObj, flickDirection) source code
 
findCapitalLetter(self, word) source code
 
updateTickerTape(self) source code
 
showRemainingWords(self) source code
 
eraseCurrentWord(self) source code
 
erasePreviousLetter(self) source code
 
crossOutButton(self, buttonObj)
Show the given button crossed out.
source code
 
eraseTrail(self)
Erase the history trail.
source code
 
shiftButtonTrails(self, direction, newHead=None) source code
 
setButtonImage(self, gestureButtonObj, pixmap) source code
 
getAddWordUserInfo(self, newWord)
Prepare the Add New Word dialog, and show it:
source code
 
getButtonFromEncodedLetter(self, encLetter) source code

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuEvent, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, event, 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, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, paletteChange, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resetInputContext, resize, resizeEvent, 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, eventFilter, 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__

Class Variables [hide private]
  RARELY_BUTTON_ID = 0
  OCCCASIONALLY_BUTTON_ID = 1
  CONSTANTLY_BUTTON_ID = 2

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)

populateGestureButtons(self)

source code 

Creates GestureButton instances for each telephone pad button. Creates convenience data structures:

  • letterButtons is an array of all GestureButton instances
  • letterButtonToID maps GestureButton instances to the buttons' IDs, which happen to be their label strings ('ABC', 'DEF', etc.).
  • idToLetterButton is the reverse: a dictionary mapping button labels, like "ABC" to the corresponding button instance.

This function also sets style sheets for the all GestureButton instances.

setGestureButtonStyle(self, buttonObj, styleID)

source code 

Style a gesture button.

Parameters:
  • buttonObj (GestureButton) - the button to style
  • styleID (StyleID) - whether button is pressed or released

handleButtonFlicks(self, gestureButton, flickDirection)

source code 

Action on flicking in and out of a gesture button.

Parameters:
  • gestureButton (GestureButton) - button that was flicked
  • flickDirection (GestureButton.FlickDirection) - cursor flicked North, South, East, or West
Decorators:
  • @Slot(GestureButton, int)

handleButtonEntered(self, gestureButtonObj)

source code 
Decorators:
  • @Slot(GestureButton)

handleButtonExited(self, gestureButtonObj)

source code 

Handler for cursor having entered a gesture button.

Parameters:
  • gestureButtonObj (GestureButton) - button object that was entered
Decorators:
  • @Slot(GestureButton)

handleNumPad(self, numButton)

source code 

Handler for number pad button pressed.

Parameters:
  • numButton (QPushButton) - button object

handleSpecialChars(self, specCharButton)

source code 

Handler: special character button pushed.

Parameters:
  • specCharButton (QPushButton) - button object

handleGestureButtonClick(self, buttonObj)

source code 

Handler for gesture button click.

Parameters:
  • buttonObj (GestureButton) - Button object

crossOutButton(self, buttonObj)

source code 

Show the given button crossed out. Update the currentButtonBackgrounds dict to show that this button now has a different background (not one of the trails.

Parameters:
  • buttonObj (QPushButton) - GestureButton object to cross out.

getAddWordUserInfo(self, newWord)

source code 

Prepare the Add New Word dialog, and show it:

Parameters:
  • newWord ()