• 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
boxeswidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2009-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 #ifndef PRACTICE_BOXESWIDGET_H
15 #define PRACTICE_BOXESWIDGET_H
16 
17 #include "imagewidget.h"
18 
19 namespace Practice
20 {
21 
22 class ThemedBackgroundRenderer;
23 
24 class BoxesWidget : public ImageWidget
25 {
26  Q_OBJECT
27 
28 public:
29  BoxesWidget(QWidget* parent = 0);
30  virtual QSize minimumSizeHint() const;
31 
32  void setRenderer(ThemedBackgroundRenderer *renderer);
33  void setBoxCount(int boxCount);
34  void setBoxes(int currentBox, int lastBox = -1);
35 
36  void updatePixmap();
37 
38 protected:
39  bool event(QEvent *e);
40 
41 private:
42  void drawElement(QPainter *p, const QString& id);
43 
44  int m_boxCount;
45  int m_currentBox;
46  int m_lastBox;
47 
48  ThemedBackgroundRenderer *m_renderer;
49 
50  QPixmap m_box;
51  QPixmap m_activeBox;
52 
53  QPixmap m_arrowBegin;
54  QPixmap m_arrowCenter;
55  QPixmap m_arrowEnd;
56 
57  QRect m_rect;
58  bool m_fixedSize;
59 
60  int m_arrowHint;
61  int m_spacingHint;
62 };
63 
64 }
65 
66 #endif // PRACTICE_BOXESWIDGET_H
QEvent
QWidget
Practice::BoxesWidget::minimumSizeHint
virtual QSize minimumSizeHint() const
Definition: boxeswidget.cpp:62
Practice::BoxesWidget::updatePixmap
void updatePixmap()
Definition: boxeswidget.cpp:70
Practice::BoxesWidget
Definition: boxeswidget.h:24
Practice::BoxesWidget::setBoxCount
void setBoxCount(int boxCount)
Definition: boxeswidget.cpp:47
QRect
QPainter
QString
QPixmap
Practice::BoxesWidget::BoxesWidget
BoxesWidget(QWidget *parent=0)
Definition: boxeswidget.cpp:27
QSize
Practice::ThemedBackgroundRenderer
Definition: themedbackgroundrenderer.h:31
Practice::BoxesWidget::event
bool event(QEvent *e)
Definition: boxeswidget.cpp:96
imagewidget.h
Practice::ImageWidget
Definition: imagewidget.h:24
Practice::BoxesWidget::setRenderer
void setRenderer(ThemedBackgroundRenderer *renderer)
Definition: boxeswidget.cpp:35
QObject::parent
QObject * parent() const
Practice::BoxesWidget::setBoxes
void setBoxes(int currentBox, int lastBox=-1)
Definition: boxeswidget.cpp:53
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