digiKam
presentation_audiopage.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2008-09-14
7  * Description : a presentation tool.
8  *
9  * Copyright (C) 2008-2009 by Valerio Fuoglio <valerio dot fuoglio at gmail dot com>
10  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_PRESENTATION_AUDIO_PAGE_H
25 #define DIGIKAM_PRESENTATION_AUDIO_PAGE_H
26 
27 // Qt includes
28 
29 #include <QTime>
30 #include <QMutex>
31 #include <QUrl>
32 #include <QDialog>
33 
34 // Local includes
35 
36 #include "ui_presentation_audiopage.h"
38 #include "presentationaudiolist.h"
39 
41 {
42 
43 class PresentationAudioWidget;
44 class PresentationContainer;
45 
46 class SoundtrackPreview : public QDialog
47 {
48  Q_OBJECT
49 
50 public:
51 
52  explicit SoundtrackPreview(QWidget* const,
53  const QList<QUrl>&, PresentationContainer* const);
54  ~SoundtrackPreview() override;
55 
56 private:
57 
58  PresentationAudioWidget* m_playbackWidget;
59 };
60 
61 // ----------------------------------------------------------------------
62 
63 class PresentationAudioPage : public QWidget,
64  public Ui::PresentationAudioPage
65 {
66  Q_OBJECT
67 
68 public:
69 
70  explicit PresentationAudioPage(QWidget* const parent,
71  PresentationContainer* const sharedData);
72  ~PresentationAudioPage() override;
73 
74  void readSettings();
75  void saveSettings();
76 
77 private:
78 
79  void addItems(const QList<QUrl>& fileList);
80  void updateTracksNumber();
81  void updateFileList();
82  void compareTimes();
83 
84 private Q_SLOTS:
85 
86  void slotAddDropItems(const QList<QUrl>& filesUrl);
87  void slotSoundFilesButtonAdd();
88  void slotSoundFilesButtonDelete();
89  void slotSoundFilesButtonUp();
90  void slotSoundFilesButtonDown();
91  void slotSoundFilesButtonLoad();
92  void slotSoundFilesButtonSave();
93  void slotSoundFilesButtonReset();
94  void slotSoundFilesSelected(int);
95  void slotPreviewButtonClicked();
96  void slotImageTotalTimeChanged(const QTime&);
97  void slotAddNewTime(const QUrl&, const QTime&);
98 
99 private:
100 
101  class Private;
102  Private* const d;
103 };
104 
105 } // namespace DigikamGenericPresentationPlugin
106 
107 #endif // DIGIKAM_PRESENTATION_AUDIO_PAGE_H
Definition: presentation_audiopage.h:65
~PresentationAudioPage() override
Definition: presentation_audiopage.cpp:177
void readSettings()
Definition: presentation_audiopage.cpp:185
PresentationAudioPage(QWidget *const parent, PresentationContainer *const sharedData)
Definition: presentation_audiopage.cpp:95
void saveSettings()
Definition: presentation_audiopage.cpp:205
Definition: presentationaudiowidget.h:49
Definition: presentationcontainer.h:54
Definition: presentation_audiopage.h:47
SoundtrackPreview(QWidget *const, const QList< QUrl > &, PresentationContainer *const)
Definition: presentation_audiopage.cpp:48
~SoundtrackPreview() override
Definition: presentation_audiopage.cpp:68
Definition: presentation_audiopage.cpp:46