filebrowser/ui/inc/filebrowsersettings.h
branchRCL_3
changeset 21 b3cee849fa46
equal deleted inserted replaced
20:48060abbbeaf 21:b3cee849fa46
       
     1 /*
       
     2 * Copyright (c) 2010 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 #ifndef FILEBROWSERSETTINGS_H_
       
    19 #define FILEBROWSERSETTINGS_H_
       
    20 
       
    21 #include "engine.h"
       
    22 #include "enginewrapper.h"
       
    23 
       
    24 #include <QString>
       
    25 
       
    26 /**
       
    27   * Settings class that is used for ui settings handling
       
    28   */
       
    29 class FileBrowserSettings
       
    30 {
       
    31 public:
       
    32     FileBrowserSettings(TFileBrowserSettings *aSettings) : mSettings(aSettings) { }
       
    33     ~FileBrowserSettings() { }
       
    34 
       
    35     int displayMode() const { return mSettings->iDisplayMode; }
       
    36     void setDisplayMode(int displayMode) { mSettings->iDisplayMode = displayMode; }
       
    37 
       
    38     int fileViewMode() const { return mSettings->iFileViewMode; }
       
    39     void setFileViewMode(int fileViewMode) { mSettings->iFileViewMode = fileViewMode; }
       
    40 
       
    41     bool showSubDirectoryInfo() const { return mSettings->iShowSubDirectoryInfo; }
       
    42     void setShowSubDirectoryInfo(bool showSubDirectoryInfo) { mSettings->iShowSubDirectoryInfo = showSubDirectoryInfo; }
       
    43 
       
    44     bool showAssociatedIcons() const { return mSettings->iShowAssociatedIcons; }
       
    45     void setShowAssociatedIcons(bool showAssociatedIcons) { mSettings->iShowAssociatedIcons = showAssociatedIcons; }
       
    46 
       
    47     bool rememberLastPath() const { return mSettings->iRememberLastPath; }
       
    48     void setRememberLastPath(bool rememberLastPath) { mSettings->iRememberLastPath = rememberLastPath; }
       
    49 
       
    50     QString lastPath() const { return QString((QChar*)mSettings->iLastPath.Ptr(),mSettings->iLastPath.Length()); }
       
    51     void lastPath(const QString& lastPath) { mSettings->iLastPath = lastPath.utf16(); }
       
    52 
       
    53     bool rememberFolderSelection() const { return mSettings->iRememberFolderSelection; }
       
    54     void setRememberFolderSelection(bool rememberFolderSelection) { mSettings->iRememberFolderSelection = rememberFolderSelection; }
       
    55 
       
    56     bool enableToolbar() const { return mSettings->iEnableToolbar; }
       
    57     void setEnableToolbar(bool enableToolbar) { mSettings->iEnableToolbar = enableToolbar; }
       
    58 
       
    59     bool supportNetworkDrives() const { return mSettings->iSupportNetworkDrives; }
       
    60     void setSupportNetworkDrives(bool supportNetworkDrives) { mSettings->iSupportNetworkDrives = supportNetworkDrives; }
       
    61 
       
    62     bool bypassPlatformSecurity() const { return mSettings->iBypassPlatformSecurity; }
       
    63     void setBypassPlatformSecurity(bool bypassPlatformSecurity) { mSettings->iBypassPlatformSecurity = bypassPlatformSecurity; }
       
    64 
       
    65     bool removeFileLocks() const { return mSettings->iRemoveFileLocks; }
       
    66     void setRemoveFileLocks(bool removeFileLocks) { mSettings->iRemoveFileLocks = removeFileLocks; }
       
    67 
       
    68     bool ignoreProtectionsAttributes() const { return mSettings->iIgnoreProtectionsAtts; }
       
    69     void setIgnoreProtectionsAttributes(bool ignoreProtectionsAttributes) { mSettings->iIgnoreProtectionsAtts = ignoreProtectionsAttributes; }
       
    70 
       
    71     bool removeROMWriteProrection() const { return mSettings->iRemoveROMWriteProrection; }
       
    72     void setRemoveROMWriteProrection(bool removeROMWriteProrection) { mSettings->iRemoveROMWriteProrection = removeROMWriteProrection; }
       
    73 
       
    74 private:
       
    75     TFileBrowserSettings *mSettings;
       
    76 };
       
    77 
       
    78 #endif /* FILEBROWSERSETTINGS_H_ */