/*
  stylehintmodel.h

  This file is part of GammaRay, the Qt application inspection and manipulation tool.

  SPDX-FileCopyrightText: 2016 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
  Author: Volker Krause <volker.krause@kdab.com>

  SPDX-License-Identifier: GPL-2.0-or-later

  Contact KDAB at <info@kdab.com> for commercial licensing options.
*/

#ifndef GAMMARAY_STYLEHINTMODEL_H
#define GAMMARAY_STYLEHINTMODEL_H

#include "abstractstyleelementmodel.h"

#include <QStyle>

namespace GammaRay {

class StyleHintModel : public AbstractStyleElementModel
{
    Q_OBJECT
public:
    explicit StyleHintModel(QObject *parent = nullptr);
    ~StyleHintModel() override;

    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
    Qt::ItemFlags flags(const QModelIndex &index) const override;
    bool setData(const QModelIndex &index, const QVariant &value, int role) override;

protected:
    QVariant doData(int row, int column, int role) const override;
    int doColumnCount() const override;
    int doRowCount() const override;

private:
    static QVariant styleHintToVariant(QStyle::StyleHint hint, int value);
    QVariant styleHintData(QStyle::StyleHint hint) const;
};

}

#endif // GAMMARAY_STYLEHINTMODEL_H
