1 /* *************************************************************************
2 * copyright: (C) 2003 Richard Lärkäng <nouseforaname@home.se> *
3 * copyright: (C) 2003 Gav Wood <gav@kde.org> *
4 *************************************************************************
7 /* *************************************************************************
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. *
14 *************************************************************************
20 #include <klineedit.h>
22 #include "smsuserpreferences.h"
23 #include "smsuserprefs.h"
24 #include "smscontact.h"
26 SMSUserPreferences::SMSUserPreferences( SMSContact
* contact
)
30 setCaption(i18n("User Preferences"));
31 setButtons(Ok
|Cancel
);
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());
57 void SMSUserPreferences::slotCancel()
62 #include "smsuserpreferences.moc"
65 * c-indentation-style: k&r
70 // vim: set noet ts=4 sts=4 sw=4: