Krita Source Code Documentation
Loading...
Searching...
No Matches
page_resource_chooser.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 PAGE_RESOURCE_CHOOSER_H
8#define PAGE_RESOURCE_CHOOSER_H
9
12
13#include <QPainter>
14#include <QWizardPage>
15
16#include <KoResourceBundle.h>
18#include <KisResourceModel.h>
21#include "KisBundleStorage.h"
22
23namespace Ui {
25}
26
27class PageResourceChooser : public QWizardPage
28{
29 Q_OBJECT
30
31public:
32 explicit PageResourceChooser(KoResourceBundleSP bundle = nullptr, QWidget *parent = nullptr);
34
35Q_SIGNALS:
37
38private Q_SLOTS:
39 void slotResourcesSelectionChanged(QModelIndex selected);
41 void selectResource(QSortFilterProxyModel *model, const QModelIndex idx);
42 void slotRemoveSelected(bool);
43 void slotViewThumbnail();
44 void slotViewDetails();
45
46public:
48 void updateCount(bool);
49 void updateResources(QString resourceType, int count);
50
51
52private:
53 Ui::PageResourceChooser *m_ui;
57 QMap<QString, QList<QPair<QString, QImage>>> m_existingResourcesImageMap;
58
63
65};
66
67#endif // PAGE_RESOURCE_CHOOSER_H
The resource item delegate for rendering the resource preview.
KisResourceItemDelegate * m_kisResourceItemDelegate
Ui::PageResourceChooser * m_ui
QMap< QString, QList< QPair< QString, QImage > > > m_existingResourcesImageMap
QList< int > getSelectedResourcesIds()
KisBundleStorage * m_bundleStorage
void slotResourcesSelectionChanged(QModelIndex selected)
PageResourceChooser(KoResourceBundleSP bundle=nullptr, QWidget *parent=nullptr)
QList< QString > m_existingResources
KoResourceBundleSP m_bundle
void selectResource(QSortFilterProxyModel *model, const QModelIndex idx)
QList< int > m_selectedResourcesIds
void updateResources(QString resourceType, int count)
WdgResourcePreview * m_wdgResourcePreview
KisResourceItemListWidget * m_resourceItemWidget