implement update interval of list; can be disabled / changed by user
[kdenetwork.git] / kopete / protocols / testbed / testbededitaccountwidget.cpp
bloba61a454e8bef86f351e66c7a7fdccfc94c82bb3e
1 /*
2 testbededitaccountwidget.h - Kopete Testbed Protocol
4 Copyright (c) 2003 by Will Stephenson <will@stevello.free-online.co.uk>
5 Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
7 *************************************************************************
8 * *
9 * This library is free software; you can redistribute it and/or *
10 * modify it under the terms of the GNU General Public *
11 * License as published by the Free Software Foundation; either *
12 * version 2 of the License, or (at your option) any later version. *
13 * *
14 *************************************************************************
17 #include "testbededitaccountwidget.h"
19 #include <qlayout.h>
20 #include <qlineedit.h>
21 //Added by qt3to4:
22 #include <QVBoxLayout>
23 #include <kdebug.h>
24 #include "kopeteaccount.h"
25 #include "kopetecontact.h"
26 #include "ui_testbedaccountpreferences.h"
27 #include "testbedaccount.h"
28 #include "testbedprotocol.h"
30 TestbedEditAccountWidget::TestbedEditAccountWidget( QWidget* parent, Kopete::Account* account)
31 : QWidget( parent ), KopeteEditAccountWidget( account )
33 QVBoxLayout *layout = new QVBoxLayout( this );
34 kDebug(14210) ;
35 QWidget *widget = new QWidget( this );
36 m_preferencesWidget = new Ui::TestbedAccountPreferences();
37 m_preferencesWidget->setupUi( widget );
38 layout->addWidget( widget );
41 TestbedEditAccountWidget::~TestbedEditAccountWidget()
43 delete m_preferencesWidget;
46 Kopete::Account* TestbedEditAccountWidget::apply()
48 QString accountName;
49 if ( m_preferencesWidget->m_acctName->text().isEmpty() )
50 accountName = "Testbed Account";
51 else
52 accountName = m_preferencesWidget->m_acctName->text();
54 if ( account() )
55 // FIXME: ? account()->setAccountLabel(accountName);
56 account()->myself()->setProperty( Kopete::Global::Properties::self()->nickName(), accountName );
57 else
58 setAccount( new TestbedAccount( TestbedProtocol::protocol(), accountName ) );
60 return account();
63 bool TestbedEditAccountWidget::validateData()
65 //return !( m_preferencesWidget->m_acctName->text().isEmpty() );
66 return true;
69 #include "testbededitaccountwidget.moc"