digiKam
hspreviewwidget.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 : 2007-01-08
7  * Description : Hue/Saturation preview widget
8  *
9  * Copyright (C) 2007-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * 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_HS_PREVIEW_WIDGET_H
25 #define DIGIKAM_HS_PREVIEW_WIDGET_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QPaintEvent>
31 #include <QResizeEvent>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 
37 namespace Digikam
38 {
39 
40 class DIGIKAM_EXPORT HSPreviewWidget : public QWidget
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit HSPreviewWidget(QWidget* const parent = nullptr);
47  ~HSPreviewWidget() override;
48 
49  void setHS(double hue, double sat);
50 
51 protected:
52 
53  void resizeEvent(QResizeEvent*) override;
54  void paintEvent(QPaintEvent*) override;
55 
56 private:
57 
58  void updatePixmap();
59 
60 private:
61 
62  class Private;
63  Private* const d;
64 };
65 
66 } // namespace Digikam
67 
68 #endif // DIGIKAM_HS_PREVIEW_WIDGET_H
Definition: hspreviewwidget.h:41
Definition: datefolderview.cpp:43