1 /*
2   This file is part of GammaRay, the Qt application inspection and
3   manipulation tool.
4 
5   Copyright (C) 2012-2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
6   Author: Volker Krause <volker.krause@kdab.com>
7 
8   Licensees holding valid commercial KDAB GammaRay licenses may use this file in
9   accordance with GammaRay Commercial License Agreement provided with the Software.
10 
11   Contact info@kdab.com if any conditions of this licensing are not clear to you.
12 
13   This program is free software; you can redistribute it and/or modify
14   it under the terms of the GNU General Public License as published by
15   the Free Software Foundation, either version 2 of the License, or
16   (at your option) any later version.
17 
18   This program is distributed in the hope that it will be useful,
19   but WITHOUT ANY WARRANTY; without even the implied warranty of
20   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21   GNU General Public License for more details.
22 
23   You should have received a copy of the GNU General Public License
24   along with this program.  If not, see <http://www.gnu.org/licenses/>.
25 */
26 
27 #ifndef GAMMARAY_WIDGETINSPECTOR_PAINTANALYZERWIDGET_H
28 #define GAMMARAY_WIDGETINSPECTOR_PAINTANALYZERWIDGET_H
29 
30 #include "gammaray_ui_export.h"
31 
32 #include <QWidget>
33 
34 namespace GammaRay {
35 namespace Ui {
36 class PaintAnalyzerWidget;
37 }
38 class PaintAnalyzerInterface;
39 
40 /**
41  * A widget to look at the command list in a QPaintBuffer.
42  */
43 class GAMMARAY_UI_EXPORT PaintAnalyzerWidget : public QWidget
44 {
45     Q_OBJECT
46 public:
47     explicit PaintAnalyzerWidget(QWidget *parent = nullptr);
48     ~PaintAnalyzerWidget() override;
49 
50     void setBaseName(const QString &name);
51 
52 private slots:
53     void detailsChanged();
54     void commandContextMenu(QPoint pos);
55     void stackTraceContextMenu(QPoint pos);
56 
57 private:
58     QScopedPointer<Ui::PaintAnalyzerWidget> ui;
59     PaintAnalyzerInterface *m_iface;
60 };
61 }
62 
63 #endif
64