https://bugs.kde.org/show_bug.cgi?id=404749
caulier.gil...@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caulier.gil...@gmail.com Component|Albums-MainView |Albums-Sort --- Comment #1 from caulier.gil...@gmail.com --- I Murray, Thank for your proposal to help us in digiKam project. Don't be afraid. even if digiKam is stamped as KDE familly application, we drop 85 % of KDE dependencies with new 6.0.0. The goal is to create a pure Qt application in the future, with KDE support as optional. Marble application do it very well. So a Qt skill is simply enough here. 1/ First, you need to checkout digiKam code. We work currently to "dplugins" branch from git repository, not master. https://cgit.kde.org/digikam.git/log/?h=development/dplugins 2/ Configure, resolve dependencies, and compile digiKam. Look this documentation for details : https://www.digikam.org/api/index.html#externaldeps 3/ When application is compiled and installed, you are ready to play with code. The feature that you request in this file is to implement a sort of item by Color Labels or Pick Labels. The sort by Rating is already implemented. The list of options are hosted to MainView/View/Sort Items/... menu entry. All these menu options are implemented here : https://cgit.kde.org/digikam.git/tree/core/app/main/digikamapp_setup.cpp?h=development/dplugins#n523 4/ To route these actions, all are managed by a QSignalMapper which finally call this slot : https://cgit.kde.org/digikam.git/tree/core/app/views/stack/itemiconview.cpp?h=development/dplugins#n1999 The sort roles is passed by the QSignalMapper map, and it will setup the iconview kind of sort. The ApplicationSettings call is to remmember the kind of sort between sessions. This line is the core call to setup the model depending of sort : d->iconView->imageFilterModel()->setSortRole((ItemSortSettings::SortRole) sortRole); After to setup the model, a signal is emitted to update the icon view contents. It pass through ApplicationSettings. 5/ Icon view instance is a complex set of derived classes. The high level is this one : https://cgit.kde.org/digikam.git/tree/core/app/items/views/digikamitemview.cpp?h=development/dplugins#n79 derived from : https://cgit.kde.org/digikam.git/tree/core/app/items/views/itemcategorizedview.cpp?h=development/dplugins#n112 derived from : https://cgit.kde.org/digikam.git/tree/core/libs/widgets/itemview/itemviewcategorized.cpp?h=development/dplugins#n116 derived from : https://cgit.kde.org/digikam.git/tree/core/libs/widgets/itemview/dcategorizedview.cpp?h=development/dplugins#n53 >From this level of classes, this important stuff is the image filter model to setup with role. This one is returned from https://cgit.kde.org/digikam.git/tree/core/app/items/views/itemcategorizedview.cpp?h=development/dplugins#n210 And ItemFilterModel is defined in database models collection and method to set sort rule is implemented here : https://cgit.kde.org/digikam.git/tree/core/libs/database/models/itemfiltermodel.cpp?h=development/dplugins#n812 ...which set the role in sort settings class : https://cgit.kde.org/digikam.git/tree/core/libs/database/models/itemsortsettings.cpp?h=development/dplugins#n88 6/ the sort mechanism is of course depend of database contents and the models classes must be patched to drive new king of sort. If you look into the model settings class There are 2 classes : https://cgit.kde.org/digikam.git/tree/core/libs/database/models/itemfiltersettings.cpp?h=development/dplugins#n376 ... Which is used to filter icon-view item with the right sidebar tab named "Filters". This one already support Pick and Color labels. https://cgit.kde.org/digikam.git/tree/core/libs/database/models/itemsortsettings.cpp?h=development/dplugins#n255 ... used to sort items by criteria from View menu. Pick and color labels rules are not implemented here. VoilĂ for a first start... Gilles Caulier -- You are receiving this mail because: You are watching all bug changes.