1 #include "contactwidget.h"
2 #include "contactlabel.h"
3 #include "contactphoto.h"
5 #include <QGraphicsGridLayout>
7 #include <kstandarddirs.h>
10 #include <kstandarddirs.h>
13 ContactWidget::ContactWidget( QGraphicsItem
*parent
)
14 : QGraphicsWidget( parent
)
16 layout
= new QGraphicsGridLayout( this );
18 mPhoto
= new ContactPhoto( this );
19 label
= new ContactLabel( this );
22 mPhoto
->setPhoto( KStandardDirs::installPath("data") + "plasma-contacts/" + "wallace-ld.jpg" );
23 mPhoto
->setShadow( KStandardDirs::installPath("data") + "plasma-contacts/" + "shadow.png" );
25 mPhoto
->setPhoto( "./images/wallace-ld.jpg" );
26 mPhoto
->setShadow( "./images/shadow.png" );
29 label
->setText( "teste" );
32 pen
.setColor( QColor( Qt::black
) );
35 QFont
font( "Helvetica [Cronyx]", 12 );
36 label
->setFont( font
);
38 layout
->addItem( mPhoto
, 0, 0 );
39 layout
->addItem( label
, 0, 1 );
42 ContactWidget::~ContactWidget()