[graphics/kphotoalbum/new-way-of-annotating] /: Moved documentation to the docbook files.

Jesper K. Pedersen null at kde.org
Sun Jul 30 16:03:50 BST 2023


Git commit a10902e50f5076842551c23a40e18f8d8925fc1a by Jesper K. Pedersen.
Committed on 30/07/2023 at 17:03.
Pushed by blackie into branch 'new-way-of-annotating'.

Moved documentation to the docbook files.

M  +0    -3    CMakeLists.txt
M  +0    -1    Viewer/AnnotationHandler.cpp
D  +0    -56   Viewer/AnnotationHelp.cpp
D  +0    -32   Viewer/AnnotationHelp.h
D  +0    -55   Viewer/AnnotationHelp.ui
M  +6    -12   Viewer/SelectCategoryAndValue.cpp
M  +8    -12   Viewer/ViewerWidget.cpp
M  +1    -1    Viewer/ViewerWidget.h
A  +-    --    doc/annotation-mode.png
A  +-    --    doc/assign-macro-add-new-value.png
A  +-    --    doc/assign-macro-overview.png
A  +-    --    doc/assign-macro-step1.png
A  +-    --    doc/assign-macro-step2.png
D  +-    --    doc/draw-on-image.png
M  +17   -4    doc/setting-properties.docbook
M  +82   -145  doc/viewer.docbook

https://invent.kde.org/graphics/kphotoalbum/-/commit/a10902e50f5076842551c23a40e18f8d8925fc1a

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e01f4e2a8..411a68726 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -261,13 +261,10 @@ set(libViewer_SRCS
     "${CMAKE_CURRENT_SOURCE_DIR}/Viewer/AnnotationHandler.h"
     "${CMAKE_CURRENT_SOURCE_DIR}/Viewer/SelectCategoryAndValue.cpp"
     "${CMAKE_CURRENT_SOURCE_DIR}/Viewer/SelectCategoryAndValue.h"
-    "${CMAKE_CURRENT_SOURCE_DIR}/Viewer/AnnotationHelp.cpp"
-    "${CMAKE_CURRENT_SOURCE_DIR}/Viewer/AnnotationHelp.h"
     )
 
 ki18n_wrap_ui(libViewer_SRCS
     "${CMAKE_CURRENT_SOURCE_DIR}/Viewer/SelectCategoryAndValue.ui"
-    "${CMAKE_CURRENT_SOURCE_DIR}/Viewer/AnnotationHelp.ui"
     )
 
 
diff --git a/Viewer/AnnotationHandler.cpp b/Viewer/AnnotationHandler.cpp
index 721d6131d..401513bfc 100644
--- a/Viewer/AnnotationHandler.cpp
+++ b/Viewer/AnnotationHandler.cpp
@@ -3,7 +3,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later
 
 #include "AnnotationHandler.h"
-#include "AnnotationHelp.h"
 #include "SelectCategoryAndValue.h"
 #include <KConfigGroup>
 #include <KLocalizedString>
diff --git a/Viewer/AnnotationHelp.cpp b/Viewer/AnnotationHelp.cpp
deleted file mode 100644
index 5db1b5087..000000000
--- a/Viewer/AnnotationHelp.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// SPDX-FileCopyrightText: 2023 Jesper K. Pedersen <jesper.pedersen at kdab.com>
-//
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#include "AnnotationHelp.h"
-#include "ui_AnnotationHelp.h"
-#include <KActionCollection>
-#include <QStandardItemModel>
-
-namespace Viewer
-{
-
-AnnotationHelp::AnnotationHelp(KActionCollection *actions, const AnnotationHandler::Assignments &assignments, QWidget *parent)
-    : QDialog(parent)
-    , ui(new Ui::AnnotationHelp)
-{
-    ui->setupUi(this);
-
-    auto model = new QStandardItemModel(this);
-    model->setHorizontalHeaderLabels(QStringList { i18n("Key"), i18n("Tag"), QString(), i18n("Key"), i18n("Tag") });
-    int row = 0;
-    int column = 0;
-    auto addAssignment = [&](const QString &key, const QString &assignment) {
-        if (column == 2)
-            ++column;
-        if (column == 5) {
-            ++row;
-            column = 0;
-        }
-        model->setItem(row, column++, new QStandardItem(key));
-        model->setItem(row, column++, new QStandardItem(assignment));
-    };
-
-    addAssignment(actions->action(QString::fromLatin1("viewer-add-tag"))->shortcut().toString(), i18n("Add Tag"));
-    addAssignment(actions->action(QString::fromLatin1("viewer-edit-description"))->shortcut().toString(), i18n("Add Description"));
-    addAssignment(actions->action(QString::fromLatin1("viewer-copy-tag-from-previous-image"))->shortcut().toString(), i18n("Copy Annotation from Previous Image"));
-    row += 2;
-    column = 0;
-
-    for (auto it = assignments.cbegin(); it != assignments.cend(); ++it) {
-        const AnnotationHandler::Assignment assignment = it.value();
-        addAssignment(it.key(), QLatin1String("%1 / %2").arg(assignment.category, assignment.value));
-    }
-
-    ui->assignments->setModel(model);
-    ui->assignments->verticalHeader()->hide();
-    ui->assignments->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
-    ui->assignments->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
-}
-
-AnnotationHelp::~AnnotationHelp()
-{
-    delete ui;
-}
-
-} // namespace Viewer
diff --git a/Viewer/AnnotationHelp.h b/Viewer/AnnotationHelp.h
deleted file mode 100644
index f1f6dadea..000000000
--- a/Viewer/AnnotationHelp.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// SPDX-FileCopyrightText: 2023 Jesper K. Pedersen <jesper.pedersen at kdab.com>
-//
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#pragma once
-
-#include "AnnotationHandler.h"
-#include <QDialog>
-
-class KActionCollection;
-
-namespace Viewer
-{
-
-namespace Ui
-{
-    class AnnotationHelp;
-}
-
-class AnnotationHelp : public QDialog
-{
-    Q_OBJECT
-
-public:
-    explicit AnnotationHelp(KActionCollection *actions, const AnnotationHandler::Assignments &assignments, QWidget *parent = nullptr);
-    ~AnnotationHelp();
-
-private:
-    Ui::AnnotationHelp *ui;
-};
-
-} // namespace Viewer
diff --git a/Viewer/AnnotationHelp.ui b/Viewer/AnnotationHelp.ui
deleted file mode 100644
index bbe80bf68..000000000
--- a/Viewer/AnnotationHelp.ui
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Viewer::AnnotationHelp</class>
- <widget class="QDialog" name="Viewer::AnnotationHelp">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>1002</width>
-    <height>765</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Annotation Keybindings</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <item>
-    <widget class="QLabel" name="label">
-     <property name="text">
-      <string><html><head/><body><p>It is possible to annotate images while viewing them, and for most annotation work, this is by far the fastest way to do so.</p><p>The idea is that you assign a single tag to a single key, say <span style=" font-weight:700;">People/Jesper</span> could be bound to <span style=" font-weight:700;">j</span>. </p><p>Now pressing <span style=" font-weight:700;">j</span> would add that tag to the current image.</p><p>The first time you press a new key, KPhotoAlbum will ask for the assignment. If you later want to reassign the key, simply press shift and the key.</p><p>Obviously this only works for the amount of keys on your keyboard, and you might even need to be very creative with<br/>your memorization of these keys in cases where multiple tags would start with the same name, e.g <span style=" font-weight:700; font-style:italic;">J</span><span style=" font-style:italic;">esper</span> and <span style=" font-weight:700; font-style:italic;">J</span><span style=" font-style:italic;">im</span> .</p><p>For those tags much more seldom used, you can add them by pressing the keybinding for add tag (see below), which allows you to add that tag, without binding it to any keys. </p></body></html></string>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <widget class="QTableView" name="assignments"/>
-   </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
-     <property name="standardButtons">
-      <set>QDialogButtonBox::Close</set>
-     </property>
-    </widget>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>Viewer::AnnotationHelp</receiver>
-   <slot>close()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>963</x>
-     <y>450</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>995</x>
-     <y>405</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/Viewer/SelectCategoryAndValue.cpp b/Viewer/SelectCategoryAndValue.cpp
index 28ac53bee..1a1b3d723 100644
--- a/Viewer/SelectCategoryAndValue.cpp
+++ b/Viewer/SelectCategoryAndValue.cpp
@@ -165,7 +165,6 @@ int SelectCategoryAndValue::exec()
 
 void SelectCategoryAndValue::addNew()
 {
-    ui->label->hide();
     ui->lineEdit->hide();
     ui->addNewTag->hide();
     ui->categoryLabel->show();
@@ -180,18 +179,12 @@ void SelectCategoryAndValue::addNew()
 void SelectCategoryAndValue::setupExistingAssignments(const Viewer::AnnotationHandler::Assignments &assignments)
 {
     auto model = new QStandardItemModel(this);
-    model->setHorizontalHeaderLabels(QStringList { i18n("Key"), i18n("Tag"), QString(), i18n("Key"), i18n("Tag") });
+    model->setHorizontalHeaderLabels(QStringList { i18n("Key"), i18n("Tag") });
     int row = 0;
-    int column = 0;
     auto addAssignment = [&](const QString &key, const QString &assignment) {
-        if (column == 2)
-            ++column;
-        if (column == 5) {
-            ++row;
-            column = 0;
-        }
-        model->setItem(row, column++, new QStandardItem(key));
-        model->setItem(row, column++, new QStandardItem(assignment));
+        model->setItem(row, 0, new QStandardItem(key));
+        model->setItem(row, 1, new QStandardItem(assignment));
+        ++row;
     };
 
     for (auto it = assignments.cbegin(); it != assignments.cend(); ++it) {
@@ -201,7 +194,8 @@ void SelectCategoryAndValue::setupExistingAssignments(const Viewer::AnnotationHa
 
     ui->knowAssignments->setModel(model);
     ui->knowAssignments->verticalHeader()->hide();
-    ui->knowAssignments->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
+    ui->knowAssignments->horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
+    ui->knowAssignments->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
     ui->knowAssignments->verticalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
 }
 
diff --git a/Viewer/ViewerWidget.cpp b/Viewer/ViewerWidget.cpp
index cd03c2872..2fd3993f9 100644
--- a/Viewer/ViewerWidget.cpp
+++ b/Viewer/ViewerWidget.cpp
@@ -39,7 +39,6 @@
 #include "QtAVDisplay.h"
 #endif
 
-#include "AnnotationHelp.h"
 #include "TaggedArea.h"
 #include "TextDisplay.h"
 #include "TransientDisplay.h"
@@ -94,6 +93,7 @@
 #include <QWheelEvent>
 #include <qglobal.h>
 
+#include <QDesktopServices>
 #include <QInputDialog>
 #include <QMetaEnum>
 #include <functional>
@@ -168,7 +168,7 @@ Viewer::ViewerWidget::ViewerWidget(UsageType type)
     connect(m_annotationHandler, &AnnotationHandler::requestToggleCategory,
             this, &Viewer::ViewerWidget::toggleTag);
     connect(m_annotationHandler, &AnnotationHandler::requestHelp,
-            this, &Viewer::ViewerWidget::showKeyBindings);
+            this, &Viewer::ViewerWidget::showAnnotationHelp);
 }
 
 void Viewer::ViewerWidget::setupContextMenu()
@@ -1141,13 +1141,9 @@ void Viewer::ViewerWidget::editDescription()
     }
 }
 
