1 /* 2 objectmodel.h 3 4 This file is part of GammaRay, the Qt application inspection and 5 manipulation tool. 6 7 Copyright (C) 2010-2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com 8 Author: Volker Krause <volker.krause@kdab.com> 9 10 Licensees holding valid commercial KDAB GammaRay licenses may use this file in 11 accordance with GammaRay Commercial License Agreement provided with the Software. 12 13 Contact info@kdab.com if any conditions of this licensing are not clear to you. 14 15 This program is free software; you can redistribute it and/or modify 16 it under the terms of the GNU General Public License as published by 17 the Free Software Foundation, either version 2 of the License, or 18 (at your option) any later version. 19 20 This program is distributed in the hope that it will be useful, 21 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 GNU General Public License for more details. 24 25 You should have received a copy of the GNU General Public License 26 along with this program. If not, see <http://www.gnu.org/licenses/>. 27 */ 28 /** 29 @file 30 This file is part of the GammaRay Plugin API and declares the public object model roles. 31 32 @brief 33 Declares the public object model roles. 34 35 @author Volker Krause \<volker.krause@kdab.com\> 36 */ 37 38 #ifndef GAMMARAY_OBJECTMODEL_H 39 #define GAMMARAY_OBJECTMODEL_H 40 41 #include "modelroles.h" 42 43 namespace GammaRay { 44 /*! 45 * GammaRay Object Models. 46 * 47 * Public object model roles, for use by tool plugins without needing access 48 * to the real object model classes. 49 */ 50 namespace ObjectModel { 51 /*! Role enum, to be used with the object list and tree models. */ 52 enum Role { 53 ObjectRole = GammaRay::UserRole + 1, /**< Pointer to the represented object (available in the probe code only). */ 54 ObjectIdRole, /**< ObjectId instance for represented object. */ 55 CreationLocationRole, /**< Source location where this object was created, if known. */ 56 DeclarationLocationRole,/**< Source location where the type for this object has been declared, if known. */ 57 DecorationIdRole, /**< The classes icon id to display as Qt::DecorationRole (see ClientDecorationIdentityProxyModel). */ 58 UserRole /**< UserRole, as defined by Qt. */ 59 }; 60 } 61 } 62 63 #endif 64