make webinterface translatable. there are around 20 short strings, all with context...
[kdenetwork.git] / kopete / protocols / sms / smsuserpreferences.cpp
blobb60145b2291191778c1274f963f605625dc7891b
1 /* *************************************************************************
2 * copyright: (C) 2003 Richard Lärkäng <nouseforaname@home.se> *
3 * copyright: (C) 2003 Gav Wood <gav@kde.org> *
4 *************************************************************************
5 */
7 /* *************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 *************************************************************************
17 #include <qlabel.h>
19 #include <klocale.h>
20 #include <klineedit.h>
22 #include "smsuserpreferences.h"
23 #include "smsuserprefs.h"
24 #include "smscontact.h"
26 SMSUserPreferences::SMSUserPreferences( SMSContact* contact )
27 : KDialog( 0L)
29 m_contact = contact;
30 setCaption(i18n("User Preferences"));
31 setButtons(Ok|Cancel);
32 setDefaultButton(Ok);
33 setModal(true);
34 showButtonSeparator(true);
35 topWidget = new KVBox(this);
36 setMainWidget(topWidget);
37 userPrefs = new SMSUserPrefsUI( topWidget );
39 userPrefs->telNumber->setText(m_contact->phoneNumber());
40 userPrefs->title->setText(m_contact->nickName());
41 connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
42 connect(this,SIGNAL(cancelClicked()),this,SLOT(slotCancel()));
45 SMSUserPreferences::~SMSUserPreferences()
50 void SMSUserPreferences::slotOk()
52 if (userPrefs->telNumber->text() != m_contact->phoneNumber())
53 m_contact->setPhoneNumber(userPrefs->telNumber->text());
54 slotCancel();
57 void SMSUserPreferences::slotCancel()
59 deleteLater();
62 #include "smsuserpreferences.moc"
64 * Local variables:
65 * c-indentation-style: k&r
66 * c-basic-offset: 8
67 * indent-tabs-mode: t
68 * End:
70 // vim: set noet ts=4 sts=4 sw=4: