src/hbcore/utils/hbscreenmode_p.cpp
changeset 5 627c4a0fd0e7
parent 0 16d8024aca5e
equal deleted inserted replaced
3:11d3954df52a 5:627c4a0fd0e7
    21 ** If you have questions regarding the use of this file, please contact
    21 ** If you have questions regarding the use of this file, please contact
    22 ** Nokia at developer.feedback@nokia.com.
    22 ** Nokia at developer.feedback@nokia.com.
    23 **
    23 **
    24 ****************************************************************************/
    24 ****************************************************************************/
    25 
    25 
       
    26 #include "hbscreenmode_p.h"
    26 #include <QSize>
    27 #include <QSize>
    27 #include <QSizeF>
    28 #include <QSizeF>
    28 
    29 
    29 #include "hbscreenmode_p.h"
    30 class HbScreenModePrivate
    30 
       
    31 // ======== MEMBER FUNCTIONS ========
       
    32 
       
    33 class HbScreenModePrivate 
       
    34 {
    31 {
    35 public:
    32 public:
    36     HbScreenModePrivate();
    33     HbScreenModePrivate();
    37     
    34 
    38 public: 
    35 public:
    39     QSize mSize;
    36     QSize mSize;
    40     QSizeF mTwipsSize;
    37     QSizeF mTwipsSize;
    41     int mRotation; // in degrees. How the device would be moved to see/go into this mode
    38     int mRotation; // in degrees. How the device would be moved to see/go into this mode
    42     QString mStyleName;
    39     QString mStyleName;
    43     };
    40 };
    44 
    41 
    45 HbScreenModePrivate::HbScreenModePrivate() :
    42 HbScreenModePrivate::HbScreenModePrivate() :
    46     mSize(-1,-1),
    43     mSize(-1, -1),
    47     mTwipsSize(-1.0F,-1.0F),
    44     mTwipsSize(-1.0F, -1.0F),
    48     mRotation(0)
    45     mRotation(0)
    49 {   
    46 {
    50 }
    47 }
    51 
    48 
    52 /*!
    49 /*!
    53     \class HbScreenMode
    50     \class HbScreenMode
    54     \brief Information for a single screen including screen pixel size, rotation, physical size
    51     \brief Information for a single screen including screen pixel size, rotation, physical size
    55 
    52 
    56     A single screen mode represents a physical operation mode of a display. Separate modes may be 
    53     A single screen mode represents a physical operation mode of a display. Separate modes may be
    57     distinguished by a rotation, an opening or closing of a cover, or touch enabled or not
    54     distinguished by a rotation, an opening or closing of a cover, or touch enabled or not
    58     
    55 
    59     This class should be considered as a abstraction of the underlying operating system's way of reporting 
    56     This class should be considered as a abstraction of the underlying operating system's way of reporting
    60     its information. 
    57     its information.
    61         
    58 
    62 */
    59 */
    63 
    60 
    64 // ======== MEMBER FUNCTIONS ========
    61 // ======== MEMBER FUNCTIONS ========
    65 
    62 
    66 /*!
    63 /*!
    67     Construct a screen mode with invalid information
    64     Construct a screen mode with invalid information
    68 */
    65 */
    69 HbScreenMode::HbScreenMode()
    66 HbScreenMode::HbScreenMode()
    70 :   d_ptr(new HbScreenModePrivate())
    67     :   d_ptr(new HbScreenModePrivate())
    71 {
    68 {
    72 }
    69 }
    73 
    70 
    74 /*!
    71 /*!
    75     Copy constructor
    72     Copy constructor
    76 */
    73 */
    77 HbScreenMode::HbScreenMode(const HbScreenMode &mode)
    74 HbScreenMode::HbScreenMode(const HbScreenMode &mode)
    78 :   d_ptr(new HbScreenModePrivate())
    75     :   d_ptr(new HbScreenModePrivate())
    79 {
    76 {
    80     *d_ptr = *mode.d_ptr;
    77     *d_ptr = *mode.d_ptr;
    81 }
    78 }
    82 
    79 
    83 /*!
    80 /*!