-void Viewer::ViewerWidget::showKeyBindings()
+void Viewer::ViewerWidget::showAnnotationHelp()
 {
-    QMessageBox::information(this, i18n("@action::title"), txt);
-    TemporarilyDisableCursorHandling dummy(this);
-    auto help = new AnnotationHelp(m_actions, m_annotationHandler->assignments(), this);
-    help->setAttribute(Qt::WA_DeleteOnClose);
-    help->exec();
+    QDesktopServices::openUrl(QUrl(QLatin1String("help:/kphotoalbum/chp-viewer.html#annotating-from-the-viewer")));
 }
 
 void Viewer::ViewerWidget::createVideoMenu()
@@ -1399,7 +1395,7 @@ void Viewer::ViewerWidget::createAnnotationMenu()
         return action;
     };
 
-    addAction("viewer-show-keybindings", i18nc("@action:inmenu", "Show key bindings"), &ViewerWidget::showKeyBindings, Qt::CTRL + Qt::Key_Question);
+    addAction("viewer-show-keybindings", i18nc("@action:inmenu", "Help"), &ViewerWidget::showAnnotationHelp, Qt::CTRL + Qt::Key_Question);
 
     addAction("viewer-edit-image-properties", i18nc("@action:inmenu", "Annotation Dialog"), &ViewerWidget::editImage, Qt::CTRL + Qt::Key_1);
     m_addTagAction = addAction("viewer-add-tag", i18nc("@action:inmenu", "Add tag"), &ViewerWidget::addTag, i18nc("short cut for add tag", "CTRL+a"));
