securitydialogs/Autolock/indicatorplugin/autolockindicators.h
author hgs
Tue, 28 Sep 2010 14:03:54 +0300
changeset 59 881d92421467
permissions -rw-r--r--
201037_03
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
59
881d92421467 201037_03
hgs
parents:
diff changeset
     1
/*
881d92421467 201037_03
hgs
parents:
diff changeset
     2
* ============================================================================
881d92421467 201037_03
hgs
parents:
diff changeset
     3
*  Name        : autolockindicators.h
881d92421467 201037_03
hgs
parents:
diff changeset
     4
*  Part of     : hb /
881d92421467 201037_03
hgs
parents:
diff changeset
     5
*  Description :
881d92421467 201037_03
hgs
parents:
diff changeset
     6
*  Version     : %version: 1 %
881d92421467 201037_03
hgs
parents:
diff changeset
     7
*
881d92421467 201037_03
hgs
parents:
diff changeset
     8
*  Copyright (c) 2009 Nokia.  All rights reserved.
881d92421467 201037_03
hgs
parents:
diff changeset
     9
*  This material, including documentation and any related computer
881d92421467 201037_03
hgs
parents:
diff changeset
    10
*  programs, is protected by copyright controlled by Nokia.  All
881d92421467 201037_03
hgs
parents:
diff changeset
    11
*  rights are reserved.  Copying, including reproducing, storing,
881d92421467 201037_03
hgs
parents:
diff changeset
    12
*  adapting or translating, any or all of this material requires the
881d92421467 201037_03
hgs
parents:
diff changeset
    13
*  prior written consent of Nokia.  This material also contains
881d92421467 201037_03
hgs
parents:
diff changeset
    14
*  confidential information which may not be disclosed to others
881d92421467 201037_03
hgs
parents:
diff changeset
    15
*  without the prior written consent of Nokia.
881d92421467 201037_03
hgs
parents:
diff changeset
    16
* ============================================================================
881d92421467 201037_03
hgs
parents:
diff changeset
    17
*/
881d92421467 201037_03
hgs
parents:
diff changeset
    18
881d92421467 201037_03
hgs
parents:
diff changeset
    19
#ifndef AUTOLOCKINDICATORS_H
881d92421467 201037_03
hgs
parents:
diff changeset
    20
#define AUTOLOCKINDICATORS_H
881d92421467 201037_03
hgs
parents:
diff changeset
    21
881d92421467 201037_03
hgs
parents:
diff changeset
    22
#include <hbindicatorinterface.h>
881d92421467 201037_03
hgs
parents:
diff changeset
    23
#include <QMetaType>
881d92421467 201037_03
hgs
parents:
diff changeset
    24
#include <QString>
881d92421467 201037_03
hgs
parents:
diff changeset
    25
881d92421467 201037_03
hgs
parents:
diff changeset
    26
static const char *IndicatorNameTemplate = "com.nokia.hb.indicator.autolock.autolock_%1/1.0";
881d92421467 201037_03
hgs
parents:
diff changeset
    27
881d92421467 201037_03
hgs
parents:
diff changeset
    28
enum Interaction
881d92421467 201037_03
hgs
parents:
diff changeset
    29
{
881d92421467 201037_03
hgs
parents:
diff changeset
    30
    InteractionNone,
881d92421467 201037_03
hgs
parents:
diff changeset
    31
    ChangeContent,
881d92421467 201037_03
hgs
parents:
diff changeset
    32
    Deactivate,
881d92421467 201037_03
hgs
parents:
diff changeset
    33
    ChangeOrientation
881d92421467 201037_03
hgs
parents:
diff changeset
    34
};
881d92421467 201037_03
hgs
parents:
diff changeset
    35
881d92421467 201037_03
hgs
parents:
diff changeset
    36
inline QString indicatorName(int indicatorType) {
881d92421467 201037_03
hgs
parents:
diff changeset
    37
    return QString(IndicatorNameTemplate).arg(indicatorType);
881d92421467 201037_03
hgs
parents:
diff changeset
    38
}
881d92421467 201037_03
hgs
parents:
diff changeset
    39
881d92421467 201037_03
hgs
parents:
diff changeset
    40
