Krita Source Code Documentation
Loading...
Searching...
No Matches
KoZoomToolWidget.cpp
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2008 Martin Pfeiffer <hubipete@gmx.net>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#include "KoZoomToolWidget.h"
8#include <QPainter>
9#include <QMouseEvent>
10#include <KoIcon.h>
11#include "KoZoomTool.h"
12
14 : QWidget(parent)
15 , m_tool(tool)
16{
17 setupUi(this);
18
19 zoomInButton->setIcon(koIcon("zoom-in"));
20 zoomInButton->setIconSize(QSize(22, 22));
21 zoomOutButton->setIcon(koIcon("zoom-out"));
22 zoomOutButton->setIconSize(QSize(22, 22));
23
24 connect(zoomInButton, SIGNAL(toggled(bool)), this, SLOT(changeZoomMode()));
25 connect(zoomOutButton, SIGNAL(toggled(bool)), this, SLOT(changeZoomMode()));
26
27 zoomInButton->click();
28}
29
33
35{
36 m_tool->setZoomInMode(zoomInButton->isChecked());
37}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KoZoomTool * m_tool
~KoZoomToolWidget() override
KoZoomToolWidget(KoZoomTool *tool, QWidget *parent=0)
void setZoomInMode(bool zoomIn)
#define koIcon(name)
Use these macros for icons without any issues.
Definition kis_icon.h:25