An expandable container with a QComboBox-style API.
More...
#include <kexpandablegroupbox.h>
List of all members.
Detailed Description
An expandable container with a QComboBox-style API.
A KExpandableGroupBox provides a title label with space that you can store arbitrary widgets in, very much like a group box. However, unlike a group box, the contents is hidden by default and can be expanded by a click on the title or the folding indicator (+/-).
This class should be used within a QScrollArea, because the widget takes up more screen estate when unfolded and might otherwise enlarge your dialog beyond the physical screen size.
Example code:
- Author:
- Daniel Molkentin <molkentin@kde.org>
Constructor & Destructor Documentation
KExpandableGroupBox::KExpandableGroupBox |
( |
QWidget * |
parent = 0 |
) |
[explicit] |
Default constructor.
- Parameters:
-
| parent | is the parent widget |
Use setTitle() and setWidget() to set the respective properties.
KExpandableGroupBox::KExpandableGroupBox |
( |
const QString & |
title, |
|
|
QWidget * |
parent = 0 | |
|
) |
| | [explicit] |
Convinience constructor.
- Parameters:
-
| title | is the title of the collaspsible widget |
| parent | is the widget parent widget |
Use setWidget() to set the widgets contents.
KExpandableGroupBox::~KExpandableGroupBox |
( |
|
) |
|
Member Function Documentation
Qt::Alignment KExpandableGroupBox::alignment |
( |
|
) |
const |
bool KExpandableGroupBox::animateExpansion |
( |
|
) |
const |
- Returns:
- wether or not the expansion of widget() should be animated. The default is true except on embedded platforms.
- See also:
- setAnimateExpansion()
bool KExpandableGroupBox::isExpanded |
( |
|
) |
const |
QSize KExpandableGroupBox::minimumSizeHint |
( |
|
) |
const |
void KExpandableGroupBox::mouseReleaseEvent |
( |
QMouseEvent * |
ev |
) |
[protected] |
void KExpandableGroupBox::paintEvent |
( |
QPaintEvent * |
ev |
) |
[protected] |
Reimplemented from QWidget.
{
#if 0
QPainter p(this);
QStyleOption opt;
int h = 16;
opt.rect = QRect(0, 0, h, h);
opt.palette = palette();
opt.state = QStyle::State_Children;
if (d->colButton->isChecked())
opt.state |= QStyle::State_Open;
style()->drawPrimitive(QStyle::PE_IndicatorBranch, &opt, &p);
p.drawText(h, 0, width(), height(), Qt::TextShowMnemonic, d->title);
p.end();
#endif
QWidget::paintEvent(ev);
}
void KExpandableGroupBox::setAlignment |
( |
Qt::Alignment |
a |
) |
|
Sets the alignment of the title label.
- See also:
- alignment()
{
d->label->setAlignment(a);
}
void KExpandableGroupBox::setAnimateExpansion |
( |
bool |
animate |
) |
|
void KExpandableGroupBox::setExpanded |
( |
bool |
expanded |
) |
[slot] |
void KExpandableGroupBox::setTitle |
( |
const QString & |
title |
) |
[slot] |
void KExpandableGroupBox::setWidget |
( |
QWidget * |
w |
) |
|
QString KExpandableGroupBox::title |
( |
|
) |
const |
- Returns:
- the widgets title
QWidget * KExpandableGroupBox::widget |
( |
|
) |
const |
Property Documentation
Qt::Alignment KExpandableGroupBox::alignment [read, write] |
bool KExpandableGroupBox::animateExpansion [read, write] |
bool KExpandableGroupBox::expanded [read, write] |
QString KExpandableGroupBox::title [read, write] |
The documentation for this class was generated from the following files: