1 /* 2 * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 3 * 4 * This file is part of the KD Chart library. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <https://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef CHARTGRAPHICSITEM_H 21 #define CHARTGRAPHICSITEM_H 22 23 #include <QGraphicsPolygonItem> 24 25 namespace KChart { 26 27 /** 28 * @brief Graphics item used inside of the ReverseMapper 29 * \internal 30 */ 31 class ChartGraphicsItem : public QGraphicsPolygonItem 32 { 33 public: 34 enum { Type = UserType + 1 }; 35 36 ChartGraphicsItem(); 37 38 ChartGraphicsItem( int row, int column ); 39 row()40 int row() const { return m_row; } column()41 int column() const { return m_column; } type()42 int type() const override { return Type; } 43 44 private: 45 int m_row; 46 int m_column; 47 }; 48 49 } 50 51 #endif 52