struct IndicatorInfo
881d92421467 201037_03
hgs
parents:
diff changeset
    41
{
881d92421467 201037_03
hgs
parents:
diff changeset
    42
    const char *icon;
881d92421467 201037_03
hgs
parents:
diff changeset
    43
    const char *iconMono;
881d92421467 201037_03
hgs
parents:
diff changeset
    44
    const char *primaryText;
881d92421467 201037_03
hgs
parents:
diff changeset
    45
    const char *secondaryText;
881d92421467 201037_03
hgs
parents:
diff changeset
    46
    HbIndicatorInterface::Category category;
881d92421467 201037_03
hgs
parents:
diff changeset
    47
    Interaction interaction;
881d92421467 201037_03
hgs
parents:
diff changeset
    48
};
881d92421467 201037_03
hgs
parents:
diff changeset
    49
881d92421467 201037_03
hgs
parents:
diff changeset
    50
Q_DECLARE_METATYPE(IndicatorInfo)
881d92421467 201037_03
hgs
parents:
diff changeset
    51
881d92421467 201037_03
hgs
parents:
diff changeset
    52
static const int IndicatorCount = 10;
881d92421467 201037_03
hgs
parents:
diff changeset
    53
static const IndicatorInfo IndicatorInfos[IndicatorCount] = {
881d92421467 201037_03
hgs
parents:
diff changeset
    54
    {"navi_left.svg", "qtg_mono_settings.svg", "Notification indicator 1", "no interaction", HbIndicatorInterface::NotificationCategory, InteractionNone},
881d92421467 201037_03
hgs
parents:
diff changeset
    55
    {"qt_prog_bar_play.svg","qtg_status_new_email.svg", "Notification indicator 2", "deactivates, when clicked (additional to test the text truncation.)", HbIndicatorInterface::NotificationCategory, Deactivate},
881d92421467 201037_03
hgs
parents:
diff changeset
    56
    {"hb_vol_slider_increment_pressed.svg", "qtg_status_new_email.svg", "Notification indicator 3", "changes content", HbIndicatorInterface::NotificationCategory, ChangeContent},
881d92421467 201037_03
hgs
parents:
diff changeset
    57
    {"hb_vol_slider_muted.svg", "qtg_status_new_email.svg", "Notification indicator 4", "changes content, when clicked", HbIndicatorInterface::NotificationCategory, ChangeContent},
881d92421467 201037_03
hgs
parents:
diff changeset
    58
    {"qgn_menu_pinb.svg", "qgn_menu_pinb.svg", "Progress indicator 1", "no interaction", HbIndicatorInterface::ProgressCategory, InteractionNone},
881d92421467 201037_03
hgs
parents:
diff changeset
    59
    {"qgn_menu_note.svg", "qgn_menu_note.svg", "Progress indicator 2", "changes content, when clicked", HbIndicatorInterface::ProgressCategory, ChangeContent},
881d92421467 201037_03
hgs
parents:
diff changeset
    60
    {"note_error.svg", "note_error.svg", "Progress indicator 3", "changes orientation, when clicked", HbIndicatorInterface::ProgressCategory, ChangeOrientation},
881d92421467 201037_03
hgs
parents:
diff changeset
    61
    {"note_info.svg", "note_info.svg", "Progress indicator 4", "changes content, when clicked", HbIndicatorInterface::ProgressCategory, ChangeContent},
881d92421467 201037_03
hgs
parents:
diff changeset
    62
    {"qtg_large_device_lock.svg", "qtg_large_device_lock.svg", "Keyguard Enabled", "Keyguard Enabled", HbIndicatorInterface::SettingCategory, InteractionNone},
881d92421467 201037_03
hgs
parents:
diff changeset
    63
    {"qgn_menu_phob.svg", "qgn_menu_phob.svg", "Devicelock Enabled", "Devicelock Enabled", HbIndicatorInterface::SettingCategory, InteractionNone}
881d92421467 201037_03
hgs
parents:
diff changeset
    64
};
881d92421467 201037_03
hgs
parents:
diff changeset
    65
881d92421467 201037_03
hgs
parents:
diff changeset
    66
881d92421467 201037_03
hgs
parents:
diff changeset
    67
#endif // AUTOLOCKINDICATORS_H