File indexing completed on 2024-05-19 04:29:02

0001 /*
0002  *  SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_NODE_VIEW_COLOR_SCHEME_H
0008 #define __KIS_NODE_VIEW_COLOR_SCHEME_H
0009 
0010 #include <QScopedPointer>
0011 #include <QColor>
0012 
0013 #include "kritaui_export.h"
0014 
0015 class QTreeView;
0016 class QStyleOptionViewItem;
0017 class QRect;
0018 
0019 class KRITAUI_EXPORT KisNodeViewColorScheme
0020 {
0021 public:
0022     KisNodeViewColorScheme();
0023     ~KisNodeViewColorScheme();
0024 
0025     static KisNodeViewColorScheme* instance();
0026 
0027     QColor gridColor(const QStyleOptionViewItem &option, QTreeView *view) const;
0028 
0029     int visibilitySize() const;
0030     int visibilityMargin() const;
0031 
0032     int thumbnailSize() const;
0033     int thumbnailMargin() const;
0034 
0035     int decorationSize() const;
0036     int decorationMargin() const;
0037 
0038     int textMargin() const;
0039 
0040     int iconSize() const;
0041     int iconMargin() const;
0042 
0043     int border() const;
0044 
0045     int rowHeight() const;
0046     int visibilityColumnWidth() const;
0047     int indentation() const;
0048     int selectedButtonColumnWidth() const;
0049 
0050     QRect relVisibilityRect() const;
0051     QRect relThumbnailRect() const;
0052     QRect relDecorationRect() const;
0053     QRect relExpandButtonRect() const;
0054 
0055     QColor colorFromLabelIndex(int index) const;
0056     QVector<QColor> allColorLabels() const;
0057 
0058 private:
0059     struct Private;
0060     const QScopedPointer<Private> m_d;
0061 };
0062 
0063 #endif /* __KIS_NODE_VIEW_COLOR_SCHEME_H */