@@ -1413,18 +1409,18 @@ void Viewer::ViewerWidget::createAnnotationMenu()
                                        i18nc("Shortcut for add description to image", "CTRL+d"));
     m_addDescriptionAction->setEnabled(false);
 
-    menu->addSection(i18n("Tagging Mode"));
+    menu->addSection(i18n("Annotation Mode"));
     auto action = addTagAction(
         "viewer-tagmode-locked", i18nc("@action:inmenu", "Locked"), TagMode::Locked,
         i18nc("Shortcut for turning of annotations in the viewer", "CTRL+l"));
     action->setChecked(true);
 
     addTagAction(
-        "viewer-tagmode-annotating", i18nc("@action:inmenu", "Annotating"), TagMode::Annotating,
+        "viewer-tagmode-annotating", i18nc("@action:inmenu", "Assign Tags"), TagMode::Annotating,
         i18nc("Shortcut for turning annotations mode to annotating", "F2"));
 
     addTagAction(
-        "viewer-tagmode-tokenizing", i18nc("@action:inmenu", "Tokenizing"), TagMode::Tokenizing,
+        "viewer-tagmode-tokenizing", i18nc("@action:inmenu", "Assign Tokens"), TagMode::Tokenizing,
         i18nc("Shortcut for turning annotations mode to tokenizing", "CTRL+t"));
 
     m_popup->addMenu(menu);
diff --git a/Viewer/ViewerWidget.h b/Viewer/ViewerWidget.h
index 8b1c4a2e8..886514cfc 100644
--- a/Viewer/ViewerWidget.h
+++ b/Viewer/ViewerWidget.h
@@ -184,7 +184,7 @@ protected Q_SLOTS:
     void makeThumbnailImage();
     void addTag();
     void editDescription();
-    void showKeyBindings();
+    void showAnnotationHelp();
 
     /** Set the current window title (filename) and add the given detail */
     void setCaptionWithDetail(const QString &detail);
