maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] QtLockscreen: highly configurable lockscreen replacement (https://talk.maemo.org/showthread.php?t=75150)

maras 2011-09-30 08:06

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Sakya, how about my question?

Quote:

Is there any possibility to show Qtlockscreen when someone is calling to me? I would like to unlock my lockscreen then answer a call.

neboja 2011-09-30 08:29

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by antezz (Post 1099141)
but it's possible to make a script setting current wallpaper and kill it to refresh qtlockscreen cache. However that would be a ugly hack.

maybe it is not ugly hack.... setting a script instead of classic background could be even resource friendly, (maybe???)

just instead of file patch it loads from few more lines of code, using a small script (am i right????)

Blaizzen 2011-09-30 15:26

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
1 Attachment(s)
Not sure if its been mentioned here before (I tried a google search etc), but I was wondering if its possible to have animated backgrounds. I tinkered a bit with the code and got this:
(sorry for the bad quality :( )
http://www.youtube.com/watch?v=OyvoB2ueDy8

Its very buggy though, and I think it died when I rotated the screen, however its more of a trial. Could this be implemented in the future? Or would this cause significant battery drain? I will try modify the code further to make it less buggy, but so far i've been guessing so not sure how it'll go :o

Btw awesome app :D

The code modifications I made are
Quote:

Originally Posted by lockscreen.cpp
#ifdef Q_WS_MAEMO_5

#include <QtGui/QMovie>

#include<QLabel>
#include<QGraphicsProxyWidget>

#include <QtGui/QWidget>
#include <QtGui/QX11Info>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <mce/dbus-names.h>
#include <mce/mode-names.h>

#endif

bool LockScreen::Debug;
bool LockScreen::ScreenshotMode;
QSettings* LockScreen::Settings;

LockScreen::LockScreen(QWidget *parent) :
QObject(parent)
{
.......

void LockScreen::setBackground()
{
bool isPortrait = LsWidget::isPortrait();

QString bkg;
if (isPortrait)
bkg = LockScreen::Settings->value("Main/BackGroundImageP", "/opt/usr/share/themes/alpha/backgrounds/lockslider.png").toString();
else
bkg = LockScreen::Settings->value("Main/BackGroundImageL", "/opt/usr/share/themes/alpha/backgrounds/lockslider.png").toString();

if (m_BkgPath != bkg){
if (!bkg.isEmpty())
{
QMovie *movie = new QMovie("/home/user/MyDocs/rotate.gif");
QLabel *processLabel = new QLabel();
processLabel->setGeometry(0,0,800,480);
processLabel->setMovie(movie);
movie->start();

QGraphicsProxyWidget *proxy = m_Scene.addWidget(processLabel);
m_Scene.setBackgroundBrush(QPixmap(bkg));
}
else
m_Scene.setBackgroundBrush(QBrush(QColor(0,0,0,0)) );

m_BkgPath = bkg;
}
}

edit: added image.

sakya 2011-09-30 15:31

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by Blaizzen (Post 1099643)
Or would this cause significant battery drain?

Stop that animated gif when the lockscreen is not visible...
Did you test the cpu and memory usage?

Blaizzen 2011-09-30 15:46

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by sakya (Post 1099644)
Stop that animated gif when the lockscreen is not visible...
Did you test the cpu and memory usage?

I only have conky available. At idle its using around 80% CPU and 8megs of ram. Let me know if you have a better logger I can use if you need more details :)

sakya 2011-09-30 15:59

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
Quote:

Originally Posted by Blaizzen (Post 1099650)
At idle its using around 80% CPU

80%? Wow! :)
Yes, this cause significant battery drain. :D

Blaizzen 2011-09-30 16:23

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
1 Attachment(s)
Quote:

Originally Posted by sakya (Post 1099656)
80%? Wow! :)
Yes, this cause significant battery drain. :D

I added some movie->stop(); and movie->start(); in places I thought might run when its hidden and got the usage down to 0 when its not visible (I think). Provided people don't constantly have the lockscreen up, it should be fine... maybe :p

Also fixed the issue with the background taking over everything :D

I've uploaded the lockscreen files with the changes cause I can't remember all the stuff I've modified tonight.

Edit: Forgot to attach... its a little late here :(

sakya 2011-09-30 16:49

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
I'll have a look at it, thanks.

ed_boner 2011-09-30 18:35

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
hi guys..great apps, congratulations to sakya and all the comunity members contributing...
one question...is it possible to change language locale from the configuration app globally to all the installed lockscreens?
also it would be nice if whatever the lockscreen is we could change the background to a custom image inside the configurator as well...just an ideia...tks once again to all.

ed_boner 2011-09-30 18:38

Re: [Announce] QtLockscreen: highly configurable lockscreen replacement
 
...sorry..i believe i should have posted this in another thread...


All times are GMT. The time now is 19:12.

vBulletin® Version 3.8.8