DesktopLayout branch

2009-02-08 Thread Ambroz Bizjak
Hi,

I've been working on some improvements to the desktop containment concerning 
applet positioning/transformations. I think the code is ready to be merged 
into trunk. The branches are in svn under branches/work/plasma-desktoplayout. 
I'm also attaching the patches.
Can I merge the code, or does anyone have objections/questions?

To sum up the changes:
- Get rid of the QGraphicsLayout interface from DesktopLayout as it is 
unneeded and not designed for we're doing. A layout is suppose to be the only 
thing manipulating the children, which is not our case (user actions, applets 
resizing themselves).
- Added signals appletTransformedByUsed and appletTransformedItself to 
Plasma::Applet. This makes it easier for the layout code to know when applets 
are transformed (moved/resized/rotated), and it can even know whether the 
change was by the user or the applet itself. Fixes bug 180857. This is needed 
for fixing bug 181841.
- Updated the desktop containment to use these signals.
- Added proper handling of applets resizing themselves to DesktopLayout. E.g. 
if an applet gets larger, applets on its right that are in the way are pushed 
not to overlap.
- Added support for understanding rotations (bug 177152).
- Added emitting of the signals mentioned to some of the applets when they 
resize themselves; more are needed.
Index: applet.h
===
--- applet.h	(.../trunk/KDE/kdelibs/plasma)	(revision 922977)
+++ applet.h	(.../branches/work/plasma-desktoplayout/kdelibs-plasma)	(revision 922977)
@@ -591,6 +591,16 @@
 void geometryChanged();
 
 /**
+ * Emitted when the user completes a transformation of the applet.
+ */
+void appletTransformedByUser();
+
+/**
+ * Emitted when the applet changes its own geometry or transform.
+ */
+void appletTransformedItself();
+
+/**
  * Emitted by Applet subclasses when they change a sizeHint and wants to announce the change
  */
 void sizeHintChanged(Qt::SizeHint which);
Index: popupapplet.cpp
===
--- popupapplet.cpp	(.../trunk/KDE/kdelibs/plasma)	(revision 922977)
+++ popupapplet.cpp	(.../branches/work/plasma-desktoplayout/kdelibs-plasma)	(revision 922977)
@@ -246,6 +246,7 @@
 //size not saved/invalid size saved
 if (oldSize.width() < q->minimumSize().width() || oldSize.height() < q->minimumSize().height()) {
 q->resize(prefSize);
+emit q->appletTransformedItself();
 }
 
 //FIXME: this will be automatically propagated by the qgraphicslayout in the future
Index: private/applethandle.cpp
===
--- private/applethandle.cpp	(.../trunk/KDE/kdelibs/plasma)	(revision 922977)
+++ private/applethandle.cpp	(.../branches/work/plasma-desktoplayout/kdelibs-plasma)	(revision 922977)
@@ -72,6 +72,9 @@
  Theme::defaultTheme()->colorScheme());
 m_gradientColor = colorScheme.background(KColorScheme::NormalBackground).color();
 
+m_originalGeom = m_applet->geometry();
+m_originalTransform = m_applet->transform();
+
 QTransform originalMatrix = m_applet->transform();
 m_applet->resetTransform();
 
@@ -167,6 +170,10 @@
 
 m_applet->setZValue(m_zValue);
 
+if (m_applet->geometry() != m_originalGeom || m_applet->transform() != m_originalTransform) {
+emit m_applet->appletTransformedByUser();
+}
+
 m_applet->update(); // re-render the background, now we've transformed the applet
 
 m_applet = 0;
Index: private/applethandle_p.h
===
--- private/applethandle_p.h	(.../trunk/KDE/kdelibs/plasma)	(revision 922977)
+++ private/applethandle_p.h	(.../branches/work/plasma-desktoplayout/kdelibs-plasma)	(revision 922977)
@@ -127,6 +127,8 @@
 QPointF m_entryPos; //where the hover in event occurred
 QPointF m_pos;  //current position of applet in sceneCoords
 qreal m_zValue; //current zValue of the applet, so it can be restored after drag.
+QRectF m_originalGeom;
+QTransform m_originalTransform;
 
 // used for both resize and rotate
 QPointF m_origAppletCenter;
