kplato

kptaccountsdialog.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2005 Dag Andersen <danders@get2net.dk>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation;
7 version 2 of the License.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include "kptaccountsdialog.h"
21
22#include "kptaccountspanel.h"
23
24#include <tdelocale.h>
25
26namespace KPlato
27{
28
29AccountsDialog::AccountsDialog(Accounts &acc, TQWidget *p, const char *n)
30 : KDialogBase(Swallow, i18n("Edit Accounts"), Ok|Cancel, Ok, p, n, true, true)
31{
32 m_panel = new AccountsPanel(acc, this);
33 setMainWidget(m_panel);
34
35 enableButtonOK(false);
36 connect(m_panel, TQ_SIGNAL(changed(bool)), TQ_SLOT(enableButtonOK(bool)));
37}
38
39KCommand *AccountsDialog::buildCommand(Part *part) {
40 return m_panel->buildCommand(part);
41}
42
43void AccountsDialog::slotOk() {
44 m_panel->slotOk();
45 accept();
46}
47
48} //namespace KPlato
49
50#include "kptaccountsdialog.moc"