1 /** @file signalaction.cpp
2 *
3 * @authors Copyright (c) 2013-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
4 *
5 * @par License
6 * LGPL: http://www.gnu.org/licenses/lgpl.html
7 *
8 * <small>This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or (at your
11 * option) any later version. This program is distributed in the hope that it
12 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
14 * General Public License for more details. You should have received a copy of
15 * the GNU Lesser General Public License along with this program; if not, see:
16 * http://www.gnu.org/licenses</small>
17 */
18
19 #include "de/SignalAction"
20
21 namespace de {
22
SignalAction(QObject * target,char const * slot)23 SignalAction::SignalAction(QObject *target, char const *slot)
24 : Action(), _target(target), _slot(slot)
25 {
26 connect(this, SIGNAL(triggered()), target, slot);
27 }
28
trigger()29 void SignalAction::trigger()
30 {
31 Action::trigger();
32 emit triggered();
33 }
34
35 } // namespace de
36