[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/zippl
From: Klaas Freitag <freitag () suse ! de>
Date: 2011-07-12 12:38:27
Message-ID: 20110712123827.BB48AAC854 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1241292 by freitag:
added path attribute for the presentation
M +1 -1 zippl.xml
M +5 -1 zipplxmlreader.cpp
M +1 -0 zipplxmlreader.h
--- trunk/playground/office/zippl/zippl.xml #1241291:1241292
@@ -8,7 +8,7 @@
<email>freitag@suse.de</email>
</author>
</meta>
- <presentation width="10000" height="20000">
+ <presentation width="10000" height="20000" path="/usr/share/zippl">
<spot x="-2000" y="0" width="500" height="300" backgroundcolor="#ffffff">
<tocentry>A Greeting Page</tocentry>
--- trunk/playground/office/zippl/zipplxmlreader.cpp #1241291:1241292
@@ -94,6 +94,10 @@
QString mode = attributes().value("mode").toString();
if( !mode.isEmpty() ) mMode = mode;
+ mPath = attributes().value("path").toString();
+ if( !mPath.endsWith('/') ) mPath += "/";
+
+
qreal dx = qrealAttrib("width") / -2.0;
qreal dy = qrealAttrib("height") / -2.0;
QRectF rect( dx, dy, -2.0*dx, -2.0*dy );
@@ -296,7 +300,7 @@
QGraphicsPixmapItem *item = new QGraphicsPixmapItem( mCurrParent, scene );
item->setPos( position() );
- QString imgName = readElementText();
+ QString imgName = mPath + readElementText();
bool ret = true;
if(!QFile::exists( imgName )) {
--- trunk/playground/office/zippl/zipplxmlreader.h #1241291:1241292
@@ -46,6 +46,7 @@
QList<QGraphicsItem*> mSpots;
QMap<QGraphicsItem*, GraphicsItemList> mHiddenItems;
QString mMode;
+ QString mPath;
QString mPresentationTitle;
QString mPresentationDescr;
QString mPresentationDate;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic