Kstars

pvplotwidget.h
1/*
2 SPDX-FileCopyrightText: 2005 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kplotwidget.h"
10
11class PlanetViewer;
12
13class PVPlotWidget : public KPlotWidget
14{
16 public:
17 explicit PVPlotWidget(QWidget *parent = nullptr);
18
19 public slots:
20 void slotZoomIn();
21 void slotZoomOut();
22
23 signals:
24 void doubleClicked(double, double);
25
26 protected:
27 void keyPressEvent(QKeyEvent *e) override;
28 void mousePressEvent(QMouseEvent *e) override;
29 void mouseMoveEvent(QMouseEvent *e) override;
30 void mouseReleaseEvent(QMouseEvent *) override;
31 void mouseDoubleClickEvent(QMouseEvent *e) override;
32 void wheelEvent(QWheelEvent *e) override;
33
34 private:
35 void updateFactor(const int modifier);
36
37 bool mouseButtonDown { false };
38 int oldx { 0 };
39 int oldy { 0 };
40 double factor { 2 };
41 PlanetViewer *pv { nullptr };
42};
Display an overhead view of the solar system.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.