File indexing completed on 2025-03-09 03:52:06

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2007-11-11
0007  * Description : a presentation tool.
0008  *
0009  * SPDX-FileCopyrightText: 2007-2009 by Valerio Fuoglio <valerio dot fuoglio at gmail dot com>
0010  * SPDX-FileCopyrightText: 2009      by Andi Clemens <andi dot clemens at googlemail dot com>
0011  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_PRESENTATION_LOADER_H
0018 #define DIGIKAM_PRESENTATION_LOADER_H
0019 
0020 // Qt includes
0021 
0022 #include <QString>
0023 #include <QImage>
0024 #include <QUrl>
0025 
0026 namespace DigikamGenericPresentationPlugin
0027 {
0028 
0029 class PresentationContainer;
0030 
0031 class PresentationLoader
0032 {
0033 public:
0034 
0035     explicit PresentationLoader(PresentationContainer* const sharedData,
0036                                 int width,
0037                                 int height,
0038                                 int beginAtIndex = 0);
0039 
0040     ~PresentationLoader();
0041 
0042     void    next();
0043     void    prev();
0044 
0045     QImage  getCurrent()        const;
0046     QString currFileName()      const;
0047     QUrl    currPath()          const;
0048 
0049 private:
0050 
0051     void checkIsIn(int index)   const;
0052 
0053 private:
0054 
0055     // Disable
0056     PresentationLoader(const PresentationLoader&)            = delete;
0057     PresentationLoader& operator=(const PresentationLoader&) = delete;
0058 
0059 private:
0060 
0061     class Private;
0062     Private* const d;
0063 };
0064 
0065 } // namespace DigikamGenericPresentationPlugin
0066 
0067 #endif // DIGIKAM_PRESENTATION_LOADER_H