KHTML
Go to the documentation of this file.
27 #include <QtGui/QBoxLayout>
28 #include <QtGui/QKeyEvent>
33 m_permanentBarWidget( 0 )
35 const QBoxLayout::Direction direction = ( position ==
Top ? QBoxLayout::TopToBottom : QBoxLayout::BottomToTop );
37 setLayout(
new QBoxLayout( direction,
this ) );
38 layout()->setContentsMargins( 0, 0, 0, 0 );
39 layout()->setSpacing( 0 );
44 if (hasWidget(newBarWidget)) {
45 kDebug(6050) <<
"this bar widget is already added";
50 layout()->addWidget( newBarWidget );
53 kDebug(6050) <<
"add barwidget " << newBarWidget;
59 if (m_permanentBarWidget) {
60 m_permanentBarWidget->hide();
61 layout()->removeWidget(m_permanentBarWidget);
64 layout()->addWidget(barWidget );
65 m_permanentBarWidget = barWidget;
66 m_permanentBarWidget->show();
68 setViewBarVisible(
true);
73 if (m_permanentBarWidget != barWidget) {
74 kDebug(6050) <<
"no such permanent widget exists in bar";
78 if (!m_permanentBarWidget)
81 m_permanentBarWidget->hide();
82 layout()->removeWidget(m_permanentBarWidget);
83 m_permanentBarWidget = 0;
88 return (m_permanentBarWidget == barWidget);
99 if (!m_permanentBarWidget) {
100 setViewBarVisible(
true);
107 return layout()->count() != 0;
116 if (!m_permanentBarWidget) {
117 setViewBarVisible(
false);
121 kDebug(6050)<<
"hide barwidget";
124 void KHTMLViewBar::setViewBarVisible (
bool visible)
126 setVisible( visible );
131 if (event->key() == Qt::Key_Escape) {
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 11:51:04 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.