File indexing completed on 2024-04-28 05:27:04
0001 /* This file is part of the KDE project 0002 SPDX-FileCopyrightText: 2000-2008 David Faure <faure@kde.org> 0003 SPDX-FileCopyrightText: 2008 Urs Wolfer <uwolfer @ kde.org> 0004 0005 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0006 */ 0007 0008 #ifndef TYPESLISTTREEWIDGET_H 0009 #define TYPESLISTTREEWIDGET_H 0010 0011 #include <QTreeWidget> 0012 0013 // helper class for loading the icon on request instead of preloading lots of probably 0014 // unused icons which takes quite a lot of time 0015 class TypesListTreeWidget : public QTreeWidget 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit TypesListTreeWidget(QWidget *parent = nullptr); 0020 0021 protected: 0022 void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; 0023 0024 void keyPressEvent(QKeyEvent *event) override; 0025 }; 0026 0027 #endif