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:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user