cmmanager/cmapplsettingsui/src/cmapplsettingsui_p.cpp
changeset 23 7ec726f93df1
parent 20 9c97ad6591ae
equal deleted inserted replaced
20:9c97ad6591ae 23:7ec726f93df1
     1 /*
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0""
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8 *
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:
    14 * Description:
    15 * CM Manager Application Settings UI private implementation.  
    15 * CM Manager Application Settings UI private implementation.  
    16 *
       
    17 */
    16 */
    18 
    17 
    19 // System includes
    18 // System includes
    20 
    19 
    21 #include <QTranslator>
    20 #include <HbTranslator>
    22 #include <HbApplication>
    21 #include <HbApplication>
    23 #include <HbLabel>
    22 #include <HbLabel>
    24 #include <HbListDialog>
       
    25 #include <cmmanager_shim.h>
    23 #include <cmmanager_shim.h>
    26 
    24 
    27 // User includes
    25 // User includes
    28 
    26 
    29 #include "cmradiodialog.h"
    27 #include "cmradiodialog.h"
    30 #include "cmapplsettingsui_p.h"
    28 #include "cmapplsettingsui_p.h"
       
    29 
    31 #include "OstTraceDefinitions.h"
    30 #include "OstTraceDefinitions.h"
    32 #ifdef OST_TRACE_COMPILER_IN_USE
    31 #ifdef OST_TRACE_COMPILER_IN_USE
    33 #include "cmapplsettingsui_pTraces.h"
    32 #include "cmapplsettingsui_pTraces.h"
    34 #endif
    33 #endif
    35 
    34 
    38     \class CmApplSettingsUiPrivate
    37     \class CmApplSettingsUiPrivate
    39     \brief Private implementation class for Application Settings UI.
    38     \brief Private implementation class for Application Settings UI.
    40 
    39 
    41     Displays a radio button list dialog for an application that can be used
    40     Displays a radio button list dialog for an application that can be used
    42     to select a destination or connection method.
    41     to select a destination or connection method.
    43 
       
    44 */
    42 */
    45 
    43 
    46 // External function prototypes
    44 // External function prototypes
    47 
    45 
    48 // Local constants
    46 // Local constants
    57     @param q_pointer Parent object.
    55     @param q_pointer Parent object.
    58  */
    56  */
    59 CmApplSettingsUiPrivate::CmApplSettingsUiPrivate(CmApplSettingsUi *q_pointer) :
    57 CmApplSettingsUiPrivate::CmApplSettingsUiPrivate(CmApplSettingsUi *q_pointer) :
    60     QObject(q_pointer),
    58     QObject(q_pointer),
    61     q_ptr(q_pointer),
    59     q_ptr(q_pointer),
    62     mAppTranslator(new QTranslator(this)),
    60     mTranslator(new HbTranslator("cmapplsettingsui")),
    63     mCommonTranslator(new QTranslator(this)),
       
    64     mListItems(
    61     mListItems(
    65         CmApplSettingsUi::ShowDestinations |
    62         CmApplSettingsUi::ShowDestinations |
    66         CmApplSettingsUi::ShowConnectionMethods),
    63         CmApplSettingsUi::ShowConnectionMethods),
    67     mSettingData(),
    64     mSettingData(),
    68     mDestinationDialog(0),
    65     mDestinationDialog(0),
    75     
    72     
    76     // Initialize to default selection
    73     // Initialize to default selection
    77     mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
    74     mSelection.result = CmApplSettingsUi::SelectionTypeDestination;
    78     mSelection.id = 0;
    75     mSelection.id = 0;
    79         
    76         
    80     // Install common localization
    77     // Install also common localization
    81     QString lang = QLocale::system().name(); 
    78     mTranslator->loadCommon();
    82     QString path = "Z:/resource/qt/translations/"; 
       
    83     bool loadStatus = mCommonTranslator->load("common_" + lang, path);
       
    84     qApp->installTranslator(mCommonTranslator);
       
    85     
       
    86     // Install this library's localization
       
    87     loadStatus = mAppTranslator->load("cmapplsettingsui_" + lang, path);
       
    88     qApp->installTranslator(mAppTranslator);
       
    89 
    79 
    90     OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_CMAPPLSETTINGSUIPRIVATE_EXIT);
    80     OstTraceFunctionExit0(CMAPPLSETTINGSUIPRIVATE_CMAPPLSETTINGSUIPRIVATE_EXIT);
    91 }
    81 }
    92 
    82 
    93 /*!
    83 /*!