src/gui/styles/qs60style_simulated.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
child 7 f7bc934e204c
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
     9 ** $QT_BEGIN_LICENSE:LGPL$
     9 ** $QT_BEGIN_LICENSE:LGPL$
    10 ** No Commercial Usage
    10 ** No Commercial Usage
    11 ** This file contains pre-release code and may not be distributed.
    11 ** This file contains pre-release code and may not be distributed.
    12 ** You may use this file in accordance with the terms and conditions
    12 ** You may use this file in accordance with the terms and conditions
   187         option
   187         option
   188     );
   188     );
   189 }
   189 }
   190 
   190 
   191 QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part, const QSize &size,
   191 QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part, const QSize &size,
   192                                QS60StylePrivate::SkinElementFlags flags)
   192                                QPainter *painter, QS60StylePrivate::SkinElementFlags flags)
   193 {
   193 {
       
   194     Q_UNUSED(painter);
       
   195 
   194     const QString partKey = QS60Style::partKeys().at(part);
   196     const QString partKey = QS60Style::partKeys().at(part);
   195     const QPicture partPicture = QS60StyleModeSpecifics::m_partPictures.value(partKey);
   197     const QPicture partPicture = QS60StyleModeSpecifics::m_partPictures.value(partKey);
   196     QSize partSize(partPicture.boundingRect().size());
   198     QSize partSize(partPicture.boundingRect().size());
   197     if (flags & (SF_PointEast | SF_PointWest)) {
   199     if (flags & (SF_PointEast | SF_PointWest)) {
   198         const int temp = partSize.width();
   200         const int temp = partSize.width();
   304 #endif
   306 #endif
   305 
   307 
   306     return result;
   308     return result;
   307 }
   309 }
   308 
   310 
   309 void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value)
       
   310 {
       
   311     setStyleProperty(name, value);
       
   312 }
       
   313 
       
   314 QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
       
   315 {
       
   316     return styleProperty(name);
       
   317 }
       
   318 
       
   319 QPixmap QS60StylePrivate::backgroundTexture()
   311 QPixmap QS60StylePrivate::backgroundTexture()
   320 {
   312 {
   321     if (!m_background) {
   313     if (!m_background) {
   322         const QSize size = QApplication::desktop()->screen()->size();
   314         const QSize size = QApplication::desktop()->screen()->size();
   323         QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen, size);
   315         QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen, size, 0);
   324         m_background = new QPixmap(background);
   316         m_background = new QPixmap(background);
   325     }
   317     }
   326     return *m_background;
   318     return *m_background;
   327 }
   319 }
   328 
   320 
   341 }
   333 }
   342 
   334 
   343 bool QS60StylePrivate::isToolBarBackground()
   335 bool QS60StylePrivate::isToolBarBackground()
   344 {
   336 {
   345     return true;
   337     return true;
       
   338 }
       
   339 
       
   340 bool QS60StylePrivate::hasSliderGrooveGraphic()
       
   341 {
       
   342     return false;
   346 }
   343 }
   347 
   344 
   348 QFont QS60StylePrivate::s60Font_specific(QS60StyleEnums::FontCategories fontCategory, int pointSize)
   345 QFont QS60StylePrivate::s60Font_specific(QS60StyleEnums::FontCategories fontCategory, int pointSize)
   349 {
   346 {
   350     QFont result;
   347     QFont result;