mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Adjusted the qt codebase to the recent GetDisplayInfo refactoring.
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40127
This commit is contained in:
parent
a197403a44
commit
ae6f5d27d8
@ -16,7 +16,6 @@ class DetailsModel(QAbstractTableModel):
|
|||||||
def __init__(self, app):
|
def __init__(self, app):
|
||||||
QAbstractTableModel.__init__(self)
|
QAbstractTableModel.__init__(self)
|
||||||
self._app = app
|
self._app = app
|
||||||
self._data = app.data
|
|
||||||
self._dupe_data = None
|
self._dupe_data = None
|
||||||
self._ref_data = None
|
self._ref_data = None
|
||||||
self.connect(app, SIGNAL('duplicateSelected()'), self.duplicateSelected)
|
self.connect(app, SIGNAL('duplicateSelected()'), self.duplicateSelected)
|
||||||
@ -32,7 +31,7 @@ class DetailsModel(QAbstractTableModel):
|
|||||||
column = index.column()
|
column = index.column()
|
||||||
row = index.row()
|
row = index.row()
|
||||||
if column == 0:
|
if column == 0:
|
||||||
return QVariant(self._data.COLUMNS[row]['display'])
|
return QVariant(self._app.data.COLUMNS[row]['display'])
|
||||||
elif column == 1 and self._dupe_data:
|
elif column == 1 and self._dupe_data:
|
||||||
return QVariant(self._dupe_data[row])
|
return QVariant(self._dupe_data[row])
|
||||||
elif column == 2 and self._ref_data:
|
elif column == 2 and self._ref_data:
|
||||||
@ -45,7 +44,7 @@ class DetailsModel(QAbstractTableModel):
|
|||||||
return QVariant()
|
return QVariant()
|
||||||
|
|
||||||
def rowCount(self, parent):
|
def rowCount(self, parent):
|
||||||
return len(self._data.COLUMNS)
|
return len(self._app.data.COLUMNS)
|
||||||
|
|
||||||
#--- Events
|
#--- Events
|
||||||
def duplicateSelected(self):
|
def duplicateSelected(self):
|
||||||
@ -56,8 +55,8 @@ class DetailsModel(QAbstractTableModel):
|
|||||||
else:
|
else:
|
||||||
group = self._app.results.get_group_of_duplicate(dupe)
|
group = self._app.results.get_group_of_duplicate(dupe)
|
||||||
ref = group.ref if group.ref is not dupe else None
|
ref = group.ref if group.ref is not dupe else None
|
||||||
self._dupe_data = self._data.GetDisplayInfo(dupe, group)
|
self._dupe_data = self._app._get_display_info(dupe, group)
|
||||||
self._ref_data = self._data.GetDisplayInfo(ref, group)
|
self._ref_data = self._app._get_display_info(ref, group)
|
||||||
self.reset()
|
self.reset()
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,13 +35,13 @@ class ResultNode(TreeNode):
|
|||||||
@property
|
@property
|
||||||
def normalData(self):
|
def normalData(self):
|
||||||
if self._normalData is None:
|
if self._normalData is None:
|
||||||
self._normalData = self.model._data.GetDisplayInfo(self.dupe, self.group, delta=False)
|
self._normalData = self.model._app._get_display_info(self.dupe, self.group, delta=False)
|
||||||
return self._normalData
|
return self._normalData
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def deltaData(self):
|
def deltaData(self):
|
||||||
if self._deltaData is None:
|
if self._deltaData is None:
|
||||||
self._deltaData = self.model._data.GetDisplayInfo(self.dupe, self.group, delta=True)
|
self._deltaData = self.model._app._get_display_info(self.dupe, self.group, delta=True)
|
||||||
return self._deltaData
|
return self._deltaData
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user