The API changed for rotations, requiring another argument for positions.
[contacts_plasmoid.git] / contactwidget.cpp
blobb2d743d8f723b653b21a7424776e57b809042333
1 #include "contactwidget.h"
2 #include "contactlabel.h"
3 #include "contactphoto.h"
5 #include <QGraphicsGridLayout>
7 #include <kstandarddirs.h>
9 #ifndef STANDALONE
10 #include <kstandarddirs.h>
11 #endif
13 ContactWidget::ContactWidget( QGraphicsItem *parent )
14 : QGraphicsWidget( parent )
16 layout = new QGraphicsGridLayout( this );
18 mPhoto = new ContactPhoto( this );
19 label = new ContactLabel( this );
21 #ifndef STANDALONE
22 mPhoto->setPhoto( KStandardDirs::installPath("data") + "plasma-contacts/" + "wallace-ld.jpg" );
23 mPhoto->setShadow( KStandardDirs::installPath("data") + "plasma-contacts/" + "shadow.png" );
24 #else
25 mPhoto->setPhoto( "./images/wallace-ld.jpg" );
26 mPhoto->setShadow( "./images/shadow.png" );
27 #endif
29 label->setText( "teste" );
31 QPen pen;
32 pen.setColor( QColor( Qt::black ) );
33 label->setPen( pen );
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()