itom
Loading...
Searching...
No Matches
htmlItemDelegate.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2023, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#pragma once
24
25#include <qabstractitemmodel.h>
26#include <qsize.h>
27#include <qstyleditemdelegate.h>
28#include <qtreewidget.h>
29#include <qtextdocument.h>
30
31
32namespace ito {
33
34class HtmlItemDelegate : public QStyledItemDelegate
35{
36 Q_OBJECT;
37
38protected:
39 void paint(
40 QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const;
41 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const;
42
43 bool editorEvent(
44 QEvent* event,
45 QAbstractItemModel* model,
46 const QStyleOptionViewItem& option,
47 const QModelIndex& index) override;
48
49signals:
50 void itemDoubleClicked(QTreeWidget* treeWidget, QTreeWidgetItem* item);
51};
52} // end namespace ito
Definition htmlItemDelegate.h:35
Definition apiFunctionsGraph.cpp:40