File indexing completed on 2024-04-28 04:20:50
0001 // SPDX-FileCopyrightText: 2009 Jesper K. Pedersen <blackie@kde.org> 0002 // 0003 // SPDX-License-Identifier: LicenseRef-KDE-Accepted-GPL 0004 0005 // krazy:skip 0006 /** 0007 \namespace AnnotationDialog 0008 \brief The dialog used for tagging images 0009 0010 <h2>The Annotation %Dialog</h2> 0011 0012 The word annotation and tagging is used for the same thing in KPhotoAlbum. 0013 0014 The dialog itself is implemented in the class \ref Dialog. The 0015 responsibility for the Dialog class is among other things: 0016 \li Setting up the GUI for the annotation dialog. 0017 \li Handling the windows that can be moved around, torn off, hidden etc. 0018 \li Loading/saving the state of the windows 0019 \li Being able to undo changes 0020 0021 Please notice the dialog is used both for tagging and for searching. 0022 0023 <h2>Category Tagging</h2> 0024 The category tagging is visually the line edit with a listbox under. It 0025 is handled with the classes \ref ListSelect (which is a widget with both 0026 the line edit and the listbox) and \ref CompletableLineEdit (which is the 0027 class for the line edit) 0028 0029 0030 The content of the list boxes are shown and hidden in two different 0031 ways: 0032 \li When typing text in the line edit (managed by \ref ListViewTextMatchHider) 0033 \li When asking to see only item checked (managed by \ref ListViewCheckedHider) 0034 0035 Both of the above classes are subclass of \ref ListViewItemHider. 0036 0037 Each category has an action set up for toggling the visibility of non-checked 0038 items, but that should of course be the same for all 0039 categories. To control this a singleton exists namely \ref ShowSelectionOnlyManager. 0040 0041 <h2>Other Component of the dialog</h2> 0042 The image preview is an instance of the class \ref ImagePreview, and the date 0043 editor is an instance of the class \ref DateEdit. The later is copied 0044 from KDE and (IIRC) adapted to handle KPhotoAlbum's fuzzy dates (this 0045 image is from 2000). Actually I think this is handled differently in 0046 KPhotoAlbum now, so that copy could likely go away. 0047 0048 <h2>Shortcuts</h2> 0049 KDE will by default setup shortcuts for application, but they are not 0050 that useful for this particular dialog, as we want the \ref ListSelect's 0051 to have the first pick on identifiers. We therefore have the class \ref 0052 ShortCutManager, which takes care of this. 0053 0054 **/ 0055 // vi:expandtab:tabstop=4 shiftwidth=4: