Kstars

pvplotwidget.h
1 /*
2  SPDX-FileCopyrightText: 2005 Jason Harris <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "kplotwidget.h"
10 
11 class PlanetViewer;
12 
13 class PVPlotWidget : public KPlotWidget
14 {
15  Q_OBJECT
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 };
Q_OBJECTQ_OBJECT
virtual void wheelEvent(QWheelEvent *event)
Display an overhead view of the solar system.
Definition: planetviewer.h:37
virtual void mouseReleaseEvent(QMouseEvent *event)
virtual void mouseDoubleClickEvent(QMouseEvent *event)
virtual void keyPressEvent(QKeyEvent *event)
virtual void mouseMoveEvent(QMouseEvent *event)
virtual void mousePressEvent(QMouseEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 04:00:02 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.