By logical column, do you mean the order in which the columns are declared in itemviews
?
columns = [
(N_('Title'), 'title'),
(N_('Artwork.'), 'artcount'),#amd
(N_('Matched'), 'matchedtracks'),#amd
(N_('Unmatch'), 'unmatchedtracks'),#amd
(N_('Tracks'), 'albumtracks'),#amd
(N_('Status'), 'status'), # amd
(N_('Completed'), '~completed'),#amd
(N_('Unsaved'), 'unsavedtracks'),#amd
(N_('Length'), '~length'),
(N_('Artist'), 'artist'),
(N_('Cat No.'), 'catalognumber'),#amd
(N_('Media'), 'media'),#amd
(N_('Size'), '~filesize'),#amd
(N_('Album Artist'), 'albumartist'),
(N_('Composer'), 'composer'),
(N_('Album'), 'album'),
(N_('Disc Subtitle'), 'discsubtitle'),
(N_('Track No.'), 'tracknumber'),
(N_('Disc No.'), 'discnumber'),
(N_('Barcode'), 'barcode'),
(N_('Genre'), 'genre'),
(N_('Bitrate'), '~bitrate'),#amd
(N_('Ext.'), '~extension'),#amd
(N_('Format'), '~format'),#amd
(N_('Path'), '~dirname'),#amd
(N_('File'), '~filename'),#amd
]
Iām still working out how the column setup really works. Originally when they were added here they were going to show up on both sides by design. I discussed making a separate list so that some of them would not be visible on the Left. Short of dragging the position over to the far right making that column width as small as it can be.
When the configurable columns methodology was implemented that made having two lists a moot point. So I reverted all my changes back to having the single list.
So, to have a column be present at all- itās defined in itemviews
. Then it will display the variable 'album'
, '~length'
, thatās been assigned to the column (N_('Album')
in itās raw form.
Since things like artwork quantity, unsaved/changed tracks, etc. are derived from within, are dynamic, and that data is specifically shaped/formatted for display, that is done in the code segment for the level of detail that is being made visible. If at the track level, an elif column
in track
, otherwise elif column
in album
or cluster
.
elif column == '~length':
length = self.metadata.length
if length:
return format_time(length)
else:
return ''
In the Column Length, the value we want is ~length
. Weāll call that length
and it comes from self.metadata.length
. Thereās a value there, then format it format_time(length)
otherwise give me nothing ''
.
But if we wanted to see ~length
as it is stored natively the whole elif column ==
wouldnāt be necessary.
I need to look at QTreeWidget
and see what/how parameters are passed to it and what they do and some of this should be a clearer.
Thanks for putting up with me and my seemingly boneheaded approach to figuring all this outā¦
text = 'hello world'
return text
Just doesnāt do it for me as a starting point.