diff --git a/doc/annotation-mode.png b/doc/annotation-mode.png
new file mode 100644
index 000000000..8e1a64741
Binary files /dev/null and b/doc/annotation-mode.png differ
diff --git a/doc/assign-macro-add-new-value.png b/doc/assign-macro-add-new-value.png
new file mode 100644
index 000000000..5aaf9219f
Binary files /dev/null and b/doc/assign-macro-add-new-value.png differ
diff --git a/doc/assign-macro-overview.png b/doc/assign-macro-overview.png
new file mode 100644
index 000000000..0b0d26c15
Binary files /dev/null and b/doc/assign-macro-overview.png differ
diff --git a/doc/assign-macro-step1.png b/doc/assign-macro-step1.png
new file mode 100644
index 000000000..1c5af1010
Binary files /dev/null and b/doc/assign-macro-step1.png differ
diff --git a/doc/assign-macro-step2.png b/doc/assign-macro-step2.png
new file mode 100644
index 000000000..8b6edb714
Binary files /dev/null and b/doc/assign-macro-step2.png differ
diff --git a/doc/draw-on-image.png b/doc/draw-on-image.png
deleted file mode 100644
index 8a2d9a06e..000000000
Binary files a/doc/draw-on-image.png and /dev/null differ
diff --git a/doc/setting-properties.docbook b/doc/setting-properties.docbook
index 168779a0f..ebe9c8483 100644
--- a/doc/setting-properties.docbook
+++ b/doc/setting-properties.docbook
@@ -104,9 +104,7 @@ it out. Thus typing <literal>Do</literal> might be enough to find
 <literal>Donna</literal>. Once you have found the item you search for,
 simply press enter to select this item in the listbox. The item will now be
 moved to the top of the view, so next time you need the given item it is
-even easier to find. There is also a "seamless" way of annotating from Image
-Viewer that is described later on in <xref
-linkend="category-selectors-in-viewer" />.</para>
+even easier to find.</para>
 
       <para>The idea behind moving items to the top when they have been
 selected is, that when going to, say a family party, you will get perhaps
@@ -222,7 +220,22 @@ window layout.</para>
 
   </sect1>
 
-  </chapter>
+<sect1>
+    <title>Annotating while viewing images</title>
+    <para>For a few decades we tagged our images as described above, but in the summer of 2023, it started being possible to tag images while viewing them.
+    This facility doesn't support all the features described above, but it offers a much faster workflow to tagging images.</para>
+    <para>Missing features when annotating images from the viewer, which you need to come to this dialog for are:
+    <itemizedlist>
+    <listitem><para>Annotating multiple images at a time</para></listitem>
+    <listitem><para>Tagging individual parts of an image (this face is ...)</para></listitem>
+    <listitem><para>Setting up tag groups (ie. specifying that Las Vegas is in USA, so you will see images tagged Las Vegas when watching images from USA)</para></listitem>
+    <listitem><para>Setting image dates</para></listitem>
+    </itemizedlist>
+
+    <link linkend="annotating-from-the-viewer">See the seciton on annotating from the viewer</link>
+    </para>
+</sect1>
+</chapter>
 
 
 <!-- Keep this comment at the end of the file
diff --git a/doc/viewer.docbook b/doc/viewer.docbook
index f0042dc06..696cd9e16 100644
--- a/doc/viewer.docbook
+++ b/doc/viewer.docbook
@@ -126,21 +126,48 @@ image, simply by choosing <guimenuitem>Annotate</guimenuitem> in the context men
 
 
 
+<sect1 id="annotating-from-the-viewer">
+<title>Annotating images from the viewer</title>
+<para>Traditionally the main way for tagging images has been though <link linkend="chp-typingIn">the annotation dialog</link>.
+Over the years a few different attempts have been made at integrating tagging into the viewer, first attempt was by assigning tokens in the viewer, a later
+attempt was by making it possible to tag directly by typing part of a category item. In addition category items could be assigned to function keys on the keyboard.
+The code for all of this have now been modernized to make the work flow much more intuitive and discover-able.</para>
+
+<para>There are three modes to annotating images in the viewer:
+<itemizedlist>
+    <listitem><para><emphasis>Locked</emphasis> - This is the default mode when starting the viewer - in here no annotating or tokenizing will happen. This ensure you do not accidentally annotates images when viewing them.</para></listitem>
+    <listitem><para><emphasis>Assign Tokens</emphasis> - This allows you to set tokens on images, by simply pressing a key from A-Z on the keyboard.</para></listitem>
+    <listitem><para><emphasis>Assign Tags</emphasis> - This allows you to assign macros to a keyboard key. As an example, <emphasis>L</emphasis> could mean set the item <emphasis>Las Vegas</emphasis> in the <emphasis>Location</emphasis> category. In addition to that, it also allows you to set any tag on an image.</para></listitem>
+</itemizedlist>
+
+The modes are selected from the context menu as can be seen in <xref linkend="fig-ctxmenu-for-mode-selection"/>.
+
+The two modes are described in details below.
+</para>
+
+  <figure id="fig-ctxmenu-for-mode-selection">
+    <title>Selecting annotation mode from the viewer</title>
+    <mediaobject>
+      <imageobject>
+        <imagedata fileref="annotation-mode.png"
+          format="PNG"/>
+      </imageobject>
+    </mediaobject>
+  </figure>
+
+</sect1>
+
+
+
+
 <sect1 id="tokens">
 <title>Setting Tokens from the Viewer</title>
