digiKam
toolsview.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-04-20
7  * Description : a view to host all available tools.
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_BQM_TOOLS_VIEW_H
25 #define DIGIKAM_BQM_TOOLS_VIEW_H
26 
27 // Local includes
28 
29 #include "dhistoryview.h"
30 
31 namespace Digikam
32 {
33 
34 class BatchTool;
35 
36 class ToolsView : public QTabWidget
37 {
38  Q_OBJECT
39 
40 public:
41 
42  enum ViewTabs
43  {
44  TOOLS = 0,
46  HISTORY
47  };
48 
49 public:
50 
51  explicit ToolsView(QWidget* const parent = nullptr);
52  ~ToolsView() override;
53 
54  void addTool(BatchTool* const tool);
55  bool removeTool(BatchTool* const tool);
56 
57  void setBusy(bool b);
58 
59  void showTab(ViewTabs t);
60  void addHistoryEntry(const QString& msg,
62  int queueId = -1,
63  qlonglong itemId = -1);
64 
65 Q_SIGNALS:
66 
68  void signalAssignTools(const QMultiMap<int, QString>&);
69  void signalHistoryEntryClicked(int, qlonglong);
70 
71 private Q_SLOTS:
72 
73  void slotHistoryEntryClicked(const QVariant&);
74 
75 private:
76 
77  class Private;
78  Private* const d;
79 };
80 
81 } // namespace Digikam
82 
83 #endif // DIGIKAM_BQM_TOOLS_VIEW_H
Definition: batchtool.h:56
EntryType
Definition: dhistoryview.h:48
Definition: toolsview.h:37
bool removeTool(BatchTool *const tool)
Definition: toolsview.cpp:153
~ToolsView() override
Definition: toolsview.cpp:110
ViewTabs
Definition: toolsview.h:43
@ TOOLS
Definition: toolsview.h:44
@ HISTORY
Definition: toolsview.h:46
@ WORKFLOW
Definition: toolsview.h:45
void setBusy(bool b)
Definition: toolsview.cpp:115
void addTool(BatchTool *const tool)
Definition: toolsview.cpp:128
ToolsView(QWidget *const parent=nullptr)
Definition: toolsview.cpp:63
void signalHistoryEntryClicked(int, qlonglong)
void showTab(ViewTabs t)
Definition: toolsview.cpp:194
void addHistoryEntry(const QString &msg, DHistoryView::EntryType type, int queueId=-1, qlonglong itemId=-1)
Definition: toolsview.cpp:180
void signalAssignQueueSettings(QString)
void signalAssignTools(const QMultiMap< int, QString > &)
Definition: datefolderview.cpp:43