19 #include "dockviewbase.h"
20 #include "dockviewbase.moc"
30 class DockViewBasePrivate {
40 : TQVBox( parent, name ),
41 d ( new
Kate::DockViewBasePrivate )
43 init( TQString::null, TQString::null );
47 : TQVBox( parent, name ),
48 d ( new
Kate::DockViewBasePrivate )
50 init( prefix,
title );
53 Kate::DockViewBase::~DockViewBase()
60 d->lPrefix->setText( prefix );
66 return d->lPrefix->text();
71 d->lTitle->setText( title );
77 return d->lTitle->text();
82 setTitlePrefix( prefix );
86 void Kate::DockViewBase::init(
const TQString &prefix,
const TQString &title )
89 d->header =
new TQWidget(
this );
90 d->header->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed,
true ) );
91 TQHBoxLayout *lo =
new TQHBoxLayout( d->header );
93 lo->insertSpacing( 0, 6 );
94 d->lPrefix =
new TQLabel( title, d->header );
95 lo->addWidget( d->lPrefix );
96 d->lTitle =
new TQLabel( title, d->header );
97 lo->addWidget( d->lTitle );
98 lo->setStretchFactor( d->lTitle, 1 );
99 lo->insertSpacing( -1, 6 );
100 if ( prefix.isEmpty() ) d->lPrefix->hide();
101 if ( title.isEmpty() ) d->lTitle->hide();
TQString titlePrefix() const
void setTitle(const TQString &title)
Set the title to title.
DockViewBase(TQWidget *parent=0, const char *name=0)
Create a KateDockViewBase.
void setTitlePrefix(const TQString &prefix)
Set the title prefix to prefix.
Namespace collecting as much of the internal Kate classes as we can manage.