Index: containments/desktop/desktop.h
===
--- containments/desktop/desktop.h	(.../trunk/KDE/kdebase/workspace/plasma)	(revision 922978)
+++ containments/desktop/desktop.h	(.../branches/work/plasma-desktoplayout/kdebase-workspace-plasma)	(revision 922978)
@@ -78,7 +78,8 @@
 
 void onAppletAdded(Plasma::Applet *, const QPointF &);
 void onAppletRemoved(Plasma::Applet *);
-void onAppletGeometryChanged();
+void onAppletTransformedByUser();
+void onAppletTransformedItself();
 void refreshWorkingArea();
 
 private:
I

Review Request: Time based queue policy for slow speed runners

2009-02-08 Thread Ryan Bitanga

---
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/41/
---

Review request for Plasma.


Summary
---

Reposting the patch from a couple of weeks ago. This patch changes the policy 
to one that denies slow speed runners from running until after the specified 
timeout (400ms in this case). This means they'll be on the queue long enough to 
be removed if the query changes within the timeout period. Basically what the 
nepomuk search runner did except this time it's implemented via a queue policy.


Diffs
-

  /trunk/KDE/kdelibs/plasma/CMakeLists.txt 917721 
  /trunk/KDE/kdelibs/plasma/private/runnerjobs.h PRE-CREATION 
  /trunk/KDE/kdelibs/plasma/private/runnerjobs.cpp PRE-CREATION 
  /trunk/KDE/kdelibs/plasma/runnermanager.h 917721 
  /trunk/KDE/kdelibs/plasma/runnermanager.cpp 917721 

Diff: http://reviewboard.kde.org/r/41/diff


Testing
---


Thanks,

Ryan

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Time based queue policy for slow speed runners

2009-02-08 Thread Aaron Seigo

---
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/41/#review45
---

Ship it!


let's give it a try

- Aaron


On 2009-02-08 04:09:51, Ryan Bitanga wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/41/
> ---
> 
> (Updated 2009-02-08 04:09:51)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> ---
> 
> Reposting the patch from a couple of weeks ago. This patch changes the policy 
> to one that denies slow speed runners from running until after the specified 
> timeout (400ms in this case). This means they'll be on the queue long enough 
> to be removed if the query changes within the timeout period. Basically what 
> the nepomuk search runner did except this time it's implemented via a queue 
> policy.
> 
> 
> Diffs
> -
> 
>   /trunk/KDE/kdelibs/plasma/CMakeLists.txt 917721 
>   /trunk/KDE/kdelibs/plasma/private/runnerjobs.h PRE-CREATION 
>   /trunk/KDE/kdelibs/plasma/private/runnerjobs.cpp PRE-CREATION 
>   /trunk/KDE/kdelibs/plasma/runnermanager.h 917721 
>   /trunk/KDE/kdelibs/plasma/runnermanager.cpp 917721 
> 
> Diff: http://reviewboard.kde.org/r/41/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Ryan
> 
>

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[PATCH] Lock/Logout plasmoid: configure shown buttons

2009-02-08 Thread Konstantinos Smanis
HI everybody,

I have created a patch that implements wishlist #164687 
(https://bugs.kde.org/show_bug.cgi?id=164687), namely provide the UI to 
configure the buttons which are shown in the Lock/Logout plasmoid (Lock, 
Logout or both).

I wasn't sure whether I should commit it (plasma is quite a "sensitive" area 
that I wouldn't like to mess), so I send it to you, the Plasma devs to review 
it. It's quite small btw.

I have followed the coding styles and all these things, but there were some 
things that I wasn't sure for. For example, under Windows the logout button is 
not shown so the configuration UI should not apply there. Thus I have put all 
config-related code in the appropriate #ifndef Q_OS_WIN. Still, I don't really 
like this (I am afraid I abused it and spread it all over the code), so feel 
free to make suggestions.

Cheers,
Konstantinos Smanis
Index: lockout.cpp
===
--- lockout.cpp	(revision 922924)
+++ lockout.cpp	(working copy)
@@ -31,6 +31,8 @@
 // KDE
 #include 
 #ifndef Q_OS_WIN
+#include 
+#include 
 #include 
 #include 
 #endif
@@ -47,6 +49,9 @@
 LockOut::LockOut(QObject *parent, const QVariantList &args)
 : Plasma::Applet(parent, args)
 {
+#ifndef Q_OS_WIN
+setHasConfigurationInterface(true);
+#endif
 resize(MINBUTTONSIZE, MINBUTTONSIZE * 2 + MARGINSIZE);
 }
 
@@ -56,14 +61,19 @@
 m_layout->setContentsMargins(0,0,0,0);
 m_layout->setSpacing(0);
 
-Plasma::IconWidget *icon_lock = new Plasma::IconWidget(KIcon("system-lock-screen"), "", this);
-m_layout->addItem(icon_lock);
+#ifndef Q_OS_WIN
+KConfigGroup cg = config();
+m_showLockButton = cg.readEntry("showLockButton", true);
+m_showLogoutButton = cg.readEntry("showLogoutButton", true);
+#endif
+
+icon_lock = new Plasma::IconWidget(KIcon("system-lock-screen"), "", this);
 connect(icon_lock, SIGNAL(clicked()), this, SLOT(clickLock()));
-#ifndef Q_OS_WIN
-Plasma::IconWidget *icon_logout = new Plasma::IconWidget(KIcon("system-shutdown"), "", this);
-m_layout->addItem(icon_logout);
+
+icon_logout = new Plasma::IconWidget(KIcon("system-shutdown"), "", this);
 connect(icon_logout, SIGNAL(clicked()), this, SLOT(clickLogout()));
-#endif
+
+showButtons();
 }
 
 LockOut::~LockOut()
@@ -155,5 +165,63 @@
 #endif
 }
 
+#ifndef Q_OS_WIN
+void LockOut::configAccepted()
+{
+m_showLockButton = (ui.radioButton_lock->isChecked() || ui.radioButton_both->isChecked());
+m_showLogoutButton = (ui.radioButton_logout->isChecked() || ui.radioButton_both->isChecked());
 
+KConfigGroup cg = config();
+cg.writeEntry("showLockButton", m_showLockButton);
+cg.writeEntry("showLogoutButton", m_showLogoutButton);
+
+showButtons();
+
+emit configNeedsSaving();
+}
+
+void LockOut::createConfigurationInterface(KConfigDialog *parent)
+{
+QWidget *widget = new QWidget(parent);
+ui.setupUi(widget);
+parent->addPage(widget, i18n("General"), Applet::icon());
+connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
+connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
+
+if (m_showLockButton && m_showLogoutButton) {
+ui.radioButton_both->setChecked(Qt::Checked);
+} else if (m_showLockButton) {
+ui.radioButton_lock->setChecked(Qt::Checked);
+} else {
+ui.radioButton_logout->setChecked(Qt::Checked);
+}
+}
+#endif
+
+void LockOut::showButtons()
+{
+#ifdef Q_OS_WIN
+m_layout->addItem(icon_lock);
+#else
+//make sure we don't add a button twice in the layout
+//definitely not the best workaround...
+m_layout->removeItem(icon_lock);
+m_layout->removeItem(icon_logout);
+
+if (m_showLockButton) {
+	icon_lock->setVisible(true);
+m_layout->addItem(icon_lock);
+} else {
+	icon_lock->setVisible(false);
+}
+
+if (m_showLogoutButton) {
+	icon_logout->setVisible(true);
+m_layout->addItem(icon_logout);
+} else {
+	icon_logout->setVisible(false);
+}
+#endif // !Q_OS_WIN
+}
+
 #include "lockout.moc"
Index: lockoutConfig.ui
===
--- lockoutConfig.ui	(revision 0)
+++ lockoutConfig.ui	(revision 0)
@@ -0,0 +1,57 @@
+
+ lockoutConfig
+ 
+  
+   
+0
+0
+157
+126
+   
+  
+  
+   Configure Lock/Logout
+  
+  
+   Configure Lock/Logout
+  
+  
+   
+
+ 
+  Show lock button
+ 
+
+   
+   
+
+ 
+  Show logout button
+ 
+
+   
+   
+
+ 
+  Show both buttons
+ 
+
+   
+   
+
+ 
+  Qt::Vertical
+ 
+ 
+  
+   20
+   40
+  
+ 
+
+   
+  
+ 
+ 
+ 
+
Index: lockout.h
===
--- lockout.h	(revision 922924)
+++ lockout.h	(working copy)
@@ -22,6 +22,15 @@
 
 #include 
 
+namespace Plasma
+{
+class IconWidget;
+}
+
+#ifndef Q_OS_WIN
+#include "ui_lockoutConfig.h"
+#endif
+

Re: [PATCH] Lock/Logout plasmoid: configure shown buttons

2009-02-08 Thread Aaron J. Seigo
On Sunday 08 February 2009, Konstantinos Smanis wrote:
> I have followed the coding styles and all these things, but there were some
> things that I wasn't sure for. For example, under Windows the logout button
> is not shown so the configuration UI should not apply there. Thus I have

you can get away with a lot less ifdef'd code; just return immediately from 
createConfigurationInterface if on windows, for instance. i wouldn't bother 
with the rest of the ifdef's.

also, instead of "Both Buttons" as an option, just make them all checkboxes. 
this way if/when someone adds "suspend to ram" then we don't need all the 
permutations for the three ;)

if the user turns off all the buttons, then what? well .. in that case i'd 
suggest calling setConfigurationRequired(true) :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software



signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: [PATCH] Lock/Logout plasmoid: configure shown buttons

2009-02-08 Thread Sebastian Kügler
On Sunday 08 February 2009 15:08:13 Konstantinos Smanis wrote:
> I have created a patch that implements wishlist #164687
> (https://bugs.kde.org/show_bug.cgi?id=164687), namely provide the UI to
> configure the buttons which are shown in the Lock/Logout plasmoid (Lock,
> Logout or both).
>
> I wasn't sure whether I should commit it (plasma is quite a "sensitive"
> area that I wouldn't like to mess), so I send it to you, the Plasma devs to
> review it. It's quite small btw.
>
> I have followed the coding styles and all these things, but there were some
> things that I wasn't sure for. For example, under Windows the logout button
> is not shown so the configuration UI should not apply there. Thus I have
> put all config-related code in the appropriate #ifndef Q_OS_WIN. Still, I
> don't really like this (I am afraid I abused it and spread it all over the
> code), so feel free to make suggestions.

Member vars should be prefixed with m_ and camel-cased (so icon_lock -> 
m_iconLock, icon_logout -> m_iconLogout). Otherwise, I don't see anything 
glaringly wrong with this patch.

A nice addition would be allowing to show shutdown, restart, suspend and 
hibernate buttons as well.
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


playground/base/plasma/dataengines/akonadi

2009-02-08 Thread Sebastian Kügler
SVN commit 923483 by sebas:

birthday, location and photo for the akonadi dataengine contacts part

In more general, the dataengine works as follows:

For email:
---
- request "EmailCollections", you'll get a list of EmailCollections-
  as key and the name of the collection as value.
  (The list of collections is loaded on demand)

- Choose one of those collections by request the ID
  (EmailCollection-). The dataengine now queries Akonadi for all
  emails in that collections and will add a new source for every email. In
  you dataUpdated() method, you can simply check if the
  source.startsWith("EmailCollection-") and then query the data from that
  email.

Properties you might be interested in for those email source are:
 - QDate DateTime
 - QString Subject
 - QString From
 - QString To
 - qlonglong Id

The Id can be used to query Akonadi for the body of the email. That part
is not yet included in the Akonadi engine, but might come in the future.

For Contacts:
--
- request "ContactCollections", choose one of those and request
  "ContactCollection-".
- request one of those collections ("ContactCollection-")
- New sources for every contact in that collection will appear. You can
  now get at the Contacts data through the following fields in that
  particular source:

 - double longitude
 - double latitude
 - QString Organization, Role, FullEmail, Name, Department, Emails,
   various Phone- numbers

Work to get those datasets more complete is under way. What's in should
already provide for most of the use cases you can dream of.

CCMAIL:plasma-devel@kde.org

 M  +23 -8 akonadiengine.cpp  


--- trunk/playground/base/plasma/dataengines/akonadi/akonadiengine.cpp 
#923482:923483
@@ -29,6 +29,7 @@
 
 #include 
 #include 
+#include 
 
 /*
 #include 
@@ -54,7 +55,6 @@
 SLOT(emailItemChanged(Akonadi::Item)) );
 // TODO: monitoring for contacts
 
-fetchContactCollections(); // TODO: remove, it's there only for debugging
 }
 
 AkonadiEngine::~AkonadiEngine()
@@ -256,22 +256,37 @@
 // Phone and related
 QStringList phoneNumbers;
 foreach (const KABC::PhoneNumber pn, a.phoneNumbers()) {
-QString key = QString("Phone%1").arg(pn.typeLabel());
-setData(source, key, a.phoneNumber(pn.type()).toString());
-phoneNumbers << a.phoneNumber(pn.type()).toString();
+QString key = QString("Phone-%1").arg(pn.typeLabel());
+setData(source, key, a.phoneNumber(pn.type()).number());
+phoneNumbers << a.phoneNumber(pn.type()).number();
 }
 if (!phoneNumbers.count()) {
 setData(source, "PhoneNumbers", phoneNumbers);
 }
 
-// department, fullEmail, nickName, organisation, note, prefix, 
realName, role
+// Personal
+if (!a.birthday().isValid()) {
+setData(source, "Birthday", a.birthday());
+}
 
+if (a.photo().isEmpty()) {
+setData(source, "Photo", a.photo().data());
+setData(source, "PhotoUrl", a.photo().url());
+}
+if (a.geo().isValid()) {
+setData(source, "Latitude", a.geo().latitude());
+setData(source, "Longitude", a.geo().longitude());
+}
 
-// phoneNumber.toString phoneNumber.typeLabel
+// addresses
 
-//setData(source, "Name", a.name());
+// categories
 
-// TODO
+// note,
+
+// prefix,
+
+// ...
 }
 }
 }
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[PATCH] fade out panel in desktopgrid

2009-02-08 Thread Sebastian Kügler
Hey kwinners,

Apparently, we've had complaints that the panel shown on the desktopgrid is 
the same for all virtual desktops, even when configured to only show windows 
from the current virtual desktops. As we have only one panel which is shown 
for all virtual desktops and we just change that panel based on current 
virtual desktops, it's not easy to solve.

The attached patch hides this issue by simply fading out the panel when the 
desktopgrid is activated and fades it back in when the you zoom into a 
desktop.

OK to commit?
-- 
sebas

 http://www.kde.org | http://vizZzion.org |  GPG Key ID: 9119 0EF9 

diff --git a/workspace/kwin/effects/desktopgrid/desktopgrid.cpp b/workspace/kwin/effects/desktopgrid/desktopgrid.cpp
index 0839374..6687623 100644
--- a/workspace/kwin/effects/desktopgrid/desktopgrid.cpp
+++ b/workspace/kwin/effects/desktopgrid/desktopgrid.cpp
@@ -217,7 +217,10 @@ void DesktopGridEffect::paintWindow( EffectWindow* w, int mask, QRegion region,
 // Don't change brightness of windows on all desktops as this causes flickering
 if( !w->isOnAllDesktops() || w->isDesktop() )
 data.brightness *= 1.0 - ( 0.3 * ( 1.0 - hoverTimeline[paintingDesktop - 1].value() ));
-
+
+if ( w->isDock() )
+data.opacity = 1 - timeline.value();
+
 for( int screen = 0; screen < effects->numScreens(); screen++ )
 {
 // Assume desktop windows can never be on two screens at once (Plasma makes one window per screen)
@@ -470,7 +473,7 @@ QPoint DesktopGridEffect::unscalePos( const QPoint& pos, int* desktop ) const
 {
 int screen = effects->screenNumber( pos );
 QRect screenGeom = effects->clientArea( ScreenArea, screen, 0 );
-
+
 //double progress = timeline.value();
 double scaledX = /*interpolate(
 ( pos.x() - screenGeom.x() + unscaledBorder[screen] / 2.0 ) / ( screenGeom.width() + unscaledBorder[screen] ) + activeCell.x() - 1,*/