-<para>When viewing the images you may find that a given image contains a person
-whose name you forgot to set on the images. At this time you may cancel
-your viewing, and rush to the image configuration dialog to specify the
-person. However, you may prefer to just tag the image and continue on
-viewing images.</para>
-
-<para>An alternative situation is if you want to sent a number of images
+<para>Imagine you want to sent a number of images
 to a printer to get them developed on paper. To see which you want, you
-start the viewer on the images, and tag them as good or bad while by
-inspecting see each one.</para>
+start the viewer on the images, and tag them as <emphasis>good</emphasis>, <emphasis>bad</emphasis>, or <emphasis>maybe</emphasis>, while inspecting each one.</para>
 
-<para>For the above two examples the viewer offers you to set tokens on the
-images when viewing them. Tokens are named from A to Z, and you set a token
+<para>You may of course create a few new items (say <emphasis>Good</emphasis>, <emphasis>Bad</emphasis>, <emphasis>Maybe</emphasis>) for an existing category, say the category <emphasis>Album</emphasis>.
+However, given that you likely do not need these tags once you've send the images to the printer, there is an easier way, namely by simply setting tokens on the images. Tokens are named from A to Z, and you set a token
 simply by pressing its letter. In <xref linkend="fig-images-with-tokens"/>
 you may see an image where the tokens A, B and C are set.</para>
 
@@ -154,13 +181,12 @@ you may see an image where the tokens A, B and C are set.</para>
     </mediaobject>
   </figure>
 
+  <para>For this to work, you need to be in the <emphasis>Assign Tokens</emphasis> mode. See <xref linkend="fig-ctxmenu-for-mode-selection"/></para>
+
 <para>Once you've set tokens on your images, they will be available for
 regular browsing in the browser, as can be seen in <xref
 linkend="fig-tokens-in-browser"/>. So when you've marked images that
-needs to be edited, printed, or whatever, simply browse to the images, and
-annotate all images at a time (as described in <xref
-linkend="sect-specifying-properties-for-all-images-simultaneously"/>), use
-a plugin to copy the selected images to a CD, or whatever you need to do.</para>
+needs to be edited, printed, or whatever, simply browse to the images, and process the set from there, e.g. by using <emphasis>copy images to...</emphasis> from the context menu.</para>
 
   <figure id="fig-tokens-in-browser">
     <title>Tokens seen in the Browser</title>
@@ -192,143 +218,54 @@ image is selected, this can be seen in
 
 </sect1>
 
-<sect1 id="category-selectors-in-viewer">
-    <title>Setting Categories from the Viewer</title>
-    <para>Category can be selected on viewer by starting to type the category
-    name. Selection is made immediately when there is only one matching
-    category left.</para>
-
-    <para>To switch to category selection mode simply type slash (/). Possible
-    options are shown after Assigning: text in curly brackets and it is
-    immediately revised once more letters are typed. When a category is
-    selected you can keep on typing to select the item value. Following image
-    shows this in action and below it is explanation how this all works.
-    </para>
-
-
-<figure id="category-selectors">
-<title>Selecting Categories in Viewer</title>
-<mediaobject>
-<imageobject>
-<imagedata fileref="category-selectors.png" format="PNG"/>
-</imageobject>
-</mediaobject>
+<sect1>
+    <title>Tagging images from the viewer</title>
+<para>Tagging images can be tiresome, even in &kphotoalbum;, at least when you've fallen behind and have thousands or tens of thousands of images in need of proper tagging.
+    Fortunately, it is now possible to add tags with the press of a single key when viewing the images. The realization behind this way of working with images is that most images are with the same few people in the same few places, plus a few "guest" appearances from time to time - say the location of your vacation, or some friends who were visiting you for a week.</para>
+
+<para>To tag your images while viewing them, you need to enter the <emphasis>Assign Tags mode</emphasis> - see <xref linkend="fig-ctxmenu-for-mode-selection"/>.
+    With this enable, simply press a letter key on your keyboard to either assign or use the assigned tag.</para>
+
+<para>In <xref linkend="fig-assign-macro-step1"/> below, I've just pressed <keycap>s</keycap> while watching images and being in the <emphasis>Assign Tags mode</emphasis>. This brought up the dialog where I can specify what tag to assign to that key.</para>
+
+<figure id="fig-assign-macro-step1">
+  <title>Step 1 - assigning a macro to the key <emphasis>s</emphasis></title>
+  <mediaobject>
+    <imageobject><imagedata fileref="assign-macro-step1.png" format="PNG"/></imageobject>
+   </mediaobject>
 </figure>
 
-<para>
-Follow the category setup below to better understand this explanation.
-Starting by typing "/k" the input selection will shift from "Tokens" to
-"Keywords" (since K is unique). After that, typing "g" will assign the "good"
-keyword immediately to the image. Typing "b" will show B{ad,oring} in the info
-box and typing "a" or "o" next will complete the match and assign the result to
-the image. Typing "/p" will work similarly and show the partial category match
-"P{eople,laces} so you can type "e" or "l" to complete "People" or "Places"
-respectively.
-<itemizedlist mark='opencircle'>
-    <listitem><para>Tokens</para>
-    <itemizedlist mark='opencircle'>
-        <listitem><para>A..Z</para></listitem>
-    </itemizedlist>
-    </listitem>
-    <listitem>
-    <para>Keywords</para>
-    <itemizedlist mark='opencircle'>
-        <listitem><para>Good</para></listitem>
-        <listitem><para>Bad</para></listitem>
-        <listitem><para>Boring</para></listitem>
-    </itemizedlist>
-    </listitem>
-    <listitem>
-    <para>People</para>
-    <itemizedlist mark='opencircle'>
-        <listitem><para>George</para></listitem>
-        <listitem><para>Fred</para></listitem>
-    </itemizedlist>
-    </listitem>
-    <listitem>
-    <para>Places</para>
-    <itemizedlist mark='opencircle'>
-        <listitem><para>Internet</para></listitem>
-    </itemizedlist>
-    </listitem>
-</itemizedlist>
-</para>
+<para>Next, in the line edit I typed <emphasis>sp</emphasis> which suggest "People / Je<emphasis>sp</emphasis>er" and "People / <emphasis>Sp</emphasis>iff".
+    Both matched the letters I typed. Pressing arrow down to select <emphasis>Spiff</emphasis> and pressing enter, will assign the letter <emphasis>s</emphasis> to adding the tag <emphasis>People / Spiff</emphasis> to the image viewed.
+    This assignment, will be saved for future sessions. To re-assign s to another tag, simply press <keycombo action="simul">&Shift;<keycap>s</keycap></keycombo>.</para>
 
