1 /* This file is part of the KDE project
2 Copyright (C) 2005 Michal Vaner <michal.vaner@kdemail.net>
3 Copyright (C) 2008-2009 Pali Rohár <pali.rohar@gmail.com>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA.
21 #include "skypedetails.h"
22 #include "skypeaccount.h"
26 #include <qlineedit.h>
27 #include <qcombobox.h>
29 SkypeDetails::SkypeDetails() : KDialog() {
30 kDebug() << k_funcinfo
<< endl
;
32 setButtons( KDialog::Close
); //add only close button
33 setDefaultButton( KDialog::Close
);
35 QWidget
* w
= new QWidget( this );
36 dialog
= new Ui::SkypeDetailsBase();//create the insides
40 connect(dialog
->authorCombo
, SIGNAL(activated(int)), this, SLOT(changeAuthor(int)));
44 SkypeDetails::~SkypeDetails() {
45 kDebug() << k_funcinfo
<< endl
;
49 void SkypeDetails::closeEvent(QCloseEvent
*) {
50 kDebug() << k_funcinfo
<< endl
;
54 void SkypeDetails::changeAuthor(int item
) {
55 kDebug() << k_funcinfo
<< endl
;
58 account
->authorizeUser(dialog
->idEdit
->text());
61 account
->disAuthorUser(dialog
->idEdit
->text());
64 account
->blockUser(dialog
->idEdit
->text());
69 SkypeDetails
&SkypeDetails::setNames(const QString
&id
, const QString
&nick
, const QString
&name
) {
70 kDebug() << k_funcinfo
<< endl
;
71 setCaption(i18n("Details for User %1", id
));
72 dialog
->idEdit
->setText(id
);
73 dialog
->nickEdit
->setText(nick
);
74 dialog
->nameEdit
->setText(name
);
78 SkypeDetails
&SkypeDetails::setPhones(const QString
&priv
, const QString
&mobile
, const QString
&work
) {
79 kDebug() << k_funcinfo
<< endl
;
80 dialog
->privatePhoneEdit
->setText(priv
);
81 dialog
->mobilePhoneEdit
->setText(mobile
);
82 dialog
->workPhoneEdit
->setText(work
);
86 SkypeDetails
&SkypeDetails::setHomepage(const QString
&homepage
) {
87 kDebug() << k_funcinfo
<< endl
;
88 dialog
->homepageEdit
->setText(homepage
);
92 SkypeDetails
&SkypeDetails::setAuthor(int author
, SkypeAccount
*account
) {
93 kDebug() << k_funcinfo
<< endl
;
94 dialog
->authorCombo
->setCurrentIndex(author
);
95 this->account
= account
;
99 SkypeDetails
&SkypeDetails::setSex(const QString
&sex
) {
100 kDebug() << k_funcinfo
<< endl
;
101 dialog
->sexEdit
->setText(sex
);
105 #include "skypedetails.moc"