@@ -518,7 +521,7 @@ int DesktopGridEffect::posToDesktop( const QPoint& pos ) const
 { // Copied from unscalePos()
 int screen = effects->screenNumber( pos );
 QRect screenGeom = effects->clientArea( ScreenArea, screen, 0 );
-
+
 //double progress = timeline.value();
 double scaledX = /*interpolate(
 ( pos.x() - screenGeom.x() + unscaledBorder[screen] / 2.0 ) / ( screenGeom.width() + unscaledBorder[screen] ) + activeCell.x() - 1,*/
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: playground/base/plasma/dataengines/akonadi

2009-02-08 Thread David Baron
Great.

I downloaded and compiled.

I still get "no data sources" in the explorer and in some test code which 
would simply show the sources() list.
> SVN commit 923483 by sebas:
>
> birthday, location and photo for the akonadi dataengine contacts part
>
> In more general, the dataengine works as follows:
>
> For email:
> ---
> - request "EmailCollections", you'll get a list of EmailCollections-
>   as key and the name of the collection as value.
>   (The list of collections is loaded on demand)
>
> - Choose one of those collections by request the ID
>   (EmailCollection-). The dataengine now queries Akonadi for all
>   emails in that collections and will add a new source for every email. In
>   you dataUpdated() method, you can simply check if the
>   source.startsWith("EmailCollection-") and then query the data from that
>   email.
>
> Properties you might be interested in for those email source are:
>  - QDate DateTime
>  - QString Subject
>  - QString From
>  - QString To
>  - qlonglong Id
>
> The Id can be used to query Akonadi for the body of the email. That part
> is not yet included in the Akonadi engine, but might come in the future.
>
> For Contacts:
> --
> - request "ContactCollections", choose one of those and request
>   "ContactCollection-".
> - request one of those collections ("ContactCollection-")
> - New sources for every contact in that collection will appear. You can
>   now get at the Contacts data through the following fields in that
>   particular source:
>
>  - double longitude
>  - double latitude
>  - QString Organization, Role, FullEmail, Name, Department, Emails,
>various Phone- numbers
>
> Work to get those datasets more complete is under way. What's in should
> already provide for most of the use cases you can dream of.
>
> CCMAIL:plasma-devel@kde.org
>
>  M  +23 -8 akonadiengine.cpp
>
>
> --- trunk/playground/base/plasma/dataengines/akonadi/akonadiengine.cpp
> #923482:923483 @@ -29,6 +29,7 @@
>
>  #include 
>  #include 
> +#include 
>
>  /*
>  #include 
> @@ -54,7 +55,6 @@
>  SLOT(emailItemChanged(Akonadi::Item)) );
>  // TODO: monitoring for contacts
>
> -fetchContactCollections(); // TODO: remove, it's there only for
> debugging }
>
>  AkonadiEngine::~AkonadiEngine()
> @@ -256,22 +256,37 @@
>  // Phone and related
>  QStringList phoneNumbers;
>  foreach (const KABC::PhoneNumber pn, a.phoneNumbers()) {
> -QString key = QString("Phone%1").arg(pn.typeLabel());
> -setData(source, key, a.phoneNumber(pn.type()).toString());
> -phoneNumbers << a.phoneNumber(pn.type()).toString();
> +QString key = QString("Phone-%1").arg(pn.typeLabel());
> +setData(source, key, a.phoneNumber(pn.type()).number());
> +phoneNumbers << a.phoneNumber(pn.type()).number();
>  }
>  if (!phoneNumbers.count()) {
>  setData(source, "PhoneNumbers", phoneNumbers);
>  }
>
> -// department, fullEmail, nickName, organisation, note,
> prefix, realName, role +// Personal
> +if (!a.birthday().isValid()) {
> +setData(source, "Birthday", a.birthday());
> +}
>
> +if (a.photo().isEmpty()) {
> +setData(source, "Photo", a.photo().data());
> +setData(source, "PhotoUrl", a.photo().url());
> +}
> +if (a.geo().isValid()) {
> +setData(source, "Latitude", a.geo().latitude());
> +setData(source, "Longitude", a.geo().longitude());
> +}
>
> -// phoneNumber.toString phoneNumber.typeLabel
> +// addresses
>
> -//setData(source, "Name", a.name());
> +// categories
>
> -// TODO
> +// note,
> +
> +// prefix,
> +
> +// ...
>  }
>  }
>  }
> ___
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel