Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-12 Thread David Greaves
Correct

David

On 12/02/14 06:46, Andrey Kozhevnikov wrote:
 using Qt DBus classes and not use system() call?
 
 On 12.02.2014 12:08, itviewer wrote:
 Dear all,
  
 I need the screen capture function in my application . There are two
 applications (screenshot and  opensource sailshotme) in the jolla store.
  
 From the sailshotme, I know that  can call the saveScreenshot method of
 org.nemomobile.lipstick through dbus, such as the command:
  
 dbus-send --session --type=method_call --print-reply
 --dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot
 org.nemomobile.lipstick.saveScreenshot  string:/home/nemo/Pictures/123.png 
  
 but, using the sailshotme or the above mentioned command will lead to the 
 UI
 blocking of sailfish system, the screen will not response within
 a few seconds, however, it seems that there is no such blocking when using 
 the
 screenshot.
 so I want to know the mechanism of the screenshot?
  
 BestRegards
  
 
 ma xinjun


 ___
 SailfishOS.org Devel mailing list
 
 
 
 ___
 SailfishOS.org Devel mailing list
 

___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-12 Thread itviewer
My code just like:

QDBusMessage message = 
QDBusMessage::createMethodCall(org.nemomobile.lipstick,
/org/nemomobile/lipstick/screenshot,
 org.nemomobile.lipstick,
saveScreenshot );
QDBusConnection conn =  QDBusConnection::sessionBus();
conn.send(message);

   But it still block the UI ( screen will not response within a few seconds)
   Please help!Thanks very much.




ma xinjun

From: David Greaves
Date: 2014-02-12 17:23
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] How to get the screen capture but don't block UI
Correct

David

On 12/02/14 06:46, Andrey Kozhevnikov wrote:
 using Qt DBus classes and not use system() call?
 
 On 12.02.2014 12:08, itviewer wrote:
 Dear all,
  
 I need the screen capture function in my application . There are two
 applications (screenshot and  opensource sailshotme) in the jolla store.
  
 From the sailshotme, I know that  can call the saveScreenshot method of
 org.nemomobile.lipstick through dbus, such as the command:
  
 dbus-send --session --type=method_call --print-reply
 --dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot
 org.nemomobile.lipstick.saveScreenshot  string:/home/nemo/Pictures/123.png 
  
 but, using the sailshotme or the above mentioned command will lead to the 
 UI
 blocking of sailfish system, the screen will not response within
 a few seconds, however, it seems that there is no such blocking when using 
 the
 screenshot.
 so I want to know the mechanism of the screenshot?
  
 BestRegards
  
 
 ma xinjun


 ___
 SailfishOS.org Devel mailing list
 
 
 
 ___
 SailfishOS.org Devel mailing list
 

___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-12 Thread itviewer
thanks,I tried the code but it still block the UI .
Do you test it and what is the result ? 




ma xinjun

From: Andrey Kozhevnikov
Date: 2014-02-12 22:33
To: devel
Subject: Re: [SailfishDevel] How to get the screen capture but don't block UI
QDBusInterface *iface = new QDBusInterface(org.nemomobile.lipstick,
   /org/nemomobile/lipstick/screenshot,
  org.nemomobile.lipstick,
   QDBusConnection::sessionBus(),
   this);
iface-call(QDBus::NoBlock, saveScreenshot, /home/nemo/Pictures/123.png);


On 12.02.2014 20:26, itviewer wrote:

My code just like:

QDBusMessage message = 
QDBusMessage::createMethodCall(org.nemomobile.lipstick,
/org/nemomobile/lipstick/screenshot,
 org.nemomobile.lipstick,
saveScreenshot );
QDBusConnection conn =  QDBusConnection::sessionBus();
conn.send(message);

   But it still block the UI ( screen will not response within a few seconds)
   Please help!Thanks very much.




ma xinjun

From: David Greaves
Date: 2014-02-12 17:23
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] How to get the screen capture but don't block UI
Correct

David

On 12/02/14 06:46, Andrey Kozhevnikov wrote:
 using Qt DBus classes and not use system() call?
 
 On 12.02.2014 12:08, itviewer wrote:
 Dear all,
  
 I need the screen capture function in my application . There are two
 applications (screenshot and  opensource sailshotme) in the jolla store.
  
 From the sailshotme, I know that  can call the saveScreenshot method of
 org.nemomobile.lipstick through dbus, such as the command:
  
 dbus-send --session --type=method_call --print-reply
 --dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot
 org.nemomobile.lipstick.saveScreenshot  string:/home/nemo/Pictures/123.png 
  
 but, using the sailshotme or the above mentioned command will lead to the 
 UI
 blocking of sailfish system, the screen will not response within
 a few seconds, however, it seems that there is no such blocking when using 
 the
 screenshot.
 so I want to know the mechanism of the screenshot?
  
 BestRegards
  
 
 ma xinjun


 ___
 SailfishOS.org Devel mailing list
 
 
 
 ___
 SailfishOS.org Devel mailing list
 

___
SailfishOS.org Devel mailing list

 

