• 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
  • dashboard
buttondelegate.h
Go to the documentation of this file.
1 /***************************************************************************
2  Copyright 2008 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 BUTTONDELEGATE_H
15 #define BUTTONDELEGATE_H
16 
17 #include <QStyledItemDelegate>
18 
19 #include <QPoint>
20 
21 class Dashboard;
22 class QToolButton;
23 
24 class ButtonDelegate
25  : public QStyledItemDelegate
26 {
27  Q_OBJECT
28 public:
29  ButtonDelegate(QAbstractItemView *itemView, Dashboard *parent);
30 
31  virtual ~ButtonDelegate();
32 
33  void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
34 
35  QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
36 
37  QModelIndex hoveredIndex() const;
38 
39 public slots:
40  void slotEdit();
41  void slotPractice();
42 
43 private:
44  int m_rightMargin;
45  int m_buttonHeight;
46  Dashboard *m_dashboard;
47  QAbstractItemView *m_itemView;
48  QToolButton *m_editButton;
49 };
50 
51 #endif //BUTTONDELEGATE_H
QModelIndex
ButtonDelegate::~ButtonDelegate
virtual ~ButtonDelegate()
Definition: buttondelegate.cpp:43
ButtonDelegate
Definition: buttondelegate.h:24
QAbstractItemView
ButtonDelegate::slotPractice
void slotPractice()
Definition: buttondelegate.cpp:86
ButtonDelegate::ButtonDelegate
ButtonDelegate(QAbstractItemView *itemView, Dashboard *parent)
Definition: buttondelegate.cpp:28
ButtonDelegate::hoveredIndex
QModelIndex hoveredIndex() const
Definition: buttondelegate.cpp:93
QStyleOptionViewItem
ButtonDelegate::paint
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: buttondelegate.cpp:47
QPainter
QToolButton
QSize
Dashboard
Definition: dashboard.h:40
ButtonDelegate::sizeHint
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
Definition: buttondelegate.cpp:70
ButtonDelegate::slotEdit
void slotEdit()
Definition: buttondelegate.cpp:79
QObject::parent
QObject * parent() const
QStyledItemDelegate
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