digiKam
slideproperties.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 : 2014-09-19
7  * Description : slide properties widget
8  *
9  * Copyright (C) 2014-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2019-2020 by Minh Nghia Duong <minhnghiaduong997 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)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_SLIDE_PROPERTIES_PLUGIN_H
26 #define DIGIKAM_SLIDE_PROPERTIES_PLUGIN_H
27 
28 #include <QWidget>
29 #include <QPainter>
30 #include <QString>
31 #include <QColor>
32 #include <QUrl>
33 
34 // Local includes
35 
36 #include "slideshowsettings.h"
37 
39 {
40 
41 class SlideProperties : public QWidget
42 {
43  Q_OBJECT
44 
45 public:
46 
47  explicit SlideProperties(SlideShowSettings* const settings, QWidget* const parent);
48  ~SlideProperties() override;
49 
50  void setCurrentUrl(const QUrl& url);
51  void togglePaintEnabled();
52 
53 private:
54 
55  void printInfoText(QPainter& p, int& offset, const QString& str, const QColor& pcol = Qt::white);
56  void printComments(QPainter& p, int& offset, const QString& comments);
57  void printTags(QPainter& p, int& offset, QStringList& tags);
58  void paintEvent(QPaintEvent*) override;
59 
60 private:
61 
62  class Private;
63  Private* const d;
64 };
65 
66 } // namespace DigikamGenericSlideShowPlugin
67 
68 #endif // DIGIKAM_SLIDE_PROPERTIES_PLUGIN_H
Definition: slideproperties.h:42
void togglePaintEnabled()
Definition: slideproperties.cpp:395
~SlideProperties() override
Definition: slideproperties.cpp:80
void setCurrentUrl(const QUrl &url)
Definition: slideproperties.cpp:85
SlideProperties(SlideShowSettings *const settings, QWidget *const parent)
Definition: slideproperties.cpp:72
Definition: slideshowsettings.h:52
Definition: slideshowloader.cpp:70