digiKam
searchtextbardb.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 : 2007-11-25
7  * Description : a bar used to search a string - version based on database models
8  *
9  * Copyright (C) 2007-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
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_SEARCH_TEXT_BAR_DB_H
25 #define DIGIKAM_SEARCH_TEXT_BAR_DB_H
26 
27 // Local includes
28 
29 #include "digikam_export.h"
30 #include "searchtextbar.h"
31 
32 namespace Digikam
33 {
34 
35 class AbstractAlbumModel;
36 class AlbumFilterModel;
37 
44 class DIGIKAM_GUI_EXPORT SearchTextBarDb : public SearchTextBar
45 {
46  Q_OBJECT
47 
48 public:
49 
50  explicit SearchTextBarDb(QWidget* const parent,
51  const QString& name,
52  const QString& msg=QString());
53  ~SearchTextBarDb() override;
54 
63  void setModel(QAbstractItemModel* model, int uniqueIdRole, int displayRole = Qt::DisplayRole);
64 
74  void setModel(AbstractAlbumModel* const model);
75 
85  void setFilterModel(AlbumFilterModel* const filterModel);
86 
87 private:
88 
89  class Private;
90  Private* const d;
91 };
92 
93 } // namespace Digikam
94 
95 #endif // DIGIKAM_SEARCH_TEXT_BAR_DB_H
Definition: abstractalbummodel.h:49
Definition: albumfiltermodel.h:45
Definition: searchtextbardb.h:45
Definition: searchtextbar.h:65
Definition: datefolderview.cpp:43