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

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • practice
statustogglebutton.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2010 Daniel Laidig <laidig@kde.org>
3  ***************************************************************************/
4 
5 /***************************************************************************
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  ***************************************************************************/
13 
14 #ifndef PRACTICE_STATUSTOGGLEBUTTON_H
15 #define PRACTICE_STATUSTOGGLEBUTTON_H
16 
17 #include "imagewidget.h"
18 #include <kdebug.h> //TODO
19 
20 namespace Practice
21 {
22 
23 class StatusToggleButton : public ImageWidget
24 {
25  Q_OBJECT
26 
27 public:
28  StatusToggleButton(QWidget* parent = 0) : ImageWidget(parent), m_current(0) {
29  setMouseTracking(true);
30  }
31 
32  void setPixmaps(QPixmap defaultPixmap, QPixmap hoverPixmap, QPixmap pressedPixmap);
33 
34 protected:
35  void mousePressEvent(QMouseEvent *e);
36  void mouseReleaseEvent(QMouseEvent *e);
37  void enterEvent(QEvent *);
38  void leaveEvent(QEvent *);
39 
40 signals:
41  void clicked();
42 
43 private:
44  QPixmap m_defaultPixmap;
45  QPixmap m_hoverPixmap;
46  QPixmap m_pressedPixmap;
47  int m_current;
48 };
49 }
50 #endif // PRACTICE_STATUSTOGGLEBUTTON_H
QEvent
QWidget
QMouseEvent
Practice::StatusToggleButton::leaveEvent
void leaveEvent(QEvent *)
Definition: statustogglebutton.cpp:59
Practice::StatusToggleButton::enterEvent
void enterEvent(QEvent *)
Definition: statustogglebutton.cpp:53
Practice::StatusToggleButton::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *e)
Definition: statustogglebutton.cpp:40
Practice::StatusToggleButton
Definition: statustogglebutton.h:23
Practice::StatusToggleButton::clicked
void clicked()
QPixmap
Practice::StatusToggleButton::StatusToggleButton
StatusToggleButton(QWidget *parent=0)
Definition: statustogglebutton.h:28
imagewidget.h
Practice::StatusToggleButton::mousePressEvent
void mousePressEvent(QMouseEvent *e)
Definition: statustogglebutton.cpp:32
QWidget::setMouseTracking
void setMouseTracking(bool enable)
Practice::ImageWidget
Definition: imagewidget.h:24
QObject::parent
QObject * parent() const
Practice::StatusToggleButton::setPixmaps
void setPixmaps(QPixmap defaultPixmap, QPixmap hoverPixmap, QPixmap pressedPixmap)
Definition: statustogglebutton.cpp:20
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

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