File indexing completed on 2025-03-09 03:52:05
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-09-14 0007 * Description : a presentation tool. 0008 * 0009 * SPDX-FileCopyrightText: 2008-2009 by Valerio Fuoglio <valerio dot fuoglio at gmail dot com> 0010 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_PRESENTATION_AUDIO_PAGE_H 0017 #define DIGIKAM_PRESENTATION_AUDIO_PAGE_H 0018 0019 #include "digikam_config.h" 0020 0021 // Qt includes 0022 0023 #include <QTime> 0024 #include <QMutex> 0025 #include <QUrl> 0026 #include <QDialog> 0027 0028 // Local includes 0029 0030 #include "ui_presentation_audiopage.h" 0031 #include "presentationaudiowidget.h" 0032 #include "presentationaudiolist.h" 0033 0034 namespace DigikamGenericPresentationPlugin 0035 { 0036 0037 class PresentationAudioWidget; 0038 class PresentationContainer; 0039 0040 class SoundtrackPreview : public QDialog 0041 { 0042 Q_OBJECT 0043 0044 public: 0045 0046 explicit SoundtrackPreview(QWidget* const, 0047 const QList<QUrl>&, PresentationContainer* const); 0048 ~SoundtrackPreview() override; 0049 0050 private: 0051 0052 PresentationAudioWidget* m_playbackWidget = nullptr; 0053 }; 0054 0055 // ---------------------------------------------------------------------- 0056 0057 class PresentationAudioPage : public QWidget, 0058 public Ui::PresentationAudioPage 0059 { 0060 Q_OBJECT 0061 0062 public: 0063 0064 explicit PresentationAudioPage(QWidget* const parent, 0065 PresentationContainer* const sharedData); 0066 ~PresentationAudioPage() override; 0067 0068 void readSettings(); 0069 void saveSettings(); 0070 0071 private: 0072 0073 void addItems(const QList<QUrl>& fileList); 0074 void updateTracksNumber(); 0075 void updateFileList(); 0076 void compareTimes(); 0077 0078 private Q_SLOTS: 0079 0080 void slotAddDropItems(const QList<QUrl>& filesUrl); 0081 void slotSoundFilesButtonAdd(); 0082 void slotSoundFilesButtonDelete(); 0083 void slotSoundFilesButtonUp(); 0084 void slotSoundFilesButtonDown(); 0085 void slotSoundFilesButtonLoad(); 0086 void slotSoundFilesButtonSave(); 0087 void slotSoundFilesButtonReset(); 0088 void slotSoundFilesSelected(int); 0089 void slotPreviewButtonClicked(); 0090 void slotImageTotalTimeChanged(const QTime&); 0091 void slotAddNewTime(const QUrl&, const QTime&); 0092 0093 private: 0094 0095 class Private; 0096 Private* const d; 0097 }; 0098 0099 } // namespace DigikamGenericPresentationPlugin 0100 0101 #endif // DIGIKAM_PRESENTATION_AUDIO_PAGE_H