kdeui Library API Documentation

KPopupTitle Class Reference

Title widget for use in KPopupMenu. KPopupMenu title widget. More...

#include <kpopupmenu.h>

Inheritance diagram for KPopupTitle:

QWidget List of all members.

Public Slots

void setText (const QString &text)
void setIcon (const QPixmap &pix)

Public Methods

 KPopupTitle (QWidget *parent=0, const char *name=0)
 KPopupTitle (KPixmapEffect::GradientType gradient, const QColor &color, const QColor &textColor, QWidget *parent=0, const char *name=0) KDE_DEPRECATED
 KPopupTitle (const KPixmap &background, const QColor &color, const QColor &textColor, QWidget *parent=0, const char *name=0) KDE_DEPRECATED
void setTitle (const QString &text, const QPixmap *icon=NULL)
QString title () const
QPixmap icon () const
QSize sizeHint () const

Protected Methods

void paintEvent (QPaintEvent *ev)

Detailed Description

Title widget for use in KPopupMenu. KPopupMenu title widget.

You usually don't have to create this manually since KPopupMenu::insertTitle will do it for you, but it is allowed if you wish to customize it's look.

Author:
Daniel M. Duley <mosfet@kde.org>

Definition at line 38 of file kpopupmenu.h.


Constructor & Destructor Documentation

KPopupTitle::KPopupTitle QWidget   parent = 0,
const char *    name = 0
 

Constructs a title widget with the user specified gradient, pixmap, and colors.

Definition at line 30 of file kpopupmenu.cpp.

References QWidget::fontMetrics(), QWidget::height(), and QWidget::setMinimumSize().

KPopupTitle::KPopupTitle KPixmapEffect::GradientType    gradient,
const QColor   color,
const QColor   textColor,
QWidget   parent = 0,
const char *    name = 0
 

Deprecated:
Constructs a title widget with the specified gradient and colors.

Definition at line 36 of file kpopupmenu.cpp.

KPopupTitle::KPopupTitle const KPixmap   background,
const QColor   color,
const QColor   textColor,
QWidget   parent = 0,
const char *    name = 0
 

Deprecated:
Constructs a title widget with the specified pixmap and colors.

Definition at line 44 of file kpopupmenu.cpp.


Member Function Documentation

void KPopupTitle::setTitle const QString   text,
const QPixmap   icon = NULL
 

Sets the title string and optional icon for the title widget.

You will want to call this before inserting into a menu.

Definition at line 52 of file kpopupmenu.cpp.

References QPixmap::resize().

Referenced by KPopupMenu::insertTitle(), and KPopupMenu::setTitle().

QString KPopupTitle::title   const [inline]
 

Returns the current title.

Definition at line 71 of file kpopupmenu.h.

QPixmap KPopupTitle::icon   const [inline]
 

Returns the current icon.

Definition at line 75 of file kpopupmenu.h.

void KPopupTitle::setText const QString   text [slot]
 

Since:
3.1

Definition at line 63 of file kpopupmenu.cpp.

void KPopupTitle::setIcon const QPixmap   pix [slot]
 

Since:
3.1

Reimplemented from QWidget.

Definition at line 69 of file kpopupmenu.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Feb 4 12:34:27 2004 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2003