add more spacing
[personal-kdebase.git] / workspace / khotkeys / kcm_hotkeys / actions / command_url_action_widget.cpp
blob6075ba34109f10d4ab944372441bb0d05feb91f5
1 /* Copyright (C) 2008 Michael Jansen <kde@michael-jansen.biz>
3 This library is free software; you can redistribute it and/or
4 modify it under the terms of the GNU Library General Public
5 License as published by the Free Software Foundation; either
6 version 2 of the License, or (at your option) any later version.
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 Boston, MA 02110-1301, USA.
19 #include "command_url_action_widget.h"
21 #include <KDE/KLineEdit>
24 CommandUrlActionWidget::CommandUrlActionWidget(
25 KHotKeys::CommandUrlAction *action,
26 QWidget *parent )
27 : Base( action, parent )
29 ui.setupUi(this);
31 connect(
32 ui.command, SIGNAL(textChanged(QString)),
33 _changedSignals, SLOT(map()) );
34 _changedSignals->setMapping(ui.command, "command" );
38 CommandUrlActionWidget::~CommandUrlActionWidget()
43 KHotKeys::CommandUrlAction *CommandUrlActionWidget::action()
45 return static_cast<KHotKeys::CommandUrlAction*>(_action);
49 const KHotKeys::CommandUrlAction *CommandUrlActionWidget::action() const
51 return static_cast<const KHotKeys::CommandUrlAction*>(_action);
55 void CommandUrlActionWidget::doCopyFromObject()
57 Q_ASSERT(action());
58 ui.command->lineEdit()->setText( action()->command_url() );
62 void CommandUrlActionWidget::doCopyToObject()
64 Q_ASSERT(action());
65 action()->set_command_url( ui.command->lineEdit()->text() );
69 bool CommandUrlActionWidget::isChanged() const
71 Q_ASSERT(action());
72 return action()->command_url() != ui.command->lineEdit()->text();
76 #include "moc_command_url_action_widget.cpp"