digiKam
addtagslineedit.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2010-06-12
7  * Description : Special line edit for adding or creating tags
8  *
9  * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_ADD_TAGS_LINE_EDIT_H
25 #define DIGIKAM_ADD_TAGS_LINE_EDIT_H
26 
27 // Qt includes
28 
29 #include <QLineEdit>
30 
31 // Local includes
32 
33 #include "taggingaction.h"
34 
35 namespace Digikam
36 {
37 
38 class AlbumFilterModel;
39 class Album;
40 class TAlbum;
41 class TagModel;
42 class TagPropertiesFilterModel;
43 class TagTreeView;
44 
45 class AddTagsLineEdit : public QLineEdit
46 {
47  Q_OBJECT
48 
49 public:
50 
51  explicit AddTagsLineEdit(QWidget* const parent = nullptr);
52  ~AddTagsLineEdit() override;
53 
57  void setSupportingTagModel(TagModel* const model);
58 
62  void setFilterModel(AlbumFilterModel* const model);
63 
67  void setAlbumModels(TagModel* const model,
68  TagPropertiesFilterModel* const filteredModel,
69  AlbumFilterModel* const filterModel);
70 
75  void setTagTreeView(TagTreeView* const treeView);
76 
80  void setCurrentTag(TAlbum* const tag);
81 
82  void setAllowExceedBound(bool value);
83 
84  void setCurrentTaggingAction(const TaggingAction& action);
85 
87 
88 public Q_SLOTS:
89 
94  void setParentTag(Album* const album);
95 
96 Q_SIGNALS:
97 
102 
108 
109 protected Q_SLOTS:
110 
111  void completerHighlighted(const TaggingAction& action);
112  void completerActivated(const TaggingAction& action);
113  void slotReturnPressed();
114  void slotEditingFinished();
115  void slotTextEdited(const QString& text);
116 
117 private:
118 
119  class Private;
120  Private* const d;
121 };
122 
123 } // namespace Digikam
124 
125 #endif // DIGIKAM_ADD_TAGS_LINE_EDIT_H
Definition: addtagslineedit.h:46
void setParentTag(Album *const album)
Definition: addtagslineedit.cpp:155
TaggingAction currentTaggingAction() const
Definition: addtagslineedit.cpp:227
void setCurrentTaggingAction(const TaggingAction &action)
Definition: addtagslineedit.cpp:220
void setAlbumModels(TagModel *const model, TagPropertiesFilterModel *const filteredModel, AlbumFilterModel *const filterModel)
Definition: addtagslineedit.cpp:114
void slotEditingFinished()
Definition: addtagslineedit.cpp:187
void taggingActionSelected(const TaggingAction &action)
void setFilterModel(AlbumFilterModel *const model)
Definition: addtagslineedit.cpp:108
void setCurrentTag(TAlbum *const tag)
Definition: addtagslineedit.cpp:149
void setAllowExceedBound(bool value)
Definition: addtagslineedit.cpp:161
void setSupportingTagModel(TagModel *const model)
Definition: addtagslineedit.cpp:103
void taggingActionActivated(const TaggingAction &action)
void completerActivated(const TaggingAction &action)
Definition: addtagslineedit.cpp:208
void slotReturnPressed()
Definition: addtagslineedit.cpp:173
~AddTagsLineEdit() override
Definition: addtagslineedit.cpp:98
void slotTextEdited(const QString &text)
Definition: addtagslineedit.cpp:192
void setTagTreeView(TagTreeView *const treeView)
Definition: addtagslineedit.cpp:130
AddTagsLineEdit(QWidget *const parent=nullptr)
Definition: addtagslineedit.cpp:63
void completerHighlighted(const TaggingAction &action)
Definition: addtagslineedit.cpp:215
Definition: albumfiltermodel.h:45
Abstract base class for all album types.
Definition: album.h:67
Definition: album.h:420
Definition: albummodel.h:63
Definition: albumfiltermodel.h:376
Definition: tagtreeview.h:37
Definition: taggingaction.h:36
qulonglong value
Definition: itemviewutilities.cpp:592
@ Album
Definition: coredbfields.h:58
Definition: datefolderview.cpp:43