-<sect2>
-    <title>Exact words</title>
-<para>
-    If you want to insert a new word or have words like boa and board you need
-    to be able to type in the exact word you want to insert or select. This can
-    be achieved by starting the word with double quote (") and ending with
-    comma (,). If we would select boa immediately when it is typed you could
-    not select board and otherwise we would be waiting for more key presses and
-    you could not select boa.
-
-<figure id="keyword-exact">
-<title>Selecting Exact Words in Viewer</title>
-<mediaobject>
-<imageobject>
-<imagedata fileref="keyword-exact.png" format="PNG"/>
-</imageobject>
-</mediaobject>
+<figure id="fig-assign-macro-step2">
+  <title>Step 2 - assigning a macro - typing <emphasis>sp</emphasis></title>
+  <mediaobject>
+    <imageobject><imagedata fileref="assign-macro-step2.png" format="PNG"/></imageobject>
+   </mediaobject>
+</figure>
+
+<para>In <xref linkend="fig-assign-macro-overview"/> below you can see existing keybindings in the right side of the dialog.</para>
+<figure id="fig-assign-macro-overview">
+  <title>Overview of assigned key bindings</title>
+  <mediaobject>
+    <imageobject><imagedata fileref="assign-macro-overview.png" format="PNG"/></imageobject>
+   </mediaobject>
 </figure>
-</para>
-</sect2>
-
-<sect2>
-    <title>Always start with category selection</title>
-<para>
-    If you type two '/'s in a row it will toggle between two different modes.
-    The default mode described above and a category selection mode. In the
-    latter mode we go straight back to category selection after a match.
-    That way you can continually select items within different categories.
-    It'll still do the fastest match possible so that typing "kbo" will still
-    match "Keywords/Boring" in the example set above.
-</para>
-</sect2>
-<sect2>
-    <title>Assigning shortcuts</title>
-<para>
-    If the current input is blank (e.g. you're not in the middle of selecting
-    anything) and you hit a function key F1 through F12 (or up to F35 if
-    your keyboard supports), it will assign the last
-    matched assignment to that key. You can apply the same assignment to
-    new images just by hitting the shortcut key. To  remove use shift
-    modifier and the shortcut (<keycombo>&Shift;<keycap>F#</keycap></keycombo>). This is useful for quickly assigning
-    frequently repeating items in your current set of images. It
-    remembers both the category and the category item. These shortcuts are
-    remembered until &kphotoalbum; is closed, there is currently no
-    support for replacing the assigned shortcut.
-    </para>
-  </sect2>
-</sect1>
 
+<para>In case the tag you want to assign doesn't already exist in your database, then simply press the <emphasis>Add New</emphasis> button to create it. This can be seen in <xref linkend="fig-assign-macro-add-new-value.png"/> below</para>
 
-<!-- Drawing on images feature has been dropped
-  <sect1 id="drawing-on-images">
-    <title>Drawing on Images</title>
-    <para>Sometimes it might not be obvious what you want to show with a
-given image, for that purpose &kphotoalbum; allows you to draw on the
-images. </para>
-
-<para>The actual drawing is not saved to the image, but rather to the
-database, that way you can undo your drawing at a later point.</para>
-
-<para>In <xref linkend="fig-draw-on-image"/> you can see an image drawn
-on. To bring &kphotoalbum; in to drawing mode, select <guimenuitem>Draw on
-Image</guimenuitem> from the context menu. To quit drawing, press the cross in
-the toolbar at the top of the window.</para>
-
-<figure id="fig-draw-on-image">
-<title>Drawing on Images</title>
-<mediaobject>
-<imageobject>
-<imagedata fileref="draw-on-image.png" format="PNG"/>
-</imageobject>
-</mediaobject>
+<figure id="fig-assign-macro-add-new-value.png">
+  <title>Adding a new tag</title>
+  <mediaobject>
+    <imageobject><imagedata fileref="assign-macro-add-new-value.png" format="PNG"/></imageobject>
+   </mediaobject>
 </figure>
-  </sect1>
--->
+
+<para>While tagging images from the viewer, you may want to add a tag, without binding it to a key. To do so simply press <keycombo>&Ctrl;<keycap>a</keycap></keycombo></para>
+
+</sect1>
 </chapter>
 
 <!-- Keep this comment at the end of the file


More information about the kde-doc-english mailing list