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 *************************************************************************
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. *
14 *************************************************************************
17 #include "testbededitaccountwidget.h"
20 #include <qlineedit.h>
22 #include <QVBoxLayout>
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 );
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()
49 if ( m_preferencesWidget
->m_acctName
->text().isEmpty() )
50 accountName
= "Testbed Account";
52 accountName
= m_preferencesWidget
->m_acctName
->text();
55 // FIXME: ? account()->setAccountLabel(accountName);
56 account()->myself()->setProperty( Kopete::Global::Properties::self()->nickName(), accountName
);
58 setAccount( new TestbedAccount( TestbedProtocol::protocol(), accountName
) );
63 bool TestbedEditAccountWidget::validateData()
65 //return !( m_preferencesWidget->m_acctName->text().isEmpty() );
69 #include "testbededitaccountwidget.moc"