22 #include <kstatusbar.h>
27 KStatusBarLabel::KStatusBarLabel(
const TQString& text,
int _id,
29 TQLabel( parent, name)
43 setFrameStyle (TQFrame::NoFrame);
45 setAlignment( AlignHCenter | AlignVCenter | SingleLine );
47 connect (
this, TQT_SIGNAL(itemPressed(
int)), parent, TQT_SIGNAL(pressed(
int)));
48 connect (
this, TQT_SIGNAL(itemReleased(
int)), parent, TQT_SIGNAL(released(
int)));
51 void KStatusBarLabel::mousePressEvent (TQMouseEvent *)
53 emit itemPressed (
id);
56 void KStatusBarLabel::mouseReleaseEvent (TQMouseEvent *)
58 emit itemReleased (
id);
62 : TQStatusBar( parent, name )
67 TQString group(config->
group());
68 config->
setGroup(TQString::fromLatin1(
"StatusBar style"));
69 bool grip_enabled = config->
readBoolEntry(TQString::fromLatin1(
"SizeGripEnabled"),
false);
70 setSizeGripEnabled(grip_enabled);
81 kdDebug() <<
"KStatusBar::insertItem: item id " <<
id <<
" already exists." <<
endl;
84 l->setFixedHeight(fontMetrics().height()+2);
86 addWidget (l, stretch, permanent);
100 kdDebug() <<
"KStatusBar::removeItem: bad item id: " <<
id <<
endl;
118 if(l->minimumWidth () != l->maximumWidth ())
124 kdDebug() <<
"KStatusBar::changeItem: bad item id: " <<
id <<
endl;
132 l->setAlignment(align);
135 kdDebug() <<
"KStatusBar::setItemAlignment: bad item id: " <<
id <<
endl;
144 w=fontMetrics().boundingRect(l->text()).width()+3;
149 kdDebug() <<
"KStatusBar::setItemFixed: bad item id: " <<
id <<
endl;
152 #include "kstatusbar.moc"