void createBrushNode( QDomDocument& doc, QDomNode& parent, const QString& elementName, const QBrush& brush ) { QDomElement brushElement = doc.createElement( elementName ); parent.appendChild( brushElement ); createColorNode( doc, brushElement, "Color", brush.color() ); createStringNode( doc, brushElement, "Style", KDGanttXML::brushStyleToString( brush.style() ) ); if( brush.style() == Qt::CustomPattern && brush.pixmap() ) createPixmapNode( doc, brushElement, "Pixmap", *brush.pixmap() ); }
StyledButton::StyledButton( const QBrush& b, QWidget* parent, const char* name, WFlags f ) : QButton( parent, name, f ), spix( 0 ), s( 0 ) { col = b.color(); pix = b.pixmap(); setMinimumSize( minimumSizeHint() ); }
MyRichText::MyRichText( QWidget *parent, const char *name ) : QVBox( parent, name ) { setMargin( 5 ); view = new QTextView( this ); view->setText( "This is a <b>Test</b> with <i>italic</i> <u>stuff</u>" ); QBrush paper; paper.setPixmap( QPixmap( "../richtext/marble.png" ) ); if ( paper.pixmap() != 0 ) view->setPaper( paper ); else view->setPaper( white ); view->setText( sayings[0] ); view->setMinimumSize( 450, 250 ); QHBox *buttons = new QHBox( this ); buttons->setMargin( 5 ); bClose = new QPushButton( "&Close", buttons ); bPrev = new QPushButton( "<< &Prev", buttons ); bNext = new QPushButton( "&Next >>", buttons ); bPrev->setEnabled( FALSE ); connect( bClose, SIGNAL( clicked() ), qApp, SLOT( quit() ) ); connect( bPrev, SIGNAL( clicked() ), this, SLOT( prev() ) ); connect( bNext, SIGNAL( clicked() ), this, SLOT( next() ) ); num = 0; }