1
// oscarlistnonservercontacts.cpp
3
// Copyright (C) 2005 Matt Rogers <mattr@kde.org>
5
// This program is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU General Public License
7
// as published by the Free Software Foundation; either version 2
8
// of the License, or (at your option) any later version.
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
#include "oscarlistnonservercontacts.h"
22
#include "ui_oscarlistcontactsbase.h"
23
#include <qstringlist.h>
24
#include <qcheckbox.h>
27
OscarListNonServerContacts::OscarListNonServerContacts(QWidget* parent)
30
setCaption( i18n( "Add Contacts to Server List" ) );
31
setButtons( KDialog::Yes | KDialog::Cancel | KDialog::No );
33
QWidget* w = new QWidget( this );
34
m_contactsList = new Ui::OscarListContactsBase;
35
m_contactsList->setupUi( w );
38
setButtonText( Yes, i18n( "&Add" ) );
39
setButtonText( Cancel, i18n( "Do &Not Add" ) );
40
setButtonText( No, i18n( "&Delete" ) );
43
OscarListNonServerContacts::~OscarListNonServerContacts()
45
delete m_contactsList;
48
void OscarListNonServerContacts::addContacts( const QStringList& contactList )
50
m_nonServerContacts = contactList;
51
m_contactsList->notServerContacts->addItems( contactList );
54
QStringList OscarListNonServerContacts::nonServerContactList() const
56
return m_nonServerContacts;
59
bool OscarListNonServerContacts::onlyShowOnce()
61
return m_contactsList->doNotShowAgain->isChecked();
65
void OscarListNonServerContacts::slotButtonClicked( int buttonCode )
67
KDialog::slotButtonClicked(buttonCode);
69
if( buttonCode == KDialog::Cancel ||
70
buttonCode == KDialog::Yes ||
71
buttonCode == KDialog::No )
75
#include "oscarlistnonservercontacts.moc"