digiKam
dnotificationwidget_p.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 : 2011-07-03
7  * Description : A widget to provide feedback or propose opportunistic interactions
8  *
9  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (c) 2011 by Aurelien Gateau <agateau at kde dot org>
11  * Copyright (c) 2014 by Dominik Haumann <dhaumann at kde dot org>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_DNOTIFICATION_WIDGET_PRIVATE_H
27 #define DIGIKAM_DNOTIFICATION_WIDGET_PRIVATE_H
28 
29 // Qt includes
30 
31 #include <QFrame>
32 #include <QObject>
33 #include <QLabel>
34 #include <QToolButton>
35 #include <QTimeLine>
36 #include <QTimer>
37 #include <QPixmap>
38 
39 // Local includes
40 
41 #include "dnotificationwidget.h"
42 
43 namespace Digikam
44 {
45 
46 class Q_DECL_HIDDEN DNotificationWidget::Private : public QObject
47 {
48  Q_OBJECT
49 
50 public:
51 
52  explicit Private(DNotificationWidget* const);
53  ~Private() override;
54 
55  void init();
56  void createLayout();
57  void updateSnapShot();
58  void updateLayout();
59  int bestContentHeight() const;
60 
61 public:
62 
64  QFrame* content;
65  QLabel* iconLabel;
66  QLabel* textLabel;
67  QToolButton* closeButton;
68  QTimeLine* timeLine;
69  QTimer* timer;
70  QIcon icon;
71  QString text;
72 
74  bool wordWrap;
76  QPixmap contentSnapShot;
77  int delay;
78 
79 private Q_SLOTS:
80 
81  void slotTimeLineChanged(qreal);
82  void slotTimeLineFinished();
83 };
84 
85 } // namespace Digikam
86 
87 #endif // DIGIKAM_DNOTIFICATION_WIDGET_PRIVATE_H
Definition: dnotificationwidget_p.h:47
DNotificationWidget * q
Definition: dnotificationwidget_p.h:63
QPixmap contentSnapShot
Definition: dnotificationwidget_p.h:76
QLabel * textLabel
Definition: dnotificationwidget_p.h:66
QToolButton * closeButton
Definition: dnotificationwidget_p.h:67
QLabel * iconLabel
Definition: dnotificationwidget_p.h:65
QList< QToolButton * > buttons
Definition: dnotificationwidget_p.h:75
QFrame * content
Definition: dnotificationwidget_p.h:64
int delay
Definition: dnotificationwidget_p.h:77
QString text
Definition: dnotificationwidget_p.h:71
QIcon icon
Definition: dnotificationwidget_p.h:70
QTimeLine * timeLine
Definition: dnotificationwidget_p.h:68
DNotificationWidget::MessageType messageType
Definition: dnotificationwidget_p.h:73
QTimer * timer
Definition: dnotificationwidget_p.h:69
bool wordWrap
Definition: dnotificationwidget_p.h:74
Definition: dnotificationwidget.h:48
MessageType
Definition: dnotificationwidget.h:63
Definition: datefolderview.cpp:43