1 /**************************************************************************
3 * Copyright 2013-2014 RAD Game Tools and Valve Software
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 **************************************************************************/
26 #ifndef VOGLEDITOR_APICALLTREEITEM_H
27 #define VOGLEDITOR_APICALLTREEITEM_H
32 #include "vogleditor_frameitem.h"
34 class vogl_trace_file_reader;
35 struct vogl_trace_gl_entrypoint_packet;
37 class vogleditor_QApiCallTreeModel;
39 enum VOGL_API_CALL_TREE_COLUMN
44 // VOGL_ACTC_BEGINTIME,
50 class vogleditor_apiCallTreeItem
53 // Constructor for the root node
54 vogleditor_apiCallTreeItem(vogleditor_QApiCallTreeModel* pModel);
56 // Constructor for frame nodes
57 vogleditor_apiCallTreeItem(vogleditor_frameItem* frameItem, vogleditor_apiCallTreeItem* parent);
59 // Constructor for apiCall nodes
60 vogleditor_apiCallTreeItem(QString nodeText, vogleditor_apiCallItem* apiCallItem, vogleditor_apiCallTreeItem* parent);
62 ~vogleditor_apiCallTreeItem();
64 vogleditor_apiCallTreeItem* parent() const;
66 void appendChild(vogleditor_apiCallTreeItem* pChild);
68 int childCount() const;
70 vogleditor_apiCallTreeItem* child(int index) const;
72 vogleditor_apiCallItem* apiCallItem() const;
74 vogleditor_frameItem* frameItem() const;
76 void set_snapshot(vogleditor_gl_state_snapshot* pSnapshot);
78 bool has_snapshot() const;
80 vogleditor_gl_state_snapshot* get_snapshot() const;
82 int columnCount() const;
84 QVariant columnData(int column, int role) const;
89 QList<vogleditor_apiCallTreeItem*> m_childItems;
90 QVariant m_columnData[VOGL_MAX_ACTC];
91 vogleditor_apiCallTreeItem* m_parentItem;
92 vogleditor_apiCallItem* m_pApiCallItem;
93 vogleditor_frameItem* m_pFrameItem;
94 vogleditor_QApiCallTreeModel* m_pModel;
97 #endif // VOGLEDITOR_APICALLTREEITEM_H