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

kalarm/lib

  • sources
  • kde-4.12
  • kdepim
  • kalarm
  • lib
label.h
Go to the documentation of this file.
1 /*
2  * label.h - label with radiobutton buddy option
3  * Program: kalarm
4  * Copyright © 2004-2006 by David Jarvie <djarvie@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef LABEL_H
22 #define LABEL_H
23 
24 #include <QLabel>
25 class QFocusEvent;
26 class QRadioButton;
27 class LabelFocusWidget;
28 
42 class Label : public QLabel
43 {
44  Q_OBJECT
45  friend class LabelFocusWidget;
46 
47  public:
52  explicit Label(QWidget* parent, Qt::WindowFlags f = 0);
58  Label(const QString& text, QWidget* parent, Qt::WindowFlags f = 0);
68  Label(QWidget* buddy, const QString& text, QWidget* parent, Qt::WindowFlags f = 0);
73  virtual void setBuddy(QWidget* buddy);
74 
75  private slots:
76  void buddyDead();
77 
78  private:
79  void activated();
80  QRadioButton* mRadioButton; // buddy widget if it's a radio button, else 0
81  LabelFocusWidget* mFocusWidget;
82 };
83 
84 
85 // Private class for use by Label
86 class LabelFocusWidget : public QWidget
87 {
88  Q_OBJECT
89  public:
90  explicit LabelFocusWidget(QWidget* parent);
91 
92  protected:
93  virtual void focusInEvent(QFocusEvent*);
94 };
95 
96 #endif // LABEL_H
97 
98 // vim: et sw=4:
Label::setBuddy
virtual void setBuddy(QWidget *buddy)
Sets the label's buddy widget which receives the keyboard focus when the label's accelerator key is p...
Definition: label.cpp:52
text
virtual QByteArray text(quint32 serialNumber) const =0
QWidget
Label::Label
Label(QWidget *parent, Qt::WindowFlags f=0)
Constructs an empty label.
Definition: label.cpp:26
QRadioButton
LabelFocusWidget
Definition: label.h:86
Label
A QLabel with option for a buddy radio button.
Definition: label.h:42
QLabel
LabelFocusWidget::LabelFocusWidget
LabelFocusWidget(QWidget *parent)
Definition: label.cpp:108
LabelFocusWidget::focusInEvent
virtual void focusInEvent(QFocusEvent *)
Definition: label.cpp:115
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm/lib

Skip menu "kalarm/lib"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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