___
SailfishOS.org Devel mailing list___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-12 Thread Andrey Kozhevnikov

result is screenshot in its location and my ui is not blocked.
something wrong with your call.

On 12.02.2014 21:17, itviewer wrote:

thanks,I tried the code but it still block the UI .
Do you test it and what is the result ?

ma xinjun
*From:* Andrey Kozhevnikov mailto:coderusin...@gmail.com
*Date:* 2014-02-12 22:33
*To:* devel mailto:devel@lists.sailfishos.org
*Subject:* Re: [SailfishDevel] How to get the screen capture but don't 
block UI

QDBusInterface *iface = new QDBusInterface(org.nemomobile.lipstick,
/org/nemomobile/lipstick/screenshot,
org.nemomobile.lipstick,
QDBusConnection::sessionBus(),
   this);
iface-call(QDBus::NoBlock, saveScreenshot, 
/home/nemo/Pictures/123.png);


On 12.02.2014 20:26, itviewer wrote:

My code just like:
QDBusMessage message = 
QDBusMessage::createMethodCall(org.nemomobile.lipstick,

/org/nemomobile/lipstick/screenshot,
 org.nemomobile.lipstick,
saveScreenshot );
QDBusConnection conn = QDBusConnection::sessionBus();
conn.send(message);
   But it still block the UI ( screen will not response within a few 
seconds)

   Please help!Thanks very much.

ma xinjun
*From:* David Greaves mailto:david.grea...@jolla.com
*Date:* 2014-02-12 17:23
*To:* Sailfish OS Developers mailto:devel@lists.sailfishos.org
*Subject:* Re: [SailfishDevel] How to get the screen capture but 
don't block UI

Correct
David
On 12/02/14 06:46, Andrey Kozhevnikov wrote:
 using Qt DBus classes and not use system() call?

 On 12.02.2014 12:08, itviewer wrote:
 Dear all,

 I need the screen capture function in my application . There are two
 applications (screenshot and  opensource sailshotme) in the jolla 
store.


 From the sailshotme, I know that  can call the saveScreenshot 
method of

 org.nemomobile.lipstick through dbus, such as the command:

 dbus-send --session --type=method_call --print-reply
 --dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot
 org.nemomobile.lipstick.saveScreenshot 
string:/home/nemo/Pictures/123.png 


 but, using the sailshotme or the above mentioned command will 
lead to the UI

 blocking of sailfish system, the screen will not response within
 a few seconds, however, it seems that there is no such blocking 
when using the

 screenshot.
 so I want to know the mechanism of the screenshot?

 BestRegards

 


 ma xinjun


 ___
 SailfishOS.org Devel mailing list



 ___
 SailfishOS.org Devel mailing list

___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list




___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-12 Thread Filip Kłębczyk

W dniu 12.02.2014 10:23, David Greaves pisze:

Correct

David

On 12/02/14 06:46, Andrey Kozhevnikov wrote:

using Qt DBus classes and not use system() call?


I haven't used system() call just in case someone thinks I did ;-)

Anyway if someone wants to improve the app I for sure accept any good 
pull requests. The source is out there:


https://github.com/fk-lx/SailshotMe/

Regards,
Filip

___
SailfishOS.org Devel mailing list


[SailfishDevel] How to get the screen capture but don't block UI

2014-02-11 Thread itviewer
Dear all,

I need the screen capture function in my application . There are two 
applications (screenshot and  opensource sailshotme) in the jolla store. 

From the sailshotme, I know that  can call the saveScreenshot method of 
org.nemomobile.lipstick through dbus, such as the command:

dbus-send --session --type=method_call --print-reply 
--dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot 
org.nemomobile.lipstick.saveScreenshot  string:/home/nemo/Pictures/123.png 

but, using the sailshotme or the above mentioned command will lead to the UI 
blocking of sailfish system, the screen will not response within 
a few seconds, however, it seems that there is no such blocking when using the 
screenshot.
so I want to know the mechanism of the screenshot?

BestRegards 



ma xinjun___
SailfishOS.org Devel mailing list

Re: [SailfishDevel] How to get the screen capture but don't block UI

2014-02-11 Thread Andrey Kozhevnikov

using Qt DBus classes and not use system() call?

On 12.02.2014 12:08, itviewer wrote:

Dear all,
I need the screen capture function in my application . There are two 
applications (screenshot and  opensource sailshotme) in the jolla store.
From the sailshotme, I know that  can call the saveScreenshot method 
of org.nemomobile.lipstick through dbus, such as the command:
dbus-send --session --type=method_call --print-reply 
--dest=org.nemomobile.lipstick /org/nemomobile/lipstick/screenshot 
org.nemomobile.lipstick.saveScreenshot 
string:/home/nemo/Pictures/123.png 
but, using the sailshotme or the above mentioned command will lead 
to the UI blocking of sailfish system, the screen will not response 
within
a few seconds, however, it seems that there is no such blocking when 
using the screenshot.

so I want to know the mechanism of the screenshot?
BestRegards

ma xinjun


___
SailfishOS.org Devel mailing list


___
SailfishOS.org Devel mailing list