Wednesday, February 19, 2014

Week7 Blog3

Progress I made
  • Fixed last week's blog problem #1, where the auto-record button appeared in the "Record" interface when not necessary
  •  Added method to get talk id from database using current date, time, and room (database.py). This is used for auto-record mode.
  •  Since I have no prior knowledge of PyQt4, I researched about how to use QTime to make a countdown, how to display countdown, as well as how to display messages that change over time. At first, QLCDNumber seems like a nice fit to the countdown I'm trying to implement, since it conveniently displays LCD numbers like a digital clock. However, we also need to display text about the next talk and hint strings like "Time remaining". So in the end, I decided to use a layout instead.  See the bottom of the blog for a list of useful tutorials. 
  • Wrote the beginning of auto_record(), where if you press auto-record, it'll show fullscreen countdown until the next talk starts recording (record.py)  
  • Wrote the widget for display info about talk and time remaining (AutoRecordWidget.py)
  • Added Esc key to exit fullscreen (AutoRecordWidget.py)
Note: auto-record should record talks starting at or after the current computer time, in the room that is currently displayed in the room field of the recording UI. If there are no talks that qualify this condition, for the code right now, nothing happens.

Plans for next week
  • Auto mode display: add code for displaying time remaining info during recording (record.py)
  • Recording: add code for start recording and stop recording, while there are still talks to record and we are still in auto mode (record.py)
  • Recording UI: pressing Esc in countdown window will exit fullscreen, not stop the auto-recording. If user clicks the X, then countdown window will close, but not stop recording. At this time, everything in the main recording UI should be disabled except the auto-record button. This button should show "Stop auto-record", and if user clicks on that, then auto-record should stop (record.py)
  • Right now the countdown only shows minutes and seconds. Need to also show the hours (AutoRecordWidget.py)
Problems
None.

Tutorials

Countdown timer:
  • http://stackoverflow.com/questions/12661211/cant-seem-to-get-pyqt-countdown-timer-to-work
  • http://codeprogress.com/python/libraries/pyqt/showPyQTExample.php?index=396&key=QTimerCountdown
Useful PyQt4 code snippets, in particular Full Screen
  • http://thewikiblog.appspot.com/wiki/be-productive-with-pyqt4
Widgets and layouts
  • http://www.pythoncentral.io/pyside-pyqt-tutorial-interactive-widgets-and-layout-containers/
QSqlQuery
  • http://srinikom.github.io/pyside-docs/PySide/QtSql/QSqlQuery.html#PySide.QtSql.PySide.QtSql.QSqlQuery.value

No comments:

Post a Comment