23 #include <tdeapplication.h>
25 #include "kseparator.moc"
29 : TQFrame(parent, name, f)
39 : TQFrame(parent, name, f)
54 setFrameStyle( TQFrame::VLine | TQFrame::Sunken );
59 kdWarning() <<
"KSeparator::setOrientation(): invalid orientation, using default orientation HLine" <<
endl;
63 setFrameStyle( TQFrame::HLine | TQFrame::Sunken );
73 if ( frameStyle() & VLine )
76 if ( frameStyle() & HLine )
85 TQRect r = frameRect();
86 const TQColorGroup & g = colorGroup();
88 if ( frameStyle() & HLine ) {
89 p1 = TQPoint( r.x(), r.height()/2 );
90 p2 = TQPoint( r.x()+r.width(), p1.y() );
93 p1 = TQPoint( r.x()+r.width()/2, 0 );
94 p2 = TQPoint( p1.x(), r.height() );
97 TQStyleOption opt( lineWidth(), midLineWidth() );
98 style().drawPrimitive( TQStyle::PE_Separator, p, TQRect( p1, p2 ), g,
99 TQStyle::Style_Sunken, opt );
105 if ( frameStyle() & VLine )
108 if ( frameStyle() & HLine )
111 return TQSize(-1, -1);
114 void KSeparator::virtual_hook(
int,
void* )
virtual void drawFrame(TQPainter *p)
virtual TQSize sizeHint() const
The recommended height (width) for a horizontal (vertical) separator.
KSeparator(TQWidget *parent=0, const char *name=0, WFlags f=0)
Constructor.
void setOrientation(int orient)
Set the orientation of the separator to orient.
int orientation() const
Returns the orientation of the separator.
kndbgstream & endl(kndbgstream &s)
kdbgstream kdWarning(int area=0)