• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

kgoldrunner

  • sources
  • kde-4.14
  • kdegames
  • kgoldrunner
  • src
kgrview.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright 2012 Roney Gomes <roney477@gmail.com> *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 2 of *
7  * the License, or (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
16  ****************************************************************************/
17 
18 #ifndef KGRVIEW_H
19 #define KGRVIEW_H
20 
21 #include <QMouseEvent>
22 #include <QResizeEvent>
23 #include <QGraphicsView>
24 
25 class KGrScene;
26 
27 class KGrView : public QGraphicsView
28 {
29  Q_OBJECT
30 public:
31  KGrView (QWidget * parent);
32  ~KGrView ();
33 
34  /*
35  * Get a pointer to the game scene.
36  */
37  KGrScene * gameScene () const { return m_scene; }
38 
39 signals:
40  void mouseClick (int);
41  void mouseLetGo (int);
42 
43 protected:
44  virtual void resizeEvent (QResizeEvent *);
45  virtual void mousePressEvent (QMouseEvent * mouseEvent);
46  virtual void mouseDoubleClickEvent (QMouseEvent * mouseEvent);
47  virtual void mouseReleaseEvent (QMouseEvent * mouseEvent);
48 
49 private:
50  KGrScene * m_scene;
51 };
52 
53 #endif // KGRVIEW_H
KGrView::mouseLetGo
void mouseLetGo(int)
QResizeEvent
QWidget
KGrView::gameScene
KGrScene * gameScene() const
Definition: kgrview.h:37
QMouseEvent
KGrView::mouseDoubleClickEvent
virtual void mouseDoubleClickEvent(QMouseEvent *mouseEvent)
Definition: kgrview.cpp:50
KGrView::mousePressEvent
virtual void mousePressEvent(QMouseEvent *mouseEvent)
Definition: kgrview.cpp:45
KGrView::KGrView
KGrView(QWidget *parent)
Definition: kgrview.cpp:25
KGrView::~KGrView
~KGrView()
Definition: kgrview.cpp:33
KGrView::mouseReleaseEvent
virtual void mouseReleaseEvent(QMouseEvent *mouseEvent)
Definition: kgrview.cpp:55
KGrView::mouseClick
void mouseClick(int)
KGrView
Definition: kgrview.h:27
KGrView::resizeEvent
virtual void resizeEvent(QResizeEvent *)
Definition: kgrview.cpp:37
KGrScene
The QGraphicsScene that represents KGoldrunner on the screen.
Definition: kgrscene.h:75
QObject::parent
QObject * parent() const
QGraphicsView
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kgoldrunner

Skip menu "kgoldrunner"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal