X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=rotatingbackground.cpp;h=10dd5cdb6847caf342365f94a625b344a8597509;hb=a281db4ab879eb5ac443678e38891f197900706f;hp=13da33b6cd8812fd453da274a47568677fdfde88;hpb=24d869f598e285f62d7b27d7a4c66794316eb260;p=fapman diff --git a/rotatingbackground.cpp b/rotatingbackground.cpp index 13da33b..10dd5cd 100644 --- a/rotatingbackground.cpp +++ b/rotatingbackground.cpp @@ -26,8 +26,13 @@ RotatingBackground::RotatingBackground(QWidget *parent) : connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged())); } +RotatingBackground::~RotatingBackground() +{ +} + void RotatingBackground::loadWallpaper() { + /* QString loadfile = "/home/user/.backgrounds/background-1.png"; QFileInfo custombg("/root/.fapman/wallpaper.png"); bool custom = false; @@ -35,6 +40,8 @@ void RotatingBackground::loadWallpaper() loadfile = "/root/.fapman/wallpaper.png"; custom = true; } + */ + QString loadfile = "/root/.fapman/wallpaper.png"; iWallpaperLandscape.load(loadfile); if( !iWallpaperLandscape.isNull() ) { @@ -43,6 +50,7 @@ void RotatingBackground::loadWallpaper() iWallpaperPortrait = iWallpaperLandscape.transformed(t); } + /* if( !custom && !iWallpaperLandscape.isNull() && !iWallpaperPortrait.isNull() ) { QPainter l( &iWallpaperLandscape ); @@ -58,6 +66,7 @@ void RotatingBackground::loadWallpaper() l.drawRect( 0, 0, iWallpaperLandscape.rect().width(), iWallpaperLandscape.rect().height() ); p.drawRect( 0, 0, iWallpaperPortrait.rect().width(), iWallpaperPortrait.rect().height() ); } + */ } void RotatingBackground::paintEvent(QPaintEvent *) @@ -77,12 +86,11 @@ void RotatingBackground::paintEvent(QPaintEvent *) } } -void RotatingBackground::resizeEvent(QResizeEvent *) +void RotatingBackground::resizeEvent(QResizeEvent* event) { - this->resize( dynamic_cast(parent())->size() ); + QWidget::resizeEvent(event); } void RotatingBackground::orientationChanged() { - resizeEvent(0); }