digiKam
Loading...
Searching...
No Matches
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 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2011 by Aurelien Gateau <agateau at kde dot org>
11 * SPDX-FileCopyrightText: 2014 by Dominik Haumann <dhaumann at kde dot org>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19// Qt includes
20
21#include <QFrame>
22#include <QObject>
23#include <QLabel>
24#include <QToolButton>
25#include <QTimeLine>
26#include <QTimer>
27#include <QPixmap>
28
29// Local includes
30
31#include "dnotificationwidget.h"
32
33namespace Digikam
34{
35
36class Q_DECL_HIDDEN DNotificationWidget::Private : public QObject
37{
38 Q_OBJECT
39
40public:
41
42 explicit Private(DNotificationWidget* const);
43 ~Private() override;
44
45 void init();
46 void createLayout();
47 void updateSnapShot();
48 void updateLayout();
49 int bestContentHeight() const;
50
51public:
52
53 DNotificationWidget* q = nullptr;
54 QFrame* content = nullptr;
55 QLabel* iconLabel = nullptr;
56 QLabel* textLabel = nullptr;
57 QToolButton* closeButton = nullptr;
58 QTimeLine* timeLine = nullptr;
59 QTimer* timer = nullptr;
60 QIcon icon;
61 QString text;
62
63 DNotificationWidget::MessageType messageType = DNotificationWidget::Information;
64 bool wordWrap = false;
65 QList<QToolButton*> buttons;
67 int delay = -1;
68
69private Q_SLOTS:
70
71 void slotTimeLineChanged(qreal);
72 void slotTimeLineFinished();
73};
74
75} // namespace Digikam
Definition dnotificationwidget_p.h:37
QPixmap contentSnapShot
Definition dnotificationwidget_p.h:66
QList< QToolButton * > buttons
Definition dnotificationwidget_p.h:65
QString text
Definition dnotificationwidget_p.h:61
QIcon icon
Definition dnotificationwidget_p.h:60
Definition dnotificationwidget.h:38
MessageType
Definition dnotificationwidget.h:53
Definition datefolderview.cpp:34