blob: b55f5e25c2a504fdec814b8ae98dd5723b851c24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* SPDX-FileCopyrightText: 2025 Gleb Kasachou <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef ZOOM_WIDGET_ACTION_H
#define ZOOM_WIDGET_ACTION_H
#include <KToolBarPopupAction>
/**
* This WidgetAction combines the three zoom actions into one line.
*
* This requires less space, logically groups these actions, and keeps the menu open when the user uses the buttons.
*/
class ZoomWidgetAction : public KToolBarPopupAction
{
public:
ZoomWidgetAction(QAction *zoomInAction, QAction *zoomResetAction, QAction *zoomOutAction, QObject *parent);
protected:
QWidget *createWidget(QWidget *parent) override;
bool eventFilter(QObject *object, QEvent *event) override;
private:
QAction *m_zoomInAction;
QAction *m_zoomResetAction;
QAction *m_zoomOutAction;
};
#endif
|