Plasma
clientpinrequest.cpp
Go to the documentation of this file.
00001 /* 00002 * Copyright 2009 by Rob Scheepmaker <r.scheepmaker@student.utwente.nl> 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 51 Franklin St, Fifth Floor, 00017 * Boston, MA 02110-1301 USA 00018 */ 00019 00020 #include "clientpinrequest.h" 00021 00022 #include "service.h" 00023 #include "private/remoteservice_p.h" 00024 00025 #include <kdebug.h> 00026 #include <klocalizedstring.h> 00027 00028 namespace Plasma 00029 { 00030 00031 class ClientPinRequestPrivate { 00032 public: 00033 ClientPinRequestPrivate(RemoteService *service) 00034 : service(service) 00035 { 00036 } 00037 00038 ~ClientPinRequestPrivate() {} 00039 00040 RemoteService *service; 00041 QString pin; 00042 }; 00043 00044 ClientPinRequest::ClientPinRequest(RemoteService *service) 00045 : QObject(service), 00046 d(new ClientPinRequestPrivate(service)) 00047 { 00048 } 00049 00050 ClientPinRequest::~ClientPinRequest() 00051 { 00052 delete d; 00053 } 00054 00055 QString ClientPinRequest::description() const 00056 { 00057 return i18n("You have requested access to the %1 hosted at %2.", d->service->name(), 00058 d->service->location()); 00059 } 00060 00061 void ClientPinRequest::setPin(const QString &pin) 00062 { 00063 kDebug() << "pin = " << pin; 00064 d->pin = pin; 00065 emit changed(this); 00066 } 00067 00068 QString ClientPinRequest::pin() const 00069 { 00070 return d->pin; 00071 } 00072 00073 } // Plasma namespace 00074 00075 #include "clientpinrequest.moc" 00076
KDE 4.6 API Reference