GSoc/2023/StatusReports/UTKARSHKUMAR

From KDE Community Wiki

Improve Items Properties Management

Contacts

Email:-[email protected]
Contact No:- +91 6204808269

Summary

Digikam is an advanced open-source digital photo management application, compatible with Linux, Windows, and MacOS platforms, that offers a wide range of features for importing, managing, editing, and sharing photos and RAW files.s.

At present, users are facing a host of difficulties when they try to transfer properties such as color, tags, and labels to numerous pictures. This is resulting in an extremely laborious and monotonous task of copying them repeatedly. This project will introduce a more advanced and efficient approach.

Mentors : Gilles Caulier, Maik Qualmann, Thanh Trung Dinh

Blog Posts

https://utkarsh12.netlify.app/

Timeline

Week 1-2

During this week my focus on understanding the working of images tags and how they define in images i find out key words Tags are essentially labels or keywords that people attach to pictures or images to assist in categorization and organization. Working of Images Exif understanding.

None
None

My primary objective is to explore the process of managing tag lists for images in DigiKam. Specifically, I am focusing on understanding how to modify the code view to enable the selection of all tag lists for images with a single click. i checked out the codebase of digikam.

WHY IS IT IMPORTANT:-

None
None

Right now the user can check it out once taglist

  • They serve as descriptive metadata, facilitating easier searching and retrieval of specific images within a collection or database. Users can manually assign tags to images, or image recognition algorithms can automatically generate tags.
Caption text
S.no Properties
1 ListItem
2 itemtags
3 tagId
4 index
5 Tags Manager List


Users can create a taglist or a collection of tags associated with the images by assigning Multiples tages in once Time appropriate tags to pictures. This taglists helps user in selecting multiples tages in Once Time.

  • For instance, if we have a pictures Tag from a Taglist These tags can be employed to filter and add Multiples Tags in One click.
Largepx
Largepx
  • This is modification of DigiKam Taglist code.

"void TagList::saveSettings() {

   KSharedConfigPtr config = KSharedConfig::openConfig();
   KConfigGroup group      = config->group(QLatin1String("Tags Manager List"));
   QStringList itemList;
   for (ListItem* const listItem : d->tagListModel->allItems())
   {
       QList<int> ids = listItem->getTagIds();
       if (!ids.isEmpty())
       {
           itemList << QString::number(ids.first());
       }
   }
   group.writeEntry(QLatin1String("Items"), itemList);

}

void TagList::restoreSettings() {

   KSharedConfigPtr config = KSharedConfig::openConfig();
   KConfigGroup group      = config->group(QLatin1String("Tags Manager List"));
   QStringList itemList    = group.readEntry(QLatin1String("Items"), QStringList());
   /**
    * If config is empty add generic All Tags
    */
   d->tagListModel->addItem(QList<QVariant>() << QBrush(Qt::cyan, Qt::Dense2Pattern));
   if (itemList.isEmpty())
   {
       return;
   }
   for (const QString& item : itemList)
   {
       QList<QVariant> itemData;
       itemData << QBrush(Qt::cyan, Qt::Dense2Pattern);
       TAlbum* const talbum = AlbumManager::instance()->findTAlbum(item.toInt());
       if (talbum)
       {
           itemData << talbum->id();
       }
       ListItem* const listItem = d->tagListModel->addItem(itemData);
       // Use this map to find all List Items that contain a specific tag, usually to remove deleted tags
       for (int tagId : listItem->getTagIds())
       {
           d->tagMap[tagId].append(listItem);
       }
   }
   /**
    * "All Tags" item should be selected
    */
   QModelIndex rootIndex = d->tagList->model()->index(0, 0);
   d->tagList->setCurrentIndex(rootIndex);

}

void TagList::slotAddPressed() {

   QModelIndexList selected = d->treeView->selectionModel()->selectedIndexes();
   if (selected.isEmpty())
   {
       return;
   }
   QList<QVariant> itemData;
   itemData << QBrush(Qt::cyan, Qt::Dense2Pattern);
   for (const QModelIndex& index : selected)
   {
       TAlbum* const album = static_cast<TAlbum*>(d->treeView->albumForIndex(index));
       itemData << album->id();
   }
   ListItem* const listItem = d->tagListModel->addItem(itemData);
   /**
    * Use this map to find all List Items that contain a specific tag, usually to remove deleted tags
    * 
    */
   for (int tagId : listItem->getTagIds())
   {
       d->tagMap[tagId].append(listItem);
   }

}

