File indexing completed on 2025-01-19 03:56:59
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2017-05-24 0007 * Description : images transition manager. 0008 * 0009 * SPDX-FileCopyrightText: 2017-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_TRANSITION_MNGR_H 0016 #define DIGIKAM_TRANSITION_MNGR_H 0017 0018 // Qt includes 0019 0020 #include <QMap> 0021 #include <QString> 0022 #include <QImage> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 0028 namespace Digikam 0029 { 0030 0031 class DIGIKAM_EXPORT TransitionMngr 0032 { 0033 public: 0034 0035 enum TransType 0036 { 0037 None = 0, 0038 ChessBoard, 0039 MeltDown, 0040 Sweep, 0041 Mosaic, 0042 Cubism, 0043 Growing, 0044 HorizontalLines, 0045 VerticalLines, 0046 CircleOut, 0047 MultiCircleOut, 0048 SpiralIn, 0049 Blobs, 0050 Fade, 0051 SlideL2R, 0052 SlideR2L, 0053 SlideT2B, 0054 SlideB2T, 0055 PushL2R, 0056 PushR2L, 0057 PushT2B, 0058 PushB2T, 0059 SwapL2R, 0060 SwapR2L, 0061 SwapT2B, 0062 SwapB2T, 0063 BlurIn, 0064 BlurOut, 0065 Random 0066 }; 0067 0068 public: 0069 0070 explicit TransitionMngr(); 0071 ~TransitionMngr(); 0072 0073 void setOutputSize(const QSize& size); 0074 void setTransition(TransType type); 0075 void setInImage(const QImage& iimg); 0076 void setOutImage(const QImage& oimg); 0077 0078 QImage currentFrame(int& tmout); 0079 0080 static QMap<TransType, QString> transitionNames(); 0081 0082 private: 0083 0084 // Disable 0085 TransitionMngr(const TransitionMngr&) = delete; 0086 TransitionMngr& operator=(const TransitionMngr&) = delete; 0087 0088 private: 0089 0090 class Private; 0091 Private* const d; 0092 }; 0093 0094 } // namespace Digikam 0095 0096 #endif // DIGIKAM_TRANSITION_MNGR_H