libkdegames/kggzmod
player.cpp
Go to the documentation of this file.00001 /* 00002 This file is part of the kggzmod library. 00003 Copyright (c) 2005 - 2007 Josef Spillner <josef@ggzgamingzone.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #include "player.h" 00022 #include "player_private.h" 00023 00024 using namespace KGGZMod; 00025 00026 Player::Player() 00027 { 00028 d = new PlayerPrivate(); 00029 00030 d->m_type = Player::unknown; 00031 d->m_seat = -1; 00032 d->m_stats = 0; 00033 } 00034 00035 Player::~Player() { delete d; } 00036 00037 Player::Type Player::type() const 00038 { 00039 return d->m_type; 00040 } 00041 00042 QString Player::name() const 00043 { 00044 return d->m_name; 00045 } 00046 00047 int Player::seat() const 00048 { 00049 return d->m_seat; 00050 } 00051 00052 Statistics *Player::stats() const 00053 { 00054 return d->m_stats; 00055 } 00056 00057 QString Player::hostname() const 00058 { 00059 return d->m_hostname; 00060 } 00061 00062 QString Player::photo() const 00063 { 00064 return d->m_photo; 00065 } 00066 00067 QString Player::realname() const 00068 { 00069 return d->m_realname; 00070 } 00071 00072 void Player::init(PlayerPrivate *x) 00073 { 00074 delete d; 00075 d = x; 00076 } 00077
KDE 4.2 API Reference