controlpanelui/src/cpplugins/displayplugin/src/cpdisplaymodel.cpp
changeset 10 0a74be98a8bc
child 11 10d0dd0e43f1
equal deleted inserted replaced
0:254040eb3b7d 10:0a74be98a8bc
       
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0""
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:  
       
    15  *   
       
    16  */
       
    17 
       
    18 #include <qglobal.h>
       
    19 #include "cpdisplaymodel.h"
       
    20 
       
    21 #ifdef Q_OS_SYMBIAN
       
    22 #include "cpdisplaymodel_p.h"
       
    23 #endif
       
    24 
       
    25 CpDisplayModel::CpDisplayModel()
       
    26 {
       
    27 #ifdef Q_OS_SYMBIAN
       
    28     ptr = new CpDisplayModelPrivate();
       
    29 #endif
       
    30 }
       
    31 
       
    32 CpDisplayModel::~CpDisplayModel()
       
    33 {
       
    34 #ifdef Q_OS_SYMBIAN
       
    35     delete ptr;
       
    36     ptr = 0;
       
    37 #endif
       
    38 }
       
    39 
       
    40 bool CpDisplayModel::isKeyguardSupported()
       
    41 {
       
    42 #ifdef Q_OS_SYMBIAN
       
    43     return ptr->isKeyguardSupported();
       
    44 #else
       
    45     return 0;
       
    46 #endif
       
    47 }
       
    48 
       
    49 int CpDisplayModel::keyguard()
       
    50 {
       
    51 #ifdef Q_OS_SYMBIAN
       
    52     return ptr->keyguard();
       
    53 #else
       
    54     return 0;
       
    55 #endif
       
    56 }
       
    57 
       
    58 void CpDisplayModel::setKeyguard(int value)
       
    59 {
       
    60 #ifdef Q_OS_SYMBIAN
       
    61     ptr->setKeyguard(value);
       
    62 #else
       
    63     Q_UNUSED(value);
       
    64 #endif
       
    65 }
       
    66 
       
    67 bool CpDisplayModel::isBacklightSupported()
       
    68 {
       
    69 #ifdef Q_OS_SYMBIAN
       
    70     return ptr->isBacklightSupported();
       
    71 #else
       
    72 	return false;
       
    73 #endif
       
    74 }
       
    75 
       
    76 int CpDisplayModel::backlight()
       
    77 {
       
    78 #ifdef Q_OS_SYMBIAN
       
    79     return ptr->backlight();
       
    80 #else
       
    81     return 0;
       
    82 #endif
       
    83 }
       
    84 
       
    85 void CpDisplayModel::setBacklight(int value)
       
    86 {
       
    87 #ifdef Q_OS_SYMBIAN
       
    88     ptr->setBacklight(value);
       
    89 #else
       
    90     Q_UNUSED(value);
       
    91 #endif
       
    92 }
       
    93 
       
    94 bool CpDisplayModel::isBrightnessSupported()
       
    95 {
       
    96 #ifdef Q_OS_SYMBIAN
       
    97     return ptr->isBrightnessSupported();
       
    98 #else
       
    99 	return false;
       
   100 #endif
       
   101 }
       
   102 
       
   103 int CpDisplayModel::brightness()
       
   104 {
       
   105 #ifdef Q_OS_SYMBIAN
       
   106     return ptr->brightness();
       
   107 #else
       
   108     return 0;
       
   109 #endif    
       
   110 }
       
   111 
       
   112 void CpDisplayModel::setBrightness(int value)
       
   113 {
       
   114 #ifdef Q_OS_SYMBIAN
       
   115     ptr->setBrightness(value);
       
   116 #else
       
   117     Q_UNUSED(value);
       
   118 #endif
       
   119 }
       
   120 
       
   121 // End of the file