File indexing completed on 2024-05-05 14:27:53
0001 /* 0002 SPDX-FileCopyrightText: 2005-2006, 2010 Tom Albers <toma@kde.org> 0003 SPDX-FileCopyrightText: 2006 Bram Schoenmakers <bramschoenmakers@kde.nl> 0004 0005 SPDX-License-Identifier: GPL-2.0-or-later 0006 0007 */ 0008 0009 #ifndef SLIDESHOW_H 0010 #define SLIDESHOW_H 0011 0012 #include "breakbase.h" 0013 #include <QWidget> 0014 0015 class SlideWidget; 0016 class QLabel; 0017 0018 class SlideEffect : public BreakBase 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit SlideEffect(QObject *parent); 0024 ~SlideEffect(); 0025 void reset(const QString &path, bool recursive, bool showSmallImages, bool expandImageToFullScreen, int interval); 0026 void activate() override; 0027 void deactivate() override; 0028 bool hasImages(); 0029 void loadImage(); 0030 0031 private slots: 0032 void slotGray(); 0033 void slotNewSlide(); 0034 0035 private: 0036 void findImagesInFolder(const QString &folder); 0037 0038 SlideWidget *m_slidewidget; 0039 QString m_basePath; 0040 QTimer *m_timer_slide; 0041 0042 bool m_searchRecursive; 0043 bool m_showSmallImages; 0044 bool m_expandImageToFullScreen; 0045 int m_slideInterval; 0046 0047 QStringList m_files; 0048 QStringList m_files_done; 0049 }; 0050 0051 class SlideWidget : public QWidget 0052 { 0053 Q_OBJECT 0054 public: 0055 /** 0056 * Constructor 0057 * @param parent Parent Widget 0058 * @param name Name 0059 */ 0060 explicit SlideWidget(QWidget *parent = nullptr); 0061 0062 /** 0063 * Destructor 0064 */ 0065 ~SlideWidget(); 0066 0067 void setImage(const QImage &image); 0068 0069 private slots: 0070 void slotDimension(); 0071 0072 private: 0073 QLabel *m_imageLabel; 0074 }; 0075 0076 #endif