Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / protocols / sms / smsaddcontactpage.cpp
blobae07307ecc910bf6f5397ac6c8a43cf0e5503787
1 /*
2 smsaddcontactpage.cpp - SMS Plugin
4 Copyright (c) 2003 by Richard Lärkäng <nouseforaname@home.se>
6 *************************************************************************
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 *************************************************************************
16 #include "smsadd.h"
17 #include "smsaddcontactpage.h"
18 #include "kopeteaccount.h"
20 #include <qlayout.h>
21 #include <qlineedit.h>
25 SMSAddContactPage::SMSAddContactPage(QWidget *parent)
26 : AddContactPage(parent)
28 QVBoxLayout* layout = new QVBoxLayout( this );
29 smsdata = new smsAddUI(this);
30 layout->addWidget( smsdata );
31 smsdata->addNr->setFocus();
34 SMSAddContactPage::~SMSAddContactPage()
39 bool SMSAddContactPage::apply(Kopete::Account* a, Kopete::MetaContact* m)
41 if ( validateData() )
43 QString nr = smsdata->addNr->text();
44 QString name = smsdata->addName->text();
46 return a->addContact( nr, m, Kopete::Account::ChangeKABC );
49 return false;
53 bool SMSAddContactPage::validateData()
55 return true;
58 #include "smsaddcontactpage.moc"
60 * Local variables:
61 * c-indentation-style: k&r
62 * c-basic-offset: 8
63 * indent-tabs-mode: t
64 * End:
66 // vim: set noet ts=4 sts=4 sw=4: