1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

[#115 state:fixed] Re-factored the data columns (and delta columns) and made the Dimensions column a delta one.

This commit is contained in:
Virgil Dupras
2011-01-29 11:07:33 +01:00
parent c885cb35d8
commit da41d07dae
19 changed files with 85 additions and 95 deletions

View File

@@ -41,7 +41,6 @@ JOBID2TITLE = {
class DupeGuru(DupeGuruBase, QObject):
LOGO_NAME = '<replace this>'
NAME = '<replace this>'
DELTA_COLUMNS = frozenset()
def __init__(self, data_module):
appdata = str(QDesktopServices.storageLocation(QDesktopServices.DataLocation))

View File

@@ -137,7 +137,7 @@ class ResultWindow(QMainWindow):
menu = self.menuColumns
self._column_actions = []
for index, column in enumerate(self.app.data.COLUMNS):
action = menu.addAction(column['display'])
action = menu.addAction(column.display)
action.setCheckable(True)
action.column_index = index
self._column_actions.append(action)

View File

@@ -18,7 +18,7 @@ class ResultsModel(Table):
model = ResultTableModel(self, app)
self._app = app
self._data = app.data
self._delta_columns = app.DELTA_COLUMNS
self._delta_columns = app.data.DELTA_COLUMNS
Table.__init__(self, model, view)
self.model.connect()
@@ -63,7 +63,7 @@ class ResultsModel(Table):
def headerData(self, section, orientation, role):
if orientation == Qt.Horizontal and role == Qt.DisplayRole and section < len(self._data.COLUMNS):
return self._data.COLUMNS[section]['display']
return self._data.COLUMNS[section].display
return None
def setData(self, index, value, role):

View File

@@ -17,7 +17,6 @@ class DupeGuru(DupeGuruBase):
EDITION = 'me'
LOGO_NAME = 'logo_me'
NAME = __appname__
DELTA_COLUMNS = frozenset([2, 3, 4, 5, 7])
def __init__(self):
DupeGuruBase.__init__(self, data)

View File

@@ -59,7 +59,6 @@ class DupeGuru(DupeGuruBase):
EDITION = 'pe'
LOGO_NAME = 'logo_pe'
NAME = __appname__
DELTA_COLUMNS = frozenset([2, 5])
def __init__(self):
DupeGuruBase.__init__(self, data_pe)

View File

@@ -27,7 +27,6 @@ class DupeGuru(DupeGuruBase):
EDITION = 'se'
LOGO_NAME = 'logo_se'
NAME = __appname__
DELTA_COLUMNS = frozenset([2, 4])
def __init__(self):
DupeGuruBase.__init__(self, data)