Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:raulpiiber
ividesktop
desktopwindow.cpp
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File desktopwindow.cpp of Package ividesktop
/*************************************************************************** ** ** desktopwindow - Top level QGraphicsScene for the desktop ** Copyright (c) <2010>, Intel Corporation. ** ** This program is free software; you can redistribute it and/or modify it ** under the terms and conditions of the GNU Lesser General Public License, ** version 2.1, as published by the Free Software Foundation. ** ** This program is distributed in the hope it will be useful, but WITHOUT ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ** FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for ** more details. ** ** You should have received a copy of the GNU Lesser General Public License along with ** this program; if not, write to the Free Software Foundation, Inc., ** 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. ** **************************************************************************/ #include "desktopwindow.h" DesktopWindow::DesktopWindow() { m_backgroundImage.setPos(0, 0); m_backgroundImage.setVisible(true); m_backgroundImage.setZValue(-1); addItem(&m_backgroundImage); } void DesktopWindow::setBackgroundImage(const QRect &rect, QString fullpath) { QPixmap pixmap = QPixmap(fullpath); m_backgroundImage.setPixmap(pixmap.scaled(rect.size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); m_backgroundImage.setPos(rect.x(), rect.y()); } void DesktopWindow::resizeBackgroundImage(const QRect &rect) { QPixmap pixmap = m_backgroundImage.pixmap(); m_backgroundImage.setPixmap(pixmap.scaled(rect.size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); m_backgroundImage.setPos(rect.x(), rect.y()); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor