digiKam
dhistoryview.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 : 2009-05-26
7  * Description : History view.
8  *
9  * Copyright (C) 2009-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_DHISTORY_VIEW_H
25 #define DIGIKAM_DHISTORY_VIEW_H
26 
27 // Qt includes
28 
29 #include <QTreeWidget>
30 #include <QWidget>
31 #include <QString>
32 #include <QVariant>
33 
34 // Local includes
35 
36 #include "digikam_export.h"
37 
38 namespace Digikam
39 {
40 
41 class DIGIKAM_EXPORT DHistoryView : public QTreeWidget
42 {
43  Q_OBJECT
44 
45 public:
46 
47  enum EntryType
48  {
49  StartingEntry = 0,
54  CancelEntry
55  };
56 
57 public:
58 
59  explicit DHistoryView(QWidget* const parent);
60  ~DHistoryView() override;
61 
62  void addEntry(const QString& msg,
63  EntryType type,
64  const QVariant& metadata = QVariant());
65 
66 Q_SIGNALS:
67 
68  void signalEntryClicked(const QVariant& metadata);
69 
70 private Q_SLOTS:
71 
72  void slotItemDoubleClicked(QTreeWidgetItem*);
73  void slotContextMenu();
74  void slotCopy2ClipBoard();
75 
76 private:
77 
78  void mouseMoveEvent(QMouseEvent*) override;
79 };
80 
81 } // namespace Digikam
82 
83 #endif // DIGIKAM_DHISTORY_VIEW_H
Definition: dhistoryview.h:42
EntryType
Definition: dhistoryview.h:48
@ ProgressEntry
Definition: dhistoryview.h:53
@ SuccessEntry
Definition: dhistoryview.h:50
@ ErrorEntry
Definition: dhistoryview.h:52
@ WarningEntry
Definition: dhistoryview.h:51
void signalEntryClicked(const QVariant &metadata)
Definition: datefolderview.cpp:43