okteta
abstractframerenderer.cpp
Go to the documentation of this file.00001 /* 00002 This file is part of the Okteta Kakao module, part of the KDE project. 00003 00004 Copyright 2007 Friedrich W. H. Kossebau <kossebau@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Lesser General Public 00008 License as published by the Free Software Foundation; either 00009 version 2.1 of the License, or (at your option) version 3, or any 00010 later version accepted by the membership of KDE e.V. (or its 00011 successor approved by the membership of KDE e.V.), which shall 00012 act as a proxy defined in Section 6 of version 3 of the license. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Lesser General Public License for more details. 00018 00019 You should have received a copy of the GNU Lesser General Public 00020 License along with this library. If not, see <http://www.gnu.org/licenses/>. 00021 */ 00022 00023 #include "abstractframerenderer.h" 00024 00025 // Qt 00026 #include <QtCore/QPoint> 00027 #include <QtCore/QSize> 00028 #include <QtCore/QRect> 00029 00030 class AbstractFrameRenderer::Private 00031 { 00032 public: 00033 Private(); 00034 public: 00035 int mX; 00036 int mY; 00037 }; 00038 AbstractFrameRenderer::Private::Private() : mX( 0 ), mY( 0 ) {} 00039 00040 00041 AbstractFrameRenderer::AbstractFrameRenderer() : d( new Private() ) {} 00042 00043 QPoint AbstractFrameRenderer::pos () const { return QPoint(d->mX, d->mY); } 00044 QSize AbstractFrameRenderer::size () const { return QSize(width(),height()); } 00045 QRect AbstractFrameRenderer::rect () const { return QRect(pos(),size()); } 00046 00047 int AbstractFrameRenderer::x() const { return d->mX; } 00048 int AbstractFrameRenderer::y() const { return d->mY; } 00049 00050 void AbstractFrameRenderer::setPos( int x, int y ) { d->mX = x; d->mY = y; } 00051 void AbstractFrameRenderer::setPos( const QPoint &point ) { d->mX = point.x(); d->mY = point.y(); } 00052 00053 AbstractFrameRenderer::~AbstractFrameRenderer() { delete d; }
KDE 4.2 API Reference