File indexing completed on 2025-03-09 03:52:08
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-10-05 0007 * Description : a presentation tool. 0008 * 0009 * SPDX-FileCopyrightText: 2008 by Valerio Fuoglio <valerio dot fuoglio at gmail dot com> 0010 * SPDX-FileCopyrightText: 2021 by Phuoc Khanh Le <phuockhanhnk94 at gmail 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_CTRL_WIDGET_H 0018 #define DIGIKAM_PRESENTATION_CTRL_WIDGET_H 0019 0020 // Qt includes 0021 0022 #include <QWidget> 0023 #include <QKeyEvent> 0024 0025 // Local includes 0026 0027 #include "ui_presentationctrlwidget.h" 0028 #include "presentationcontainer.h" 0029 0030 namespace DigikamGenericPresentationPlugin 0031 { 0032 0033 class PresentationCtrlWidget : public QWidget, 0034 public Ui::PresentationCtrlWidget 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 0040 explicit PresentationCtrlWidget(QWidget* const parent, 0041 PresentationContainer* const sharedData); 0042 ~PresentationCtrlWidget() override; 0043 0044 bool canHide() const; 0045 bool isPaused() const; 0046 void setPaused(bool val); 0047 0048 void setEnabledPlay(bool val); 0049 void setEnabledNext(bool val); 0050 void setEnabledPrev(bool val); 0051 0052 Q_SIGNALS: 0053 0054 void signalNext(); 0055 void signalPrev(); 0056 void signalClose(); 0057 void signalPlay(); 0058 void signalPause(); 0059 void signalRemoveImageFromList(); 0060 0061 protected: 0062 0063 void keyPressEvent(QKeyEvent* event) override; 0064 0065 private Q_SLOTS: 0066 0067 void slotPlayButtonToggled(); 0068 void slotNexPrevClicked(); 0069 void slotChangeDelayButtonPressed(); 0070 void slotMoveToTrash(); 0071 0072 private: 0073 0074 bool m_canHide; 0075 PresentationContainer* m_sharedData; 0076 0077 friend class PresentationWidget; 0078 friend class PresentationGL; 0079 }; 0080 0081 } // namespace DigikamGenericPresentationPlugin 0082 0083 #endif // DIGIKAM_PRESENTATION_CTRL_WIDGET_H