File indexing completed on 2025-01-19 03:50:50

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-12-05
0007  * Description : factory of basic models used for views in digikam
0008  *
0009  * SPDX-FileCopyrightText: 2009-2010 by Johannes Wienke <languitar at semipol dot de>
0010  * SPDX-FileCopyrightText: 2010      by Andi Clemens <andi dot clemens at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_DMODEL_FACTORY_H
0017 #define DIGIKAM_DMODEL_FACTORY_H
0018 
0019 // Qt includes
0020 
0021 #include <QObject>
0022 
0023 // Local includes
0024 
0025 #include "abstractalbummodel.h"
0026 #include "albumfiltermodel.h"
0027 #include "albummodel.h"
0028 #include "itemversionsmodel.h"
0029 
0030 namespace Digikam
0031 {
0032 
0033 /**
0034  * This class is simply a factory of all models that build the core of the
0035  * digikam application.
0036  *
0037  * @author jwienke
0038  */
0039 class DModelFactory: public QObject
0040 {
0041     Q_OBJECT
0042 
0043 public:
0044 
0045     DModelFactory();
0046     ~DModelFactory() override;
0047 
0048     TagModel*          getTagModel()          const;
0049     TagModel*          getTagFaceModel()      const;
0050     TagModel*          getTagFilterModel()    const;
0051 
0052     AlbumModel*        getAlbumModel()        const;
0053     SearchModel*       getSearchModel()       const;
0054     DateAlbumModel*    getDateAlbumModel()    const;
0055     ItemVersionsModel* getItemVersionsModel() const;
0056 
0057 private Q_SLOTS:
0058 
0059     void slotApplicationSettingsChanged();
0060 
0061 private:
0062 
0063     // Disable
0064     explicit DModelFactory(QObject*) = delete;
0065 
0066 private:
0067 
0068     class Private;
0069     Private* const d;
0070 };
0071 
0072 } // namespace Digikam
0073 
0074 #endif // DIGIKAM_DMODEL_FACTORY_H