Krita Source Code Documentation
Loading...
Searching...
No Matches
wdg_resource_preview.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Srirupa Datta <srirupa.sps@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef WDG_RESOURCE_PREVIEW_H
8#define WDG_RESOURCE_PREVIEW_H
9
10#include <QSharedPointer>
11#include <QItemSelection>
12#include <QWidget>
13
17
18
21class KisStorageModel;
22class KisTagModel;
25class KisTag;
27
29
30namespace Ui {
32}
33
34class WdgResourcePreview : public QWidget
35{
36 Q_OBJECT
37
38public:
39 explicit WdgResourcePreview(WidgetType type, QWidget *parent = nullptr);
41
42Q_SIGNALS:
43 void signalResourcesSelectionChanged(QModelIndex selected);
45
46private Q_SLOTS:
48 void slotTagSelected(int);
49 void slotStorageSelected(int);
50
51 void slotFilterTextChanged(const QString& filterText);
52 void slotShowDeletedChanged(int newState);
53 void slotViewThumbnail();
54 void slotViewDetails();
55
56public:
57 QString getCurrentResourceType();
61 QMap<QString, KisTagFilterResourceProxyModel*> getResourceProxyModelsForResourceType();
62
63 QAbstractItemModel* getModel();
64
65private:
66 Ui::WdgResourcePreview *m_ui;
68
70
73 QMap<QString, KisTagModel*> m_tagModelsForResourceType;
75
76 QMap<QString, KisTagFilterResourceProxyModel*> m_resourceProxyModelsForResourceType;
78
81
82};
83
84#endif // WDG_RESOURCE_PREVIEW_H
A KisActionManager class keeps track of KisActions. These actions are always associated with the GUI....
The resource item delegate for rendering the resource preview.
The KisResourceModel class provides the main access to resources. It is possible to filter the resour...
The resource item delegate for rendering the resource preview.
The KisTagFilterResourceProxyModel class filters the resources by tag or resource name.
The KisTag loads a tag from a .tag file. A .tag file is a .desktop file. The following fields are imp...
Definition KisTag.h:34
KisResourceTypeModel * m_resourceTypeModel
KisResourceThumbnailPainter m_thumbnailPainter
Ui::WdgResourcePreview * m_ui
QMap< QString, KisTagModel * > m_tagModelsForResourceType
void signalResourcesSelectionChanged(QModelIndex selected)
QMap< QString, KisTagFilterResourceProxyModel * > getResourceProxyModelsForResourceType()
void resourceTypeSelected(int)
WdgResourcePreview(WidgetType type, QWidget *parent=nullptr)
KisStorageModel * m_storageModel
QList< int > m_selectedResourcesIds
void slotFilterTextChanged(const QString &filterText)
void slotShowDeletedChanged(int newState)
QMap< QString, KisTagFilterResourceProxyModel * > m_resourceProxyModelsForResourceType
KisResourceItemDelegate * m_kisResourceItemDelegate
QModelIndexList getResourceItemsSelected()
KisResourceModel * m_resourceModel
QAbstractItemModel * getModel()
QSharedPointer< KisTag > getCurrentTag()