void TagList::slotSelectionChanged() {

   QModelIndexList indexList = d->tagList->mySelectedIndexes();
   QSet<int> mySet;
   for (const QModelIndex& index : indexList)
   {
       ListItem* const item = static_cast<ListItem*>(index.internalPointer());
       if (item->getTagIds().isEmpty())
       {
           mySet.clear();
           break;
       }
       for (int tagId : item->getTagIds())
       {
           mySet.insert(tagId);
       }
   }
   TagsManagerFilterModel* const filterModel = d->treeView->getFilterModel();
   QList<int> lstFromSet(mySet.begin(), mySet.end());
   filterModel->setQuickListTags(lstFromSet);

}

void TagList::slotTagDeleted(Album* album) {

   TAlbum* const talbum = dynamic_cast<TAlbum*>(album);
   if (!talbum)
   {
       return;
   }
   int delId = talbum->id();
   QList<ListItem*> items = d->tagMap[delId];
   for (ListItem* const item : items)
   {
       item->removeTagId(delId);
       if (item->getTagIds().isEmpty())
       {
           d->tagListModel->deleteItem(item);
           d->tagMap[delId].removeOne(item);
           d->treeView->getFilterModel()->setQuickListTags(QList<int>());
       }
   }

}

void TagList::slotDeleteSelected() {

   QModelIndexList sel = d->tagList->selectionModel()->selectedIndexes();
   if (sel.isEmpty())
   {
       return;
   }
   for (const QModelIndex& index : sel)
   {
       ListItem* const item = static_cast<ListItem*>(index.internalPointer());
       d->tagListModel->deleteItem(item);
   }
   d->tagList->selectionModel()->select(d->tagList->model()->index(0, 0),
                                        QItemSelectionModel::SelectCurrent);

}

void TagList::enableAddButton(bool value) {

   d->addButton->setEnabled(value);

}

}"

The practice of tagging pictures or creating taglists is commonly Found Diffuculty All in Once a time.

In Digikam, a powerful open-source photo management software, the tag list feature empowers us to categorize and organize our photos using tags or keywords. By assigning tags to our images, we gain the ability to effortlessly search and filter them based on specific criteria. It's important to understand how to effectively utilize multiple tags in Digikam for efficient photo management. Here's how can optimize the use of multiple tag lists in Digikam:

1. Creating Tag Lists: Start by creating different tag lists tailored to our organizational needs. For example, we can have tag lists for subjects like family, friends, or nature, as well as for locations such as vacations or cities, and even events like birthdays or weddings. To create a new tag list, simply go to the "Tags" panel in Digikam, select "Create New Tag List," provide a name, and add tags to the list.

2. Assigning Tags: When working with an image in Digikam, assign relevant tags to it. we have the flexibility to choose tags from any existing tag list or create new ones as needed. we can add tagslist by right-clicking on the image and selecting "Tags,".This action opens the tagging dialog, allowing we to select tags from different tag lists.

3. Browsing and Filtering: Once we have assigned tags to our photos, we can easily browse and filter them based on specific criteria. Within Digikam's main window, navigate to the "Tags" panel and expand the desired tag list. we will find all the tags listed within that particular list. By simply clicking on a specific tag, Digikam displays all the images associated with it. we can also perform advanced searches using multiple tags from different tag lists to narrow down our search results.

Largepx
Largepx

4. Tagging Hierarchy: Digikam offers the flexibility to create hierarchical tag structures, enhancing our organizational capabilities. For instance, we can establish a "Vacations" tag and create sub-tags for different travel destinations underneath it. To create a tag hierarchy, right-click on a tag, choose "Create New Tag" or "Create New Sub-Tag," and then arrange the tags within the tag list using the drag-and-drop functionality.

5. Batch Tagging: To streamline the tagging process for a large number of photos that share similar tags, Digikam provides a batch tagging feature. Simply select multiple images, right-click, choose "Tags," and assign the desired tags from any tag list. This feature saves time and ensures consistent tagging across multiple photos.

Remember, using descriptive and relevant tags is key to making our photo collection easily searchable and well-organized. By leveraging the power of multiple tag lists in Digikam, we can efficiently manage and retrieve our images based on various criteria, creating a personalized and customized photo management experience.

Week 3-4

During the course of this week, my primary objective is to incorporate the functionality of copying and pasting tags within the context of the Digikam application software. In order to achieve this, I have been working within the Digikam context helper menu, ensuring the availability of all the necessary data. The focal point of my efforts lies in the modification of this particular section by introducing a copy feature, which will enable users to duplicate and subsequently paste metadata tags according to their respective labels.

The fundamental purpose behind this endeavor is to furnish Digikam users with a copy-and-paste option, thereby affording them the capability to effortlessly replicate metadata tags. A significant portion of the work pertaining to this objective has already been completed, and my subsequent aim is to seamlessly continue this endeavor, thereby further enhancing its implementation. In order to achieve optimal results, I seek the guidance of experienced mentors who can provide valuable insights on how to improve and refine this feature.

As per the prescribed instructions, I intend to incorporate a copy menu and a paste menu, specifically designed to handle the duplication and subsequent transfer of metadata. Additionally, I have dedicated considerable time in the past two weeks to familiarize myself with the fundamental aspects of Digikam, enabling me to leverage its properties effectively. I am particularly interested in exploring possibilities for enhancing its functionality by incorporating new menu options.

Caption text
S.no Properties
1 Tags
2 Rating
3 Color label
4 Pick label
5 Comments
6 GPS information
Largepx
Largepx

To facilitate the realization of this goal, I have submitted a merge request to initiate the implementation process. It is my firm belief that this comprehensive approach will enable the seamless integration of the desired features, with a specific focus on metadata information related to various elements, such as tags, ratings, color labels, pick labels, titles, comments, and GPS information. Consequently, the selected metadata will be successfully copied from the source ItemInfo and propagated to all designated target ItemInfo entities.

IMPLEMENT DETAILS

In the app section, it is imperative to integrate a ContextMenuHelper file section, which assumes the role of a centralized repository for housing all the properties pertaining to the app. These properties encompass a wide range of actions, including the addition of tags and the provision of comprehensive details regarding the tags. The primary objective of this section is to achieve the following:

1. Introduce a copy functionality that empowers users to replicate both the name and corresponding value of a tag, subsequently allowing them to paste the copied tag. It is important to note that this particular capability should be applicable to all file sections that are associated with the given tag.

2. Effectuate the implementation of addActionNewTag file section, a function that follows a predefined pathway, outlining the essential steps required to accomplish the desired functionality. Instead of simply adding a new tag the path same use for the paste, this particular functionality is primarily focused on offering users the option to paste the previously copied tag. By copying the pertinent data and generating a paste option, the system stands poised for execution through the employment of a boolean function.

3. Augment the contextmenuhelper_tag by incorporating all the essential functions that are directly associated with tags. This enhancement necessitates the modification of existing functions to include the copy and paste options, thus empowering users with comprehensive control over the management and manipulation of tags within the app section.

  • Now i am doing work on the future like colorlabel,rating,Picklabel and GPS Location
Largepx
Largepx

Write Now focusing on colorlabel

In the ColorLabelWidget section of the file, the specific objective is to incorporate a copy action for the color labels and subsequently include them in the tag's copy information. Moreover, these copied color labels should also be made available as options for pasting.

The primary focus of all the associated functions is to modify and copy the information present in the label section within the metadata label section. This can be achieved by implementing the copy function within the ContextMenuHelper. The responsibility of this function is to copy the relevant information, and subsequently, provide an option for pasting the copied data. And next procedure pick label after that rating

Week 5-6

During the course of this week, significant progress has been made in completing the copy section pertaining to the labels section. The systematic approach I have undertaken involves a series of steps. Primarily, within the metadata section, one encounters multiple files, such as colorlabel, picklabel, and rating, all of which necessitate seamless integration with the Digikam application manager, the platform housing the image album.

The crucial role of both the context menu helper and import context menu becomes evident in this context. Specifically, leveraging the capabilities of the context menu helper, I have incorporated an additional option, which essentially enables the copying of the label section within the void label function. Subsequently, the metadata associated with picklabel, colorlabel, and rating is meticulously extracted, drawing upon the functionalities offered by the context menu. The extracted information is then duly stored for subsequent actions.

Largepx
Largepx
Largepx
Largepx

The ensuing step entails the creation of the copy section, which is subsequently incorporated into the broader action. All the aforementioned components are integrated to ensure a smooth workflow when the labels are ultimately copied, resulting in an efficient and streamlined process.

In the latest development, I have successfully implemented the icon view for the paste menu in the color label section. Specifically, within the icon view, I have incorporated the paste option, enabling users to directly paste data points and establish connections between the copy and paste functionalities. This enhancement has been integrated into the ImportContextMenu_Tag section, where the necessary connections have been provided.

To elaborate further, I have reached a pivotal stage where I modified the code to include the copy functionality for pick labels, color labels, and ratings. Subsequently, I added the option to paste metadata, particularly focusing on the color label aspect.

In the ItemPreviewView section, I introduced an option that facilitates the connection between the data points of the copy section. Through this connection, the Copy section is supported by the Context Menu Helper, adhering to the predefined workflow. It ensures the smooth flow of data and supports efficient connection management.

Furthermore, I made appropriate modifications to both the ImportContextMenu and ImportContextMenuHelper, ensuring the proper implementation and functionality of the copy section. This entails considering the implementation details and ensuring its seamless integration into the overall system. Also assigned the tag name and value

Largepx
Largepx

Mid Term Evalution

TASK COMPLETED

1 Rating copy paste

2 ColorLabel copy paste

3 PickLabel copy paste

4 GPS Location

5 Tag Value

6 Tag Name


TASK IN PROGRESS

1 Combing them all in single MetadataColection copy and Paste option

2 Comments

3 Title

As per the prescribed instructions, I intend to incorporate a copy menu and a paste menu, specifically designed to handle the duplication and subsequent transfer of metadata. Additionally, I have dedicated considerable time in the past weeks to familiarize myself with the fundamental aspects of Digikam, enabling me to leverage its properties effectively. I am particularly interested in exploring possibilities for enhancing its functionality by incorporating new menu options.

In the app section, it is imperative to integrate a ContextMenuHelper file section, which assumes the role of a centralized repository for housing all the properties pertaining to the app. These properties encompass a wide range of actions, including the addition of tags and the provision of comprehensive details regarding the tags. The primary objective of this section is to achieve the following:

1. Introduce a copy functionality that empowers users to replicate both the name and corresponding value of a tag, subsequently allowing them to paste the copied tag. It is important to note that this particular capability should be applicable to all file sections that are associated with the given tag.

2. Effectuate the implementation of addActionNewTag file section, a function that follows a predefined pathway, outlining the essential steps required to accomplish the desired functionality. Instead of simply adding a new tag the path same use for the paste, this particular functionality is primarily focused on offering users the option to paste the previously copied tag. By copying the pertinent data and generating a paste option, the system stands poised for execution through the employment of a boolean function.

3. Augment the contextmenuhelper_tag by incorporating all the essential functions that are directly associated with tags. This enhancement necessitates the modification of existing functions to include the copy and paste options, thus empowering users with comprehensive control over the management and manipulation of tags within the app section.


Largepx
Largepx

Exploring the Connecting Connection

In the pursuit of understanding the intricate interlinking of image metadata across disparate sections, as well as devising effective strategies for incorporating such data information within various sections, it becomes imperative to meticulously examine the pivotal junctures where data connections can be established. Once these critical points have been identified, the subsequent course of action involves initiating the implementation process, wherein careful consideration is given to determining the optimal approach for effecting desired modifications. In this endeavor, the invaluable guidance and mentorship provided by mentors serve as a catalyst, enabling the successful integration of link connections and facilitating the overall progress of the implementation efforts.

Adding copy Paste action

During the course of Past weeks, significant progress has been made in completing the copy section pertaining to the labels section. The systematic approach I have undertaken involves a series of steps. Primarily, within the metadata section, one encounters multiple files, such as colorlabel, picklabel, and rating, all of which necessitate seamless integration with the Digikam application manager, the platform housing the image album.

The crucial role of both the context menu helper and import context menu becomes evident in this context. Specifically, leveraging the capabilities of the context menu helper, I have incorporated an additional option, which essentially enables the copying of the label section within the void label function. Subsequently, the metadata associated with picklabel, colorlabel, and rating is meticulously extracted, drawing upon the functionalities offered by the context menu. The extracted information is then duly stored for subsequent actions.

Caption text
S.no Properties
1 Tags
2 Rating
3 Color label
4 Pick label
5 Comments
6 GPS information
Largepx
Largepx

In the latest development, I have successfully implemented the icon view for the paste menu in the color label section. Specifically, within the icon view, I have incorporated the paste option, enabling users to directly paste data points and establish connections between the copy and paste functionalities. This enhancement has been integrated into the ImportContextMenu_Tag section, where the necessary connections have been provided.

Furthermore, I made appropriate modifications to both the ImportContextMenu and ImportContextMenuHelper, ensuring the proper implementation and functionality of the copy section. This entails considering the implementation details and ensuring its seamless integration into the overall system. Also assigned the tag name and value.

GPS Location

In the GPS location section, the longitude, latitude, and altitude data are provided as essential metadata. To enhance functionality, I am incorporating an option to store this metadata using a vector. Subsequently, this section will be copied and integrated into the save changes section, allowing the application of these metadata adjustments to the subsequent selected items. In the core section, I have implemented the necessary code to facilitate the storage and application of these changes.

Largepx
Largepx

In this GPS Location section, most of the work is done only work is left to make a change in item info for the next selected item info. Write Now implemented the code for it in My MR.

Week 7-8

Week 9-10

Week 11-12