Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++
1.1 KB
Raw Blame
/* This file is part of the KDE project
 * SPDX-FileCopyrightText: 2019 Wolthera van Hövell tot Westerflier <[email protected]>
 *
 * SPDX-License-Identifier: LGPL-2.0-or-later
 */

#ifndef KISSTORAGECHOOSERWIDGET_H
#define KISSTORAGECHOOSERWIDGET_H

#include <QWidget>
#include <QAbstractItemDelegate>
#include <KisPopupButton.h>

#include "kritaresourcewidgets_export.h"

class KRITARESOURCEWIDGETS_EXPORT KisStorageChooserDelegate  : public QAbstractItemDelegate
{
    Q_OBJECT
public:
    explicit KisStorageChooserDelegate(QObject *parent = 0);
    ~KisStorageChooserDelegate() override {}

    void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;

    QSize sizeHint ( const QStyleOptionViewItem &, const QModelIndex & ) const override;

};


class KRITARESOURCEWIDGETS_EXPORT KisStorageChooserWidget : public KisPopupButton
{
    Q_OBJECT
public:
    KisStorageChooserWidget(const QString &resourceType, QWidget *parent = 0);

    ~KisStorageChooserWidget();

private Q_SLOTS:
    void activated(const QModelIndex &index);

private:
    QString m_resourceType;

};


#endif // KISSTORAGECHOOSERWIDGET_H