/* * Qt UI * * Copyright (C) 2015 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * GiWoong Kim * Sangho Park * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301, USA. * * Contributors: * - S-Core Co., Ltd * */ #ifndef SKINPAINTER_H #define SKINPAINTER_H #include #include "layout/displaytype.h" struct Separator { int hOffset; QPen pen; }; class SkinPainter { public: SkinPainter(const QString &patchPath, QSize centerPatch, int degree, QPoint tagLeftTop, QColor tagColor); SkinPainter(QSize centerPatch, int degree, QList separators); ~SkinPainter(); QImage getSkinImage() const; QRect getCenteralRect(); private: void drawSkin(QString patchPath, QSize center, int degree, QPoint tagLeftTop, QColor tagColor); void drawSkin(QSize center, int degree, QList separators); QPixmap *skin; QRect centeralRect; }; #endif // SKINPAINTER_H