Modified:
trunk/README
trunk/profit/lib/models/messages.py
trunk/profit/workbench/messagedisplay.py
trunk/profit/workbench/widgets/ui_messagedisplay.ui
Log:
Twiddles.
Modified: trunk/README
==============================================================================
--- trunk/README (original)
+++ trunk/README Fri Jul 25 01:12:27 2008
@@ -2,11 +2,7 @@
0. replace Signals.tickerClicked emits with more descriptive signals
-1. fix account display
-
-2. fix message display
-
-3. complete basic model class suitable for session.message
+1. fix account display plot save/restore settings
4. add viewable historical data requests and plots
Modified: trunk/profit/lib/models/messages.py
==============================================================================
--- trunk/profit/lib/models/messages.py (original)
+++ trunk/profit/lib/models/messages.py Fri Jul 25 01:12:27 2008
@@ -50,14 +50,11 @@
@param message message instance
@return None
"""
- self.messageCount += 1
count = self.messageCount
- ## this doesn't work with the filter model; causes segfaults:
- #self.beginInsertRows(QModelIndex(), count, count)
- #self.endInsertRows()
- ## temporary:
+ self.messageCount += 1
if self.sync:
- self.reset()
+ self.beginInsertRows(QModelIndex(), count, count)
+ self.endInsertRows()
def data(self, index, role):
""" Framework hook to determine data stored at index for given role.
Modified: trunk/profit/workbench/messagedisplay.py
==============================================================================
--- trunk/profit/workbench/messagedisplay.py (original)
+++ trunk/profit/workbench/messagedisplay.py Fri Jul 25 01:12:27 2008
@@ -41,9 +41,10 @@
@param parent QModelIndex instance
@return True if row should be included in view
"""
- baseAccepts = QSortFilterProxyModel.filterAcceptsRow(self,
row, parent)
+ baseClass = QSortFilterProxyModel
+ baseAccepts = baseClass.filterAcceptsRow(self, row, parent)
if self.acceptTypes is None:
- return True and baseAccepts
+ return baseAccepts
msg = self.messages[row]
return msg.typeName in self.acceptTypes and baseAccepts
@@ -107,13 +108,13 @@
settings = self.settings
settings.beginGroup(settings.keys.messages)
self.splitter.restoreState(defaults.rightMainSplitterState())
+ self.filterBar.setEnabled(False)
self.setupColors()
self.requestSession()
def on_filterEdit_editingFinished(self):
self.filterModel.setFilterWildcard(self.filterBar.filterEdit.text())
-
@pyqtSignature('int')
def on_allCheck_stateChanged(self, state):
""" Updates the filter model with all types or those checked.
@@ -228,5 +229,10 @@
messageDetail.setItem(row, 1, valueItem)
def on_syncSource_stateChanged(self, state):
- self.messagesModel.setSync(bool(state))
+ state = bool(state)
+ self.messagesModel.setSync(state)
+ if state:
+ self.filterBar.filterEdit.setText('')
+ self.on_filterEdit_editingFinished()
+ self.filterBar.setEnabled(not state)
Modified: trunk/profit/workbench/widgets/ui_messagedisplay.ui
==============================================================================
--- trunk/profit/workbench/widgets/ui_messagedisplay.ui (original)
+++ trunk/profit/workbench/widgets/ui_messagedisplay.ui Fri Jul 25
01:12:27 2008
@@ -5,7 +5,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>669</width>
+ <width>673</width>
<height>511</height>
</rect>
</property>
@@ -23,14 +23,14 @@
<enum>QTabWidget::South</enum>
</property>
<property name="currentIndex" >
- <number>1</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="propertyTab" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
- <width>321</width>
+ <width>323</width>
<height>457</height>
</rect>
</property>
@@ -45,7 +45,7 @@
<item>
<widget class="QTableWidget" name="messageDetail" >
<property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
+ <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>3</verstretch>
</sizepolicy>
@@ -81,7 +81,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>321</width>
+ <width>323</width>
<height>457</height>
</rect>
</property>
@@ -103,6 +103,16 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="syncSource" >
+ <property name="text" >
+ <string>Sync with Session</string>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>
@@ -122,16 +132,6 @@
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
<layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <widget class="QCheckBox" name="syncSource" >
- <property name="text" >
- <string>Sync</string>
- </property>
- <property name="checked" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
<item>
<widget class="FilterBar" native="1" name="filterBar" >
<property name="sizePolicy" >