[kamera commit] r61 - in trunk: . kamera

0 views
Skip to first unread message

codesite...@google.com

unread,
Nov 27, 2008, 3:01:22 AM11/27/08
to kamera-...@googlegroups.com
Author: ugur.jnmbk
Date: Thu Nov 27 00:00:17 2008
New Revision: 61

Modified:
trunk/TODO
trunk/kamera/configwindow.py
trunk/kamera/mainwindow.py

Log:
image format selection and image list fix

Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Thu Nov 27 00:00:17 2008
@@ -1,4 +1,3 @@
Settings Window
Webcam selection
Display Settings(colors)
- Image format selection

Modified: trunk/kamera/configwindow.py
==============================================================================
--- trunk/kamera/configwindow.py (original)
+++ trunk/kamera/configwindow.py Thu Nov 27 00:00:17 2008
@@ -27,16 +27,23 @@
self.loadSettings()
self.connect(self, QtCore.SIGNAL("accepted()"), self.saveSettings)

+ def show(self):
+ self.loadSettings()
+ QtGui.QDialog.show(self)
+
def loadSettings(self):

self.checkBox_video_flip_top_bottom.setChecked(self.settings.value("video/flip_top_bottom",
VIDEO_FLIP_TOP_BOTTOM).toBool())

self.checkBox_video_flip_left_right.setChecked(self.settings.value("video/flip_left_right",
VIDEO_FLIP_LEFT_RIGHT).toBool())

self.lineEdit_image_directory.setText(self.settings.value("image/directory",
IMAGE_DIRECTORY).toString())
+
self.comboBox_image_format.setCurrentIndex(self.comboBox_image_format.findText(self.settings.value("image/format",
IMAGE_FORMAT).toString()))

def saveSettings(self):
self.settings.setValue("video/flip_top_bottom",
QtCore.QVariant(self.checkBox_video_flip_top_bottom.isChecked()))
self.settings.setValue("video/flip_left_right",
QtCore.QVariant(self.checkBox_video_flip_left_right.isChecked()))
self.settings.setValue("image/directory",
QtCore.QVariant(self.lineEdit_image_directory.text()))
+ self.settings.setValue("image/format",
QtCore.QVariant(self.comboBox_image_format.currentText()))
QtCore.QDir.setCurrent(self.settings.value("image/directory",
IMAGE_DIRECTORY).toString())
+ self.parent().createImageList()

@QtCore.pyqtSignature("bool")
def on_pushButton_image_directory_clicked(self):

Modified: trunk/kamera/mainwindow.py
==============================================================================
--- trunk/kamera/mainwindow.py (original)
+++ trunk/kamera/mainwindow.py Thu Nov 27 00:00:17 2008
@@ -54,10 +54,10 @@
QtGui.QMainWindow.__init__(self)
self.setupUi(self)
self.settings = QtCore.QSettings()
+ QtCore.QDir.setCurrent(self.settings.value("image/directory",
IMAGE_DIRECTORY).toString())
self.createImageList()
self.opencvwidget = MyOpenCVWidget(self.label_webcam)
self.configWindow = ConfigWindow(self)
- QtCore.QDir.setCurrent(self.settings.value("image/directory",
IMAGE_DIRECTORY).toString())
#TODO: connect opencvwidget's error signal to a slot

def createImageList(self):

Reply all
Reply to author
Forward
0 new messages