Go to the documentation of this file.
25#include <QtGui/QKeyEvent>
26#include <QtGui/QPainter>
27#include <QtGui/QStyleOption>
43 QSize size = KUrlNavigatorButtonBase::sizeHint();
44 size.setWidth(size.height() / 2);
52 QPainter painter(
this);
58 option.initFrom(
this);
59 option.rect = QRect(0, 0, width(), height());
60 option.palette = palette();
61 option.palette.setColor(QPalette::Text, fgColor);
62 option.palette.setColor(QPalette::WindowText, fgColor);
63 option.palette.setColor(QPalette::ButtonText, fgColor);
65 if (layoutDirection() == Qt::LeftToRight) {
66 style()->drawPrimitive(QStyle::PE_IndicatorArrowRight, &option, &painter,
this);
68 style()->drawPrimitive(QStyle::PE_IndicatorArrowLeft, &option, &painter,
this);
74 switch (event->key()) {
81 KUrlNavigatorButtonBase::keyPressEvent(event);
87#include "kurlnavigatordropdownbutton_p.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Jul 18 2024 00:00:00 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.