1 /* This file is part of the KDE project
2 * Copyright (C) 2007 Martin Pfeiffer <hubipete@gmx.net>
3 * Copyright (C) 2007 Jan Hambrecht <jaham@gmx.net>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21 #include "DefaultToolArrangeWidget.h"
22
23 #include <KoInteractionTool.h>
24 #include <QAction>
25
DefaultToolArrangeWidget(KoInteractionTool * tool,QWidget * parent)26 DefaultToolArrangeWidget::DefaultToolArrangeWidget( KoInteractionTool* tool,
27 QWidget* parent ) : QWidget( parent )
28 {
29 m_tool = tool;
30
31 setupUi( this );
32
33 bringToFront->setDefaultAction( m_tool->action( "object_order_front" ) );
34 raiseLevel->setDefaultAction( m_tool->action( "object_order_raise" ) );
35 lowerLevel->setDefaultAction( m_tool->action( "object_order_lower" ) );
36 sendBack->setDefaultAction( m_tool->action( "object_order_back" ) );
37
38 leftAlign->setDefaultAction( m_tool->action( "object_align_horizontal_left" ) );
39 hCenterAlign->setDefaultAction( m_tool->action( "object_align_horizontal_center" ) );
40 rightAlign->setDefaultAction( m_tool->action( "object_align_horizontal_right" ) );
41 topAlign->setDefaultAction( m_tool->action( "object_align_vertical_top" ) );
42 vCenterAlign->setDefaultAction( m_tool->action( "object_align_vertical_center" ) );
43 bottomAlign->setDefaultAction( m_tool->action( "object_align_vertical_bottom" ) );
44
45 group->setDefaultAction( m_tool->action( "object_group" ) );
46 ungroup->setDefaultAction( m_tool->action( "object_ungroup" ) );
47 }
48