• 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
summarybarwidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2010 Daniel Laidig <d.laidig@gmx.de>
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 
15 #ifndef SUMMARYBARWIDGET_H
16 #define SUMMARYBARWIDGET_H
17 
18 #include <QtGui/QWidget>
19 
20 class QLabel;
21 class QHBoxLayout;
22 
23 namespace Practice
24 {
25 
26 class SummaryBarWidget : public QWidget
27 {
28  Q_OBJECT
29 
30 public:
31  SummaryBarWidget(QWidget *parent = 0);
32 
33  void setStatistics(int correct, int wrong, int notAnswered);
34 
35 protected:
36  void paintEvent(QPaintEvent *event);
37  bool event(QEvent *event);
38 
39 private:
40  void setupCaption();
41  QString correctText();
42  QString wrongText();
43  QString notAnsweredText();
44 
45  QPixmap captionPixmap(QColor color);
46 
47  int m_correct;
48  int m_wrong;
49  int m_notAnswered;
50  int m_total;
51 
52  QHBoxLayout *m_layout;
53  QLabel *m_correctCaption;
54  QLabel *m_wrongCaption;
55  QLabel *m_notAnsweredCaption;
56 
57  static const int BAR_HEIGHT = 30;
58 };
59 
60 }
61 
62 #endif // SUMMARYBARWIDGET_H
QEvent
QWidget
QHBoxLayout
Practice::SummaryBarWidget::setStatistics
void setStatistics(int correct, int wrong, int notAnswered)
Definition: summarybarwidget.cpp:78
Practice::SummaryBarWidget::event
bool event(QEvent *event)
Definition: summarybarwidget.cpp:95
Practice::SummaryBarWidget
Definition: summarybarwidget.h:26
Practice::SummaryBarWidget::SummaryBarWidget
SummaryBarWidget(QWidget *parent=0)
Definition: summarybarwidget.cpp:27
QString
QColor
QPixmap
Practice::SummaryBarWidget::paintEvent
void paintEvent(QPaintEvent *event)
Definition: summarybarwidget.cpp:37
QPaintEvent
QLabel
QObject::parent
QObject * parent() const
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