File: typeslisttreewidget.h

package info (click to toggle)
kde-cli-tools 4%3A6.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,396 kB
  • sloc: cpp: 4,368; sh: 42; makefile: 7
file content (27 lines) | stat: -rw-r--r-- 805 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*  This file is part of the KDE project
    SPDX-FileCopyrightText: 2000-2008 David Faure <faure@kde.org>
    SPDX-FileCopyrightText: 2008 Urs Wolfer <uwolfer @ kde.org>

    SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/

#ifndef TYPESLISTTREEWIDGET_H
#define TYPESLISTTREEWIDGET_H

#include <QTreeWidget>

// helper class for loading the icon on request instead of preloading lots of probably
// unused icons which takes quite a lot of time
class TypesListTreeWidget : public QTreeWidget
{
    Q_OBJECT
public:
    explicit TypesListTreeWidget(QWidget *parent = nullptr);

protected:
    void drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;

    void keyPressEvent(QKeyEvent *event) override;
};

#endif