--- a/controlpanelplugins/themeplugin/image/qgn_menu_note.svg Fri Jun 11 13:39:17 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg width="100%" height="100%" viewBox="0 0 88 88">
-<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="46.99" y1="48.62" x2="57.59" y2="67.17">
-<stop stop-color="#A2C2DD" offset="0.1"/>
-<stop stop-color="#6C83BB" offset="0.71"/>
-<stop stop-color="#003D6D" offset="0.99"/>
-</linearGradient>
-<path fill="url(#_20)" d="M37.755,14.563c-0.625-0.15-3.215-0.771-3.215-0.771l-6.344,9.318 C14.325,41.71,3.561,47.928,2.801,48.401l6.468,2.128l-1.694,2.4l1.111,3.48l41.153,18.198l14.238-26.409l16.804-2.157l2.899-4.356 l-1.079-7.683l-3.737-4.507l-5.312,0.944l0.463-0.857l0.251-6.262c0,0-4.423-1.069-4.374-1.063 c-0.755-3.548-4.226-3.896-6.26-1.475c-0.013-0.005-2.825-0.708-2.818-0.712c-0.742-3.492-4.2-3.939-6.269-1.469 c-0.004-0.012-2.582-0.668-2.595-0.661c-0.749-3.501-4.18-3.806-6.163-1.437c-0.027,0.008-2.09-0.508-2.088-0.523 C43.063,12.593,39.706,12.258,37.755,14.563z"/>
-<polygon fill="#FFFFFF" points="35.11,15.12 8.336,53.049 48.798,69.047 72.646,28.459 73.573,25.04 "/>
-<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="30.63" y1="59.56" x2="27.89" y2="65.83">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#496DA2" offset="0.71"/>
-<stop stop-color="#235487" offset="0.99"/>
-</linearGradient>
-<polygon fill="url(#_21)" points="8.45,52.959 48.528,68.704 49.52,73.706 9.246,55.897 "/>
-<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="56.86" y1="45.11" x2="69.16" y2="54.68">
-<stop stop-color="#DEE9F3" offset="0"/>
-<stop stop-color="#235487" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_22)" points="48.528,68.704 73.633,23.86 73.411,29.393 49.52,73.706 "/>
-<linearGradient id="_23" gradientUnits="userSpaceOnUse" x1="4.44" y1="38.62" x2="45.79" y2="38.62">
-<stop stop-color="#CADCEC" offset="0"/>
-<stop stop-color="#87A8CB" offset="1"/>
-</linearGradient>
-<path fill="url(#_23)" d="M34.894,14.715C18.737,39.471,4.443,48.209,4.443,48.209 c7.75,2.391,41.35,14.314,41.35,14.314L34.894,14.715z"/>
-<linearGradient id="_24" gradientUnits="userSpaceOnUse" x1="15.64" y1="58.6" x2="44.93" y2="34.82">
-<stop stop-color="#FFFFFF" offset="0.15"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<path fill="url(#_24)" d="M10.557,50.247c11.41,4.494,35.236,12.277,35.236,12.277 c15.358-11.682,27.74-38.658,27.74-38.658l-38.697-9.279L10.557,50.247z"/>
-<linearGradient id="_25" gradientUnits="userSpaceOnUse" x1="68.03" y1="52.73" x2="41.63" y2="18.62">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#496DA2" offset="0.71"/>
-<stop stop-color="#235487" offset="0.99"/>
-</linearGradient>
-<polygon fill="url(#_25)" points="33.619,23.77 33.263,24.6 64.586,33.327 64.445,31.303 "/>
-<polygon fill="url(#_25)" points="30.349,28.944 29.959,29.764 60.965,39.577 60.895,37.549 "/>
-<polygon fill="url(#_25)" points="26.981,34.229 26.567,35.036 57.195,45.958 57.195,43.926 "/>
-<polyline fill="url(#_25)" points="37.03,44.815 23.809,40.569 23.396,41.375 34.393,45.297 37.03,44.815 "/>
-<path fill="#3F5AA6" d="M37.265,17.37c-1.227,0.744-1.05,2.494,0.11,3.184c1.821,1.088,4.019-0.83,2.968-2.572 c0.449-1.01,1.511-1.695,1.794-1.643l1.055,0.223C42.339,13.018,37.265,17.37,37.265,17.37z"/>
-<linearGradient id="_29" gradientUnits="userSpaceOnUse" x1="39.83" y1="18.64" x2="40.83" y2="14.3">
-<stop stop-color="#87A8CB" offset="0"/>
-<stop stop-color="#CADCEC" offset="0.5"/>
-<stop stop-color="#87A8CB" offset="1"/>
-</linearGradient>
-<path fill="url(#_29)" d="M38.914,19.569c-0.589,0.107-1.317-0.102-1.613-0.867c-0.736-5.027,5.301-6.996,5.913-2.141 C42.121,14.176,39.059,15.401,38.914,19.569z"/>
-<path fill="#3F5AA6" d="M45.395,19.34c-1.25,0.758-1.071,2.543,0.112,3.248c1.859,1.107,4.099-0.848,3.027-2.625 c0.458-1.031,1.542-1.729,1.83-1.676l1.076,0.227C50.57,14.901,45.395,19.34,45.395,19.34z"/>
-<path fill="url(#_29)" d="M47.076,21.584c-0.601,0.107-1.342-0.105-1.645-0.887c-0.75-5.129,5.407-7.137,6.031-2.184 C50.348,16.081,47.225,17.331,47.076,21.584z"/>
-<path fill="#3F5AA6" d="M54.135,21.483c-1.274,0.775-1.092,2.594,0.114,3.314c1.897,1.129,4.181-0.863,3.088-2.678 c0.468-1.051,1.574-1.762,1.867-1.709l1.099,0.232C59.414,16.956,54.135,21.483,54.135,21.483z"/>
-<path fill="url(#_29)" d="M55.85,23.772c-0.611,0.111-1.367-0.107-1.676-0.902c-0.767-5.232,5.515-7.281,6.151-2.227 C59.188,18.161,56.002,19.436,55.85,23.772z"/>
-<path fill="#3F5AA6" d="M63.214,23.67c-1.275,0.775-1.093,2.596,0.114,3.314c1.897,1.131,4.181-0.863,3.088-2.678 c0.467-1.051,1.573-1.762,1.867-1.709l1.098,0.23C68.493,19.143,63.214,23.67,63.214,23.67z"/>
-<path fill="url(#_29)" d="M64.929,25.959c-0.612,0.111-1.368-0.105-1.677-0.902c-0.766-5.23,5.515-7.279,6.151-2.229 C68.267,20.348,65.081,21.624,64.929,25.959z"/>
-<linearGradient id="_33" gradientUnits="userSpaceOnUse" x1="39.98" y1="48.02" x2="38.35" y2="40.21">
-<stop stop-color="#81C7C8" offset="0"/>
-<stop stop-color="#BFDAE1" offset="0.01"/>
-<stop stop-color="#FFFFFF" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_33)" points="44.766,36.286 32.146,45.174 47.337,49.641 "/>
-<linearGradient id="_34" gradientUnits="userSpaceOnUse" x1="76.2" y1="30.96" x2="76.09" y2="43.23">
-<stop stop-color="#D6E6EC" offset="0"/>
-<stop stop-color="#298595" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_34)" points="78.675,30.256 82.024,34.297 83.039,41.52 80.464,45.389 69.202,39.09 "/>
-<linearGradient id="_35" gradientUnits="userSpaceOnUse" x1="32.44" y1="33.5" x2="65.81" y2="41.63">
-<stop stop-color="#D6E6EC" offset="0"/>
-<stop stop-color="#298595" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_35)" points="76.59,34.737 77.632,41.426 45.104,46.104 44.105,39.893 "/>
-<linearGradient id="_36" gradientUnits="userSpaceOnUse" x1="30.73" y1="46.42" x2="88.73" y2="44.8">
-<stop stop-color="#E6EEF4" offset="0"/>
-<stop stop-color="#2F8E9A" offset="0.44"/>
-<stop stop-color="#003D6D" offset="0.94"/>
-</linearGradient>
-<polygon fill="url(#_36)" points="77.632,41.426 80.464,45.389 47.337,49.641 45.104,46.104 "/>
-<linearGradient id="_37" gradientUnits="userSpaceOnUse" x1="45.63" y1="37.46" x2="101.75" y2="28.96">
-<stop stop-color="#D6E6EC" offset="0"/>
-<stop stop-color="#298595" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_37)" points="76.59,34.737 78.675,30.256 44.766,36.286 44.105,39.893 "/>
-<linearGradient id="_38" gradientUnits="userSpaceOnUse" x1="35.44" y1="45.89" x2="34.76" y2="40.93">
-<stop stop-color="#235487" offset="0"/>
-<stop stop-color="#496DA2" offset="0.5"/>
-<stop stop-color="#235487" offset="1"/>
-</linearGradient>
-<path fill="url(#_38)" d="M38.261,40.885l-6.462,4.201l7.347,2.1C38.319,46.098,37.854,42.79,38.261,40.885z"/>
-<rect fill="none" height="88" width="88"/>
-</svg>
\ No newline at end of file
Binary file controlpanelplugins/themeplugin/image/themePreview.nvg has changed
Binary file controlpanelplugins/themeplugin/image/themePreview.png has changed
--- a/controlpanelplugins/themeplugin/image/themePreview.svg Fri Jun 11 13:39:17 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg width="84" height="72" viewBox="0 0 84 72">
-<linearGradient id="_78" gradientUnits="userSpaceOnUse" x1="30.87" y1="28.75" x2="37.09" y2="60.51">
-<stop stop-color="#A2C2DD" offset="0.1"/>
-<stop stop-color="#6C83BB" offset="0.71"/>
-<stop stop-color="#003D6D" offset="0.99"/>
-</linearGradient>
-<path fill="url(#_78)" d="M23.531,11.281L5.719,42.5l1.328,2.391l24.031,6.734l17.641-13.141c0,0-0.158-2.493-0.162-2.503 c0,0-3.672-8.489-3.9-9.028c0.514-0.3,11.891-6.938,11.891-6.938l-0.109-2.859L23.531,11.281z"/>
-<path fill="url(#_78)" d="M52.281,29.016c0,0,2.75,11.217,2.875,11.734c-0.483,0.248-19.281,9.906-19.281,9.906l0.594,2.781 L59.5,63.391l19.641-32.897L78.938,27l-11.516-3.859L52.281,29.016z"/>
-<linearGradient id="_80" gradientUnits="userSpaceOnUse" x1="21.51" y1="35.87" x2="18.01" y2="49.87">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#496DA2" offset="0.71"/>
-<stop stop-color="#235487" offset="0.99"/>
-</linearGradient>
-<polygon fill="url(#_80)" points="6.549,42.57 7.615,44.447 31.021,50.963 30.717,48.865 "/>
-<linearGradient id="_81" gradientUnits="userSpaceOnUse" x1="13.09" y1="-0.2" x2="49.83" y2="61.22">
-<stop stop-color="#FFFFFF" offset="0.15"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_81)" points="43.439,25.218 55.939,17.628 23.871,12.013 6.518,42.631 30.486,48.939 33.328,46.857 "/>
-<linearGradient id="_82" gradientUnits="userSpaceOnUse" x1="47.19" y1="50.73" x2="23.44" y2="19.48">
-<stop stop-color="#FFFFFF" offset="0.15"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_82)" points="43.42,24.953 53.211,19.302 24.766,14.07 10.072,41.236 33.07,47.236 48.176,36.132 "/>
-<linearGradient id="_83" gradientUnits="userSpaceOnUse" x1="23.7" y1="56.84" x2="22.11" y2="42.87">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#A2C2DD" offset="0.35"/>
-<stop stop-color="#6C83BB" offset="0.7"/>
-<stop stop-color="#003D6D" offset="1"/>
-</linearGradient>
-<path fill="url(#_83)" d="M12.896,36.508l-2.679,4.568l22.774,6.088c0.578-0.389,0.99-0.688,1.199-0.844 C33.67,46.248,17.619,40.061,12.896,36.508z"/>
-<polygon fill="#115B7E" points="23.068,37.926 26.33,41.092 37.918,43.674 42.563,40.258 "/>
-<polygon fill="#BFDAE1" points="30.498,39.459 33.217,39.76 36.553,43.365 33.635,43.055 "/>
-<polygon fill="#2F8E9A" points="30.498,39.459 30.383,39.869 33.033,42.955 33.57,42.961 "/>
-<path fill="#298595" d="M25.684,41.143c-0.34,0.478-3.08,1.111-3.701,0.918c0.584,1.197,8.281,3.697,12.223,4.34 c1.152-0.844,2.383-1.745,3.625-2.655C37.682,43.734,29.107,42.438,25.684,41.143z"/>
-<linearGradient id="_84" gradientUnits="userSpaceOnUse" x1="21.12" y1="39.41" x2="24.58" y2="41.68">
-<stop stop-color="#D6E6EC" offset="0"/>
-<stop stop-color="#298595" offset="1"/>
-</linearGradient>
-<path fill="url(#_84)" d="M21.859,37.691c0,0,3.859,3.41,3.824,3.451c-0.486,0.532-1.895,1.582-3.225,1.356 c-1.406-0.969-1.516-2.535-1.516-2.535S21.143,38.691,21.859,37.691z"/>
-<path fill="#BFDAE1" d="M37.176,43.164c-3.891-0.346-8.678-1.727-10.75-2.424l-2.869-2.592 c2.453-0.051,12.23,1.278,18.695,2.393c0.133-0.098,0.266-0.193,0.395-0.287c-7.146-1.283-17.438-2.85-20.735-2.557 l3.785,3.512c2.773,1.098,7.793,2.355,11.797,2.68c0.063,0.006,0.117,0.006,0.178,0.01c0.293-0.215,0.588-0.428,0.879-0.643 C38.096,43.232,37.639,43.203,37.176,43.164z"/>
-<path fill="#FFFFFF" d="M43.801,25.99c-1.008,1.018-2.887,1.582-5.258,0.744c-3.121,0.617-14.422-1.703-18.314-4.434 l1.998-3.733c1.73-0.021,3.557,0.43,4.418,0.979c0.021-1.244,4.799-3.408,6.994-0.418c2.146-1.813,8.777-2.26,8.297,2.594 c1.927,0.375,2.727,1.459,2.671,2.562l-1.198,0.656L43.801,25.99z"/>
-<linearGradient id="_85" gradientUnits="userSpaceOnUse" x1="41.69" y1="29.27" x2="17.36" y2="33.57">
-<stop stop-color="#2B98A0" offset="0"/>
-<stop stop-color="#0A4A60" offset="1"/>
-</linearGradient>
-<polygon fill="url(#_85)" points="33.205,40.467 44.795,19.023 23.104,34.765 "/>
-<polygon fill="#2F8E9A" points="40.377,41.775 34.348,41.842 42.938,23.255 42.648,40.254 "/>
-<linearGradient id="_86" gradientUnits="userSpaceOnUse" x1="68.92" y1="17.39" x2="38.92" y2="25.01">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#496DA2" offset="0.71"/>
-<stop stop-color="#235487" offset="0.99"/>
-</linearGradient>
-<polygon fill="url(#_86)" points="55.939,17.628 56.088,19.786 44.148,26.745 43.408,24.939 "/>
-<linearGradient id="_87" gradientUnits="userSpaceOnUse" x1="69.87" y1="44.4" x2="30.62" y2="43.28">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#496DA2" offset="0.71"/>
-<stop stop-color="#235487" offset="0.99"/>
-</linearGradient>
-<polygon fill="url(#_87)" points="48.141,36.109 48.287,38.27 31.021,50.963 30.436,48.941 "/>
-<linearGradient id="_88" gradientUnits="userSpaceOnUse" x1="44.31" y1="7.26" x2="56.64" y2="37.42">
-<stop stop-color="#FFFFFF" offset="0.15"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<path fill="url(#_88)" d="M78.33,27.458l-11.006-3.77c-0.477,0.186-3.596,1.404-3.596,1.404l-7.695,16.415 l-16.508,7.646l-3.176,1.65l21.958,9.551L78.33,27.458z"/>
-<linearGradient id="_89" gradientUnits="userSpaceOnUse" x1="61.03" y1="50.36" x2="53.03" y2="27.86">
-<stop stop-color="#FFFFFF" offset="0.15"/>
-<stop stop-color="#A2C2DD" offset="1"/>
-</linearGradient>
-<polyline fill="url(#_89)" points="57.227,56.859 74.799,28.55 64.098,24.958 52.76,29.253 55.58,40.939 39.156,49.361 "/>
-<path fill="#298595" d="M51.652,44.461c-1.846,1.014-3.752,1.346-5.568,1.35l-4.371,2.238 C46.66,48.316,49.598,46.246,51.652,44.461z"/>
-<path fill="#115B7E" d="M49.533,44.045l-2.205,1.146c1.115-0.109,2.188-0.34,3.188-0.75 C50.252,44.324,49.916,44.189,49.533,44.045z"/>
-<path fill="#CFECFF" d="M50.516,44.441c-1.002,0.41-2.072,0.641-3.188,0.75l-1.244,0.619 c1.512,0.034,2.809-0.218,4.102-0.668c0.455-0.168,0.939-0.392,1.467-0.685c-0.438-0.19-1.729-0.615-1.729-0.615 l-0.387,0.199C49.916,44.189,50.252,44.324,50.516,44.441z"/>
-<linearGradient id="_90" gradientUnits="userSpaceOnUse" x1="51.3" y1="60.44" x2="47.14" y2="39.31">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#A2C2DD" offset="0.35"/>
-<stop stop-color="#6C83BB" offset="0.7"/>
-<stop stop-color="#003D6D" offset="1"/>
-</linearGradient>
-<path fill="url(#_90)" d="M42.832,47.469l-3.646,1.877l18.055,7.525l2.504-3.982 C59.744,52.889,53.578,48.111,42.832,47.469z"/>
-<linearGradient id="_91" gradientUnits="userSpaceOnUse" x1="83.79" y1="20.58" x2="59.13" y2="60.86">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#496DA2" offset="0.71"/>
-<stop stop-color="#235487" offset="0.99"/>
-</linearGradient>
-<polygon fill="url(#_91)" points="78.363,27.452 58.451,59.945 59.256,62.68 78.479,30.382 "/>
-<linearGradient id="_92" gradientUnits="userSpaceOnUse" x1="51.25" y1="49.13" x2="46.5" y2="59.63">
-<stop stop-color="#FFFFFF" offset="0"/>
-<stop stop-color="#496DA2" offset="0.71"/>
-<stop stop-color="#235487" offset="0.99"/>
-</linearGradient>
-<polygon fill="url(#_92)" points="58.508,59.967 36.35,50.805 36.85,52.969 59.256,62.68 "/>
-</svg>
\ No newline at end of file
--- a/controlpanelplugins/themeplugin/src/cpthemechanger_p.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemechanger_p.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -37,12 +37,17 @@
static const char* KThemePathKey = "HB_THEMES_DIR";
#endif
static const QString KDefaultTheme = "sfblacktheme";
-
+ static const QString KDefaultThemeIcon = ":/image/themePreview.nvg";
+ static const QString KPreviewThumbnailNVG = "/scalable/qtg_graf_theme_preview_thumbnail.nvg";
static const QString KPreviewThumbnailSVG = "/scalable/qtg_graf_theme_preview_thumbnail.svg";
+ static const QString KPreviewPrtNVG = "/scalable/qtg_graf_theme_preview_prt.nvg";
+ static const QString KPreviewLscNVG = "/scalable/qtg_graf_theme_preview_lsc.nvg";
static const QString KPreviewPrtSVG = "/scalable/qtg_graf_theme_preview_prt.svg";
static const QString KPreviewLscSVG = "/scalable/qtg_graf_theme_preview_lsc.svg";
-
+
+ static const QString KBackgroundPrtNVG = "/scalable/qtg_graf_screen_bg_prt.nvg";
+ static const QString KBackgroundLscNVG = "/scalable/qtg_graf_screen_bg_lsc.nvg";
static const QString KBackgroundPrtSVG = "/scalable/qtg_graf_screen_bg_prt.svg";
static const QString KBackgroundLscSVG = "/scalable/qtg_graf_screen_bg_lsc.svg";
@@ -176,59 +181,69 @@
continue;
}
- QString fullPathToIcon(iconThemePath.path() + iconPath);
-
- if(iconPath.isEmpty()|| !QFileInfo(fullPathToIcon).exists()){
+ QString fullPathToIcon(iconThemePath.path());
+
+ if(iconPath.isEmpty()|| !QFileInfo(fullPathToIcon + iconPath).exists()){
//Set thumbnail
- if(QFileInfo(fullPathToIcon + KPreviewThumbnailSVG).exists()){
+ if(QFileInfo(fullPathToIcon + KPreviewThumbnailNVG).exists()){
+ nameIconPair.icon = HbIcon(fullPathToIcon + KPreviewThumbnailNVG);
+ }else if(QFileInfo(fullPathToIcon + KPreviewThumbnailSVG).exists()){
nameIconPair.icon = HbIcon(fullPathToIcon + KPreviewThumbnailSVG);
- }else if(QFileInfo(fullPathToIcon + KBackgroundPrtSVG).exists()){
+ }else if(QFileInfo(fullPathToIcon + KBackgroundPrtNVG).exists()){
+ nameIconPair.icon = HbIcon(fullPathToIcon + KBackgroundPrtNVG);
+ } else if(QFileInfo(fullPathToIcon + KBackgroundPrtSVG).exists()){
nameIconPair.icon = HbIcon(fullPathToIcon + KBackgroundPrtSVG);
} else if(QFileInfo(fullPathToIcon + KBackgroundPrtPNG).exists()){
- nameIconPair.icon = HbIcon(fullPathToIcon + KBackgroundPrtPNG);
- } else{
- nameIconPair.icon = HbIcon(":/image/themePreview.svg");
+ nameIconPair.icon = HbIcon(fullPathToIcon + KBackgroundPrtPNG);
+ }else{
+ nameIconPair.icon = HbIcon(KDefaultThemeIcon);
}
+
} else {
- nameIconPair.icon = HbIcon(fullPathToIcon);
+ nameIconPair.icon = HbIcon(fullPathToIcon + iconPath);
}
//Portrait preview
- QString fullPathToPreviewPrt = (iconThemePath.path() + previewPathPrt );
- if(previewPathPrt.isEmpty() || !QFileInfo(fullPathToPreviewPrt).exists()) {
+ if(previewPathPrt.isEmpty() || !QFileInfo(fullPathToIcon + previewPathPrt).exists()) {
- if(QFileInfo(fullPathToPreviewPrt + KPreviewPrtSVG).exists()){
- nameIconPair.portraitPreviewIcon = HbIcon(fullPathToPreviewPrt + KPreviewPrtSVG);
- }else if(QFileInfo(fullPathToPreviewPrt + KBackgroundPrtSVG).exists()){
- nameIconPair.portraitPreviewIcon = HbIcon(fullPathToPreviewPrt + KBackgroundPrtSVG);
- } else if(QFileInfo(fullPathToPreviewPrt + KBackgroundPrtPNG).exists()){
- nameIconPair.portraitPreviewIcon = HbIcon(fullPathToPreviewPrt + KBackgroundPrtPNG);
+ if(QFileInfo(fullPathToIcon + KPreviewPrtNVG).exists()){
+ nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KPreviewPrtNVG);
+ }else if(QFileInfo(fullPathToIcon + KPreviewPrtSVG).exists()){
+ nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KPreviewPrtSVG);
+ }else if(QFileInfo(fullPathToIcon + KBackgroundPrtNVG).exists()){
+ nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KBackgroundPrtNVG);
+ } else if(QFileInfo(fullPathToIcon + KBackgroundPrtSVG).exists()){
+ nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KBackgroundPrtSVG);
+ } else if(QFileInfo(fullPathToIcon + KBackgroundPrtPNG).exists()){
+ nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + KBackgroundPrtPNG);
} else{
- nameIconPair.portraitPreviewIcon = HbIcon(":/image/themePreview.svg");
+ nameIconPair.portraitPreviewIcon = HbIcon(KDefaultThemeIcon);
}
}
else {
- nameIconPair.portraitPreviewIcon = HbIcon(fullPathToPreviewPrt);
+ nameIconPair.portraitPreviewIcon = HbIcon(fullPathToIcon + previewPathPrt);
}
//Landscape preview
- QString fullPathToPreviewLsc = (iconThemePath.path() + previewPathLsc );
-
- if(previewPathLsc.isEmpty() || !QFileInfo(fullPathToPreviewLsc).exists()) {
-
- if(QFileInfo(fullPathToPreviewLsc + KPreviewLscSVG).exists()){
- nameIconPair.landscapePreviewIcon = HbIcon(fullPathToPreviewLsc + KPreviewLscSVG);
- }else if(QFileInfo(fullPathToPreviewLsc + KBackgroundLscSVG).exists()){
- nameIconPair.landscapePreviewIcon = HbIcon(fullPathToPreviewLsc + KBackgroundLscSVG);
- } else if(QFileInfo(fullPathToPreviewLsc + KBackgroundLscPNG).exists()){
- nameIconPair.landscapePreviewIcon = HbIcon(fullPathToPreviewLsc + KBackgroundLscPNG);
+
+ if(previewPathLsc.isEmpty() || !QFileInfo(fullPathToIcon + previewPathLsc).exists()) {
+ if(QFileInfo(fullPathToIcon + KPreviewLscNVG).exists()){
+ nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KPreviewLscNVG);
+ }else if(QFileInfo(fullPathToIcon + KPreviewLscSVG).exists()){
+ nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KPreviewLscSVG);
+ }else if(QFileInfo(fullPathToIcon + KBackgroundLscNVG).exists()){
+ nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KBackgroundLscNVG);
+ } else if(QFileInfo(fullPathToIcon + KBackgroundLscSVG).exists()){
+ nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KBackgroundLscSVG);
+ } else if(QFileInfo(fullPathToIcon + KBackgroundLscPNG).exists()){
+ nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + KBackgroundLscPNG);
} else{
- nameIconPair.landscapePreviewIcon = HbIcon(":/image/themePreview.svg");
+ nameIconPair.landscapePreviewIcon = HbIcon(KDefaultThemeIcon);
}
}
else {
- nameIconPair.landscapePreviewIcon = HbIcon(fullPathToPreviewLsc);
+ nameIconPair.landscapePreviewIcon = HbIcon(fullPathToIcon + previewPathLsc);
}
nameIconPair.name = name;
@@ -261,7 +276,7 @@
// Include default
CpThemeChanger::ThemeInfo def;
def.name = KDefaultTheme;
- def.icon = HbIcon(":/image/themePreview.svg");
+ def.icon = HbIcon(KDefaultThemeIcon);
mThemeList.append(def);
mCurrentTheme = def;
--- a/controlpanelplugins/themeplugin/src/cpthemecontrol.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemecontrol.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -33,6 +33,7 @@
#include <QTranslator>
#include <QSortFilterProxyModel>
#include <QThread>
+#include <QTimer>
#include <hbmainwindow.h>
#include <hbinstance.h>
@@ -42,7 +43,9 @@
#include "cpthemelistview.h"
#include "cpthemepreview.h"
-static const QString KPlaceholderPreview = ":/image/themePreview.svg";
+#include <hbdialog.h>
+#include <hblabel.h>
+
/*!
Helper function to fetch the main window.
@@ -65,10 +68,10 @@
mThemeChanger(0),
mListModel(0),
mSortModel(0),
- mIdleTimer(0)
+ mThemeChangeFinished(false),
+ mWaitDialog(0)
{
mThemeChanger = new CpThemeChanger();
-
QTranslator *translator = new QTranslator(this);
QString lang = QLocale::system().name();
@@ -76,14 +79,11 @@
translator->load("control_panel_" + lang, path);
qApp->installTranslator(translator);
- mIdleTimer = new QTimer(this);
- connect(mIdleTimer, SIGNAL(timeout()), this, SLOT(themeChangeTimeout()));
connect(hbInstance->theme(),SIGNAL(changeFinished()), this, SLOT(themeChangeFinished()));
}
-
/*!
destorys the list view, preview and theme changer objects.
*/
@@ -97,6 +97,9 @@
delete mThemePreview;
mThemePreview = 0;
+
+ delete mWaitDialog;
+ mWaitDialog = 0;
}
/*!
@@ -217,8 +220,7 @@
} else {
mThemePreview->setThemeInfo(themeInfo);
}
- //TODO: use qtTrId(text_id).
- mThemePreview->setTitle(tr("Control Panel"));
+ mThemePreview->setTitle(hbTrId("txt_cp_title_control_panel"));
mWindow->setCurrentView(mThemePreview);
@@ -238,13 +240,14 @@
mThemeChanger->changeTheme(theme);
emit themeUpdated(mThemeChanger->currentTheme().name, mThemeChanger->currentTheme().icon);
}
-
- //Go back to control panel view. Close theme preview.
- previewClosed();
- //ask the themelistview to close. Control Panel will
- //take care of removing it from window.
- triggerThemeListClose();
-
+
+ //Start a timer. If theme change takes more than 1 seconds,
+ //we will show a dialog (mWaitDialog) until theme change
+ //is done (themeChangeFinished is called).
+ QTimer::singleShot(1000, this, SLOT(themeWaitTimeout()));
+
+ mThemeChangeFinished = false;
+
}
/*!
@@ -288,14 +291,49 @@
void CpThemeControl::themeChangeTimeout()
{
- mIdleTimer->stop();
+ //Theme change is finished and idle timer has timed out,
+ //so revert back the application priority to normal
+ //and go back to control panel view.
+ if(mWaitDialog && mWaitDialog->isVisible()) {
+ mWaitDialog->hide();
+ }
+
+ previewClosed();
+ //ask the themelistview to close. Control Panel will
+ //take care of removing it from window.
+ triggerThemeListClose();
+
QThread::currentThread()->setPriority(QThread::NormalPriority);
-
+}
+
+void CpThemeControl::themeWaitTimeout()
+{
+ //If after this timeOut, theme change is still in progress,
+ //show a processing dialog.
+ if(!mThemeChangeFinished)
+ {
+ if(!mWaitDialog) {
+ mWaitDialog = new HbDialog();
+ mWaitDialog->setModal(false);
+ mWaitDialog->setDismissPolicy(HbPopup::NoDismiss);
+ //TODO: need localized text for Hb Dialog
+ // Create and set HbLabel as content widget.
+ HbLabel *label = new HbLabel("Processing ...");
+ label->setAlignment(Qt::AlignCenter);
+ mWaitDialog->setContentWidget(label);
+ }
+ // as we do not need any signals, calling show() instead of open()
+ mWaitDialog->show();
+ }
}
void CpThemeControl::themeChangeFinished()
{
- mIdleTimer->start(0);
+ //Theme change is done. Start an idle timer to let the UI
+ //finish remaining tasks.
+ QTimer::singleShot(0, this, SLOT(themeChangeTimeout()));
+ mThemeChangeFinished = true;
+
}
/*!
--- a/controlpanelplugins/themeplugin/src/cpthemecontrol.h Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemecontrol.h Wed Jun 23 18:13:38 2010 +0300
@@ -20,7 +20,6 @@
#include <QObject>
#include <QList>
-#include <QTimer>
#include "cpthemechanger.h"
#include <hbicon.h>
@@ -31,6 +30,7 @@
class QSortFilterProxyModel;
QT_END_NAMESPACE
+class HbDialog;
class CpThemeListView;
class CpThemePreview;
class CpBaseSettingView;
@@ -57,6 +57,7 @@
void themeApplied(const QString& theme);
void themeListClosed();
void themeChangeTimeout();
+ void themeWaitTimeout();
void themeChangeFinished();
private:
@@ -70,7 +71,8 @@
CpThemeChanger* mThemeChanger;
QAbstractItemModel* mListModel;
QSortFilterProxyModel* mSortModel;
- QTimer* mIdleTimer;
+ bool mThemeChangeFinished;
+ HbDialog* mWaitDialog;
};
#endif //CPTHEMECONTROL_H
--- a/controlpanelplugins/themeplugin/src/cpthemelistview.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemelistview.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -22,6 +22,7 @@
#include <hbview.h>
#include <hblabel.h>
#include <hblistview.h>
+#include <hblistviewitem.h>
#include "cpthemelistview.h"
@@ -45,17 +46,17 @@
//Create a layout with a heading "Select theme" at top and the list below it.
HbWidget* contentWidget = new HbWidget(this);
QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical);
-
-
//setup the heading.
- HbLabel* label = new HbLabel(hbTrId("txt_cp_title_select_theme"), contentWidget);
- label->setFontSpec(HbFontSpec(HbFontSpec::Primary));
+ HbLabel* label = new HbLabel(hbTrId("txt_cp_title_select_theme"), contentWidget);//txt_cp_title_select_theme
layout->addItem(label);
connect(mThemeList, SIGNAL(activated(const QModelIndex&)),
this, SIGNAL(newThemeSelected(const QModelIndex&)));
+ HbListViewItem* listViewItem = mThemeList->listItemPrototype();
+ listViewItem->setGraphicsSize(HbListViewItem::LargeIcon);
+
//add the list to layout.
layout->addItem(mThemeList);
--- a/controlpanelplugins/themeplugin/src/cpthemepreview.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelplugins/themeplugin/src/cpthemepreview.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -26,6 +26,7 @@
#include <hblabel.h>
#include <hbiconitem.h>
#include <hbmainwindow.h>
+#include <HbParameterLengthLimiter>
#include "cpthemepreview.h"
@@ -51,10 +52,8 @@
//setup the heading.
- //TODO: translation of string hbTrId("txt_cp_title_preview_1")
- QString themeHeading = tr("Preview: ") + mTheme.name;
+ QString themeHeading = HbParameterLengthLimiter("txt_cp_title_preview_1").arg(mTheme.name);
HbLabel* label = new HbLabel(themeHeading, this);
- label->setFontSpec(HbFontSpec(HbFontSpec::Primary));
layout->addItem(label);
--- a/controlpanelplugins/themeplugin/themeplugin.qrc Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelplugins/themeplugin/themeplugin.qrc Wed Jun 23 18:13:38 2010 +0300
@@ -1,7 +1,5 @@
<RCC>
<qresource prefix="/" >
- <file>image/qgn_menu_note.svg</file>
- <file>image/themePreview.png</file>
- <file>image/themePreview.svg</file>
+ <file>image/themePreview.nvg</file>
</qresource>
</RCC>
--- a/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/communicationplugin/src/cpcommunicationgroupitemdata.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -49,7 +49,8 @@
void CpCommunicationGroupItemData::beforeLoadingConfigPlugins(CpItemDataHelper &itemDataHelper)
{
mAirplaneModeItem = new HbDataFormModelItem(HbDataFormModelItem::ToggleValueItem,
- hbTrId("txt_cp_setlabel_offline_airplane_mode"));
+ hbTrId("txt_cp_setlabel_offline_airplane_mode"));
+ mAirplaneModeItem->setDescription(hbTrId("txt_cp_info_in_offline_mode_all_wireless_communica"));
itemDataHelper.addConnection(mAirplaneModeItem,
SIGNAL(clicked()),
--- a/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenconstants.h Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenconstants.h Wed Jun 23 18:13:38 2010 +0300
@@ -18,16 +18,6 @@
#ifndef CPKEYSCREENCONSTANTS_H
#define CPKEYSCREENCONSTANTS_H
-enum KeyscreenLockItems{
- EKeyScreenLockItem1,
- EKeyScreenLockItem2,
- EKeyScreenLockItem3,
- EKeyScreenLockItem4,
- EKeyScreenLockItem5
-};
-
-const int KCpKeyscreenTimeCoeff = 15;
-
const int KCpKeyscreenLock15s = 15;
const int KCpKeyscreenLock30s = 30;
const int KCpKeyscreenLock45s = 45;
--- a/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenview.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenview.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -25,18 +25,27 @@
#include <hbdataformmodel.h>
#include <cpsettingformitemdata.h>
#include <hbmessagebox.h>
+#include <hbslider.h>
CpKeyScreenView::CpKeyScreenView(QGraphicsItem *parent) :
CpBaseSettingView(0,parent),
- mScreenRadioButton(0),
+ mScreenComboButton(0),
mRotateCheckbox(0),
mBrightSliderItem(0),
mCallibItem(0),
mModel(0)
-{
+{
HbDataForm *form = qobject_cast<HbDataForm*> ( widget() );
if (form) {
+ // Valid range is:
+ // 15 secs, 30 secs, 45 secs, 1 min, 2 mins
+ mScreenLockValues.insert(KCpKeyscreenLock15s,hbTrId("txt_cp_setlabel_keys_screen_val_15_seconds"));
+ mScreenLockValues.insert(KCpKeyscreenLock30s,hbTrId("txt_cp_setlabel_keys_screen_val_30_seconds"));
+ mScreenLockValues.insert(KCpKeyscreenLock45s,hbTrId("txt_cp_setlabel_keys_screen_val_45_seconds"));
+ mScreenLockValues.insert(KCpKeyscreenLock60s,hbTrId("txt_cp_setlabel_keys_screen_val_1_minute"));
+ mScreenLockValues.insert(KCpKeyscreenLock120s,hbTrId("txt_cp_setlabel_keys_screen_val_2_minutes"));
+
form->setHeading(hbTrId("txt_cp_subhead_keys_screen"));
mModel = new CpKeyScreenModel();
HbDataFormModel *model = new HbDataFormModel;
@@ -61,30 +70,36 @@
void CpKeyScreenView::makeScreenItem(HbDataFormModel& model)
{
- mScreenRadioButton = new CpSettingFormItemData(HbDataFormModelItem::RadioButtonListItem,
- hbTrId("txt_cp_setlabel_keys_screen_locked_after"));
- qobject_cast<HbDataForm*> ( widget() )->addConnection(mScreenRadioButton,SIGNAL(itemSelected(int)),this,SLOT(screenValueChanged(int)));
- model.appendDataFormItem(mScreenRadioButton, model.invisibleRootItem());
+ mScreenComboButton = new CpSettingFormItemData(HbDataFormModelItem::ComboBoxItem,
+ hbTrId("txt_cp_setlabel_keys_screen_locked_after"));
+
+ qobject_cast<HbDataForm*> ( widget() )->addConnection(
+ mScreenComboButton,SIGNAL(currentIndexChanged(QString)),
+ this,SLOT(screenValueChanged(QString)));
+
+ model.appendDataFormItem(mScreenComboButton, model.invisibleRootItem());
- // Valid range is:
- // 15 secs, 30 secs, 45 secs, 1 min, 2 mins
- QStringList sList;
- sList<< hbTrId("txt_cp_setlabel_keys_screen_val_15_seconds")<< hbTrId("txt_cp_setlabel_keys_screen_val_30_seconds")
- << hbTrId("txt_cp_setlabel_keys_screen_val_45_seconds")<< hbTrId("txt_cp_setlabel_keys_screen_val_1_minute")
- << hbTrId("txt_cp_setlabel_keys_screen_val_2_minutes");
int period = mModel->keyguard();
- int selectedIndex = period/KCpKeyscreenTimeCoeff - 1;
- if ( KCpKeyscreenLock120s == period ){ // 2 minutes
- selectedIndex = EKeyScreenLockItem5;
+
+ int selectedIndex(-1);
+
+ QMap<int,QString>::iterator it = mScreenLockValues.find(period);
+ if (it == mScreenLockValues.end()) {
+ mModel->setKeyguard(KCpKeyscreenLockDefault30s); // Set keyguard and backlight period to default
+ selectedIndex = 1;
}
- if ( (KCpKeyscreenLock15s != period) && (KCpKeyscreenLock30s != period) &&
- (KCpKeyscreenLock45s != period) && (KCpKeyscreenLock60s != period) &&
- (KCpKeyscreenLock120s != period) ){
- mModel->setKeyguard(KCpKeyscreenLockDefault30s); // Set keyguard and backlight period to default
- selectedIndex = EKeyScreenLockItem2;
+ else {
+ for (it = mScreenLockValues.begin();it != mScreenLockValues.end();++it) {
+ selectedIndex++;
+ if (it.key() == period) {
+ break;
+ }
+ }
}
- mScreenRadioButton->setContentWidgetData( QString("items"), sList );
- mScreenRadioButton->setContentWidgetData( QString("selected"), selectedIndex);
+
+ QStringList items = mScreenLockValues.values();
+ mScreenComboButton->setContentWidgetData( QString("items"), items );
+ mScreenComboButton->setContentWidgetData( QString("currentIndex"), selectedIndex);
}
void CpKeyScreenView::makeRotateItem(HbDataFormModel& model)
@@ -110,9 +125,17 @@
qobject_cast<HbDataForm*> ( widget() )->addConnection(mBrightSliderItem,SIGNAL(valueChanged(int)),this,SLOT(brightValueChanged(int)));
model.appendDataFormItem(mBrightSliderItem, model.invisibleRootItem());
+ QList<QVariant> sliderElements;
+ sliderElements << QVariant(HbSlider::IncreaseElement) << QVariant(HbSlider::TrackElement)
+ << QVariant(HbSlider::DecreaseElement);
+ mBrightSliderItem->setContentWidgetData("sliderElements",sliderElements);
mBrightSliderItem->setContentWidgetData( QString("value"), mModel->brightness() );
mBrightSliderItem->setContentWidgetData( QString("minimum"), 1 );
mBrightSliderItem->setContentWidgetData( QString("maximum"), 5 );
+ QMap< QString, QVariant > iconElements;
+ iconElements.insert(QString("IncreaseElement") , QVariant(":/icon/hb_vol_slider_increment.svg"));
+ iconElements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg") );
+ mBrightSliderItem->setContentWidgetData( QString( "elementIcons" ), iconElements );
}
void CpKeyScreenView::makeCallibrationItem(HbDataFormModel& model)
@@ -130,13 +153,15 @@
mModel = 0;
}
-void CpKeyScreenView::screenValueChanged(int index)
-{
- int period = (index + 1) * KCpKeyscreenTimeCoeff;
- if (EKeyScreenLockItem5 == index){
- period = KCpKeyscreenLock120s;
+void CpKeyScreenView::screenValueChanged(const QString &value)
+{
+ for (QMap<int,QString>::iterator it = mScreenLockValues.begin();
+ it != mScreenLockValues.end();++it) {
+ if (it.value() == value) {
+ mModel->setKeyguard(it.key());
+ break;
+ }
}
- mModel->setKeyguard(period);
}
void CpKeyScreenView::rotateValueChanged(int value)
--- a/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenview.h Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/keytouchfdbkplugin/src/cpkeyscreenview.h Wed Jun 23 18:13:38 2010 +0300
@@ -17,6 +17,7 @@
#ifndef CPKEYSCREENVIEW_H
#define CPKEYSCREENVIEW_H
+#include <QMap>
#include <cpbasesettingview.h>
#include <hbdataformmodelitem.h>
@@ -24,6 +25,8 @@
class HbDataFormModel;
class CpSettingFormItemData;
class CpKeyScreenModel;
+class QPersistentModelIndex;
+class QVariant;
class CpKeyScreenView : public CpBaseSettingView
{
@@ -39,17 +42,18 @@
void makeCallibrationItem(HbDataFormModel& model);
private slots:
- //need handling your member's value change
- void screenValueChanged(int index);
+ void screenValueChanged(const QString&);
void rotateValueChanged(int value);
void brightValueChanged(int value);
void launchCallib();
private:
- CpSettingFormItemData *mScreenRadioButton;
+ CpSettingFormItemData *mScreenComboButton;
CpSettingFormItemData *mRotateCheckbox;
CpSettingFormItemData *mBrightSliderItem;
CpSettingFormItemData *mCallibItem;
CpKeyScreenModel* mModel;
+
+ QMap<int,QString> mScreenLockValues;
};
#endif// CPKEYSCREENVIEW_H
--- a/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/personalizationplugin/src/cpprofilesettingform.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -188,9 +188,18 @@
//Touch Screen Vibra item
modelItem = mModel->appendDataFormItem( HbDataFormModelItem::SliderItem, QString( hbTrId( "txt_cp_setlabel_touch_screen_vibra" ) ), parent );
//TODO: profileModel need provide Max and Min value( 0-5 ), current max value from profileModel is 3
+ sliderElements.clear();
+ sliderElements << QVariant(HbSlider::IncreaseElement) << QVariant(HbSlider::TrackElement)
+ << QVariant(HbSlider::DecreaseElement);
+ modelItem->setContentWidgetData("sliderElements",sliderElements);
+
modelItem->setContentWidgetData( QString( "minimum" ), 0 );
modelItem->setContentWidgetData( QString( "maximum" ), 5 );
modelItem->setContentWidgetData( QString("value"), profileSettings.mKeyTouchScreenVibra );
+ QMap< QString, QVariant > iconElements;
+ iconElements.insert(QString("IncreaseElement") , QVariant(":/icon/hb_vol_slider_increment.svg"));
+ iconElements.insert(QString("DecreaseElement"), QVariant(":/icon/hb_vol_slider_decrement.svg") );
+ modelItem->setContentWidgetData( QString( "elementIcons" ), iconElements );
if (profileId == EProfileWrapperGeneralId) {
addConnection( modelItem, SIGNAL( valueChanged( int )), this, SLOT( on_general_screenVibra_ValueChanged( int )));
--- a/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatordialog.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatordialog.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -20,7 +20,11 @@
#include <hbaction.h>
#include <hbdataformmodelitem.h>
#include <hbpopup.h>
+#include <hblabel.h>
#include "cpprofileactivatorentryitem.h"
+#include <QGraphicsLinearLayout>
+#include <QGraphicsWidget>
+
CpProfileActivatorDialog::CpProfileActivatorDialog(CpSettingFormItemData *profileActivator,
CpProfileModel &profileModel,
QGraphicsItem *parent):HbDialog(parent),
@@ -28,11 +32,19 @@
mProfileList(0),
mProfileActivator(profileActivator)
{
+ mTitleLabel = new HbLabel(this);
+ mTitleLabel->setPlainText(hbTrId("txt_cp_title_profile"));
+ mContentWidget = new QGraphicsWidget(this);
+ setContentWidget(mContentWidget);
+ mLayout = new QGraphicsLinearLayout();
+ mLayout->setOrientation( Qt::Vertical );
mProfileIds << EProfileWrapperGeneralId
<< EProfileWrapperMeetingId;
mProfileList = new HbRadioButtonList();
mProfileList->setItems(profileModel.profileNames());
-
+ mLayout->addItem(mTitleLabel);
+ mLayout->addItem(mProfileList);
+
int currentId = mProfileModel.activeProfileId();
mProfileList->setSelected(mProfileIds.indexOf(static_cast<ProfileWrapperProfileId>(currentId)));
@@ -46,12 +58,11 @@
this->addAction(mConfirmProfile);
- this->addAction(mCancelProfile);
-
- this->setContentWidget(mProfileList);
+ this->addAction(mCancelProfile);
this->setModal(true);
this->setDismissPolicy(HbPopup::NoDismiss);
this->setTimeout(HbPopup::NoTimeout);
+ mContentWidget->setLayout( mLayout );
}
CpProfileActivatorDialog::~CpProfileActivatorDialog()
--- a/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatordialog.h Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatordialog.h Wed Jun 23 18:13:38 2010 +0300
@@ -24,6 +24,9 @@
class HbDataFormModelItem;
class CpProfileActivatorEntryItem;
class CpSettingFormItemData;
+class QGraphicsLinearLayout;
+class QGraphicsWidget;
+class HbLabel;
class CpProfileActivatorDialog: public HbDialog
{
@@ -44,5 +47,8 @@
QPointer<HbAction> mConfirmProfile;
QPointer<HbAction> mCancelProfile;
QList<ProfileWrapperProfileId> mProfileIds;
+ QGraphicsLinearLayout *mLayout;
+ QGraphicsWidget *mContentWidget;
+ HbLabel *mTitleLabel;
};
#endif
--- a/controlpanelui/src/cpplugins/volumeplugin/src/cpvolumegroupitemdata.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpplugins/volumeplugin/src/cpvolumegroupitemdata.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -28,7 +28,7 @@
#include <hbslider.h>
CpVolumeGroupItemData::CpVolumeGroupItemData(CpItemDataHelper &itemDataHelper)
-: CpSettingFormItemData(HbDataFormModelItem::GroupItem,tr("txt_cp_subhead_volume")),//mSilenceIndicator(0),
+: CpSettingFormItemData(HbDataFormModelItem::GroupItem,hbTrId("txt_cp_subhead_volume")),//mSilenceIndicator(0),
//mMasterVolume(0),
//mMasterVibra(0),
mVolumeController(0),
--- a/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpprofilewrapper/src/cpprofilemodel_p.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -142,9 +142,9 @@
// so hard code here, wait for engine's correcting.
switch (profileId) {
case EProfileWrapperGeneralId:
- return hbTrId("txt_cp_setlabel_active_profile_val_general");
+ return hbTrId("txt_cp_list_general");
case EProfileWrapperMeetingId:
- return hbTrId("txt_cp_setlabel_active_profile_val_meeting");
+ return hbTrId("txt_cp_list_meeting");
default:
return QString("");
}
@@ -153,8 +153,8 @@
{
//hard code, until engine part support qt localized name
QStringList nameList;
- nameList<<hbTrId("txt_cp_setlabel_active_profile_val_general")
- <<hbTrId("txt_cp_setlabel_active_profile_val_meeting");
+ nameList<<hbTrId("txt_cp_list_general")
+ <<hbTrId("txt_cp_list_meeting");
return nameList;
}
--- a/controlpanelui/src/cpserviceprovider/cpserviceprovider.pro Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/cpserviceprovider/cpserviceprovider.pro Wed Jun 23 18:13:38 2010 +0300
@@ -27,8 +27,8 @@
SERVICE.FILE = service_conf.xml
SERVICE.OPTIONS = embeddable
-SERVICE.OPTIONS += hidden embeddable
+SERVICE.OPTIONS += hidden
libFiles.sources = xqservice.dll
libFiles.path = "!:\sys\bin"
-DEPLOYMENT += libFiles
\ No newline at end of file
+DEPLOYMENT += libFiles
--- a/controlpanelui/src/tonefetcher/src/tonefetcherwidget.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcherwidget.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -34,6 +34,7 @@
#include "tonefetcherview.h"
#include "tonefetchermodel.h"
#include <hbmessagebox.h>
+#include <hbprogressdialog.h>
ToneFetcherWidget::ToneFetcherWidget( ToneFetcherView *serviceView )
: HbWidget(this),
@@ -42,7 +43,8 @@
mLayout(0),
mToneModel(0),
mServiceView(serviceView),
- mServiceEngine(0)
+ mServiceEngine(0),
+ mWaitNote(0)
{
mSelected = false;
@@ -60,11 +62,18 @@
this, SLOT(previewEvent(ToneServiceEngine::TPreviewEvent, int)));
connect( mServiceEngine, SIGNAL(notifyObjectChanged()),
this, SLOT(onObjectChanged()));
+ connect( mServiceEngine, SIGNAL(notifyRefreshStart()),
+ this, SLOT(refreshStart()));
+ connect( mServiceEngine, SIGNAL(notifyRefreshFinish()),
+ this, SLOT(refreshFinish()));
}
ToneFetcherWidget::~ToneFetcherWidget()
{
- delete mToneModel;
+ delete mToneModel;
+ mToneModel = 0;
+ delete mWaitNote;
+ mWaitNote = 0;
}
void ToneFetcherWidget::on_list_activated(const QModelIndex &index)
@@ -125,6 +134,12 @@
connect(mListView, SIGNAL(activated(QModelIndex)),
this, SLOT(on_list_activated(QModelIndex )));
+ if( !mWaitNote ){
+ mWaitNote = new HbProgressDialog( HbProgressDialog::WaitDialog );
+ mWaitNote->setText( hbTrId( "Refreshing..." ) );
+ QAction *action = mWaitNote->actions().at(0);//disable Cancel buttion.
+ action->setEnabled(false);
+ }
}
void ToneFetcherWidget::mdeSessionOpened()
@@ -227,4 +242,18 @@
mToneModel->insertInOrder(fileName, filePath);
}
}
+
+void ToneFetcherWidget::refreshFinish()
+{
+ if (mWaitNote) {
+ mWaitNote->close();
+ }
+}
+
+void ToneFetcherWidget::refreshStart()
+{
+ if (mWaitNote) {
+ mWaitNote->open();
+ }
+}
//End of File
--- a/controlpanelui/src/tonefetcher/src/tonefetcherwidget.h Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/tonefetcher/src/tonefetcherwidget.h Wed Jun 23 18:13:38 2010 +0300
@@ -32,6 +32,7 @@
class ToneFetcherView;
class ToneFetcherModel;
class HbLabel;
+class HbProgressDialog;
class ToneFetcherWidget : public HbWidget
{
@@ -55,6 +56,8 @@
void queryError(int error );
void previewEvent(ToneFetcherEngine::TPreviewEvent event, int errorId);
void onObjectChanged();
+ void refreshFinish();
+ void refreshStart();
private:
void init();
@@ -73,5 +76,6 @@
QFileInfoList mDigitalSoundList;
bool mSelected;
QModelIndex mOldSeletedItem;
+ HbProgressDialog *mWaitNote;
};
#endif /* TONEFETCHERWIDGET_H_ */
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -23,12 +23,69 @@
#include "tonefetcherengine.h"
#include <centralrepository.h>
#include <ProfileEngineDomainCRKeys.h>
+#include <cplogger.h>
+
+
+CTimeOutTimer* CTimeOutTimer::NewL(ToneSelectionEnginePrivate& aObserver)
+ {
+ CTimeOutTimer* self = CTimeOutTimer::NewLC(aObserver);
+ CleanupStack::Pop(self);
+ return self;
+ }
+
+
+
+CTimeOutTimer* CTimeOutTimer::NewLC(ToneSelectionEnginePrivate& aObserver)
+ {
+ CTimeOutTimer* self = new (ELeave) CTimeOutTimer(aObserver);
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ return self;
+ }
+
+
+
+CTimeOutTimer::CTimeOutTimer(ToneSelectionEnginePrivate& aObserver)
+ : CTimer(EPriorityStandard),
+ iObserver( aObserver )
+ {
+
+ }
+
+
+
+CTimeOutTimer::~CTimeOutTimer()
+ {
+ Cancel();
+ }
+
+
+
+void CTimeOutTimer::ConstructL()
+ {
+ CTimer::ConstructL();
+ CActiveScheduler::Add(this);
+ }
+
+
+
+void CTimeOutTimer::RunL()
+ {
+ iObserver.ChangeObject();
+ }
ToneSelectionEnginePrivate::ToneSelectionEnginePrivate( ToneFetcherEngine *engine ) : mServiceEngine( engine )
{
iSession = CMdESession::NewL( *this );
+ iTimer = CTimeOutTimer::NewLC( *this );
+ iContinue = EFalse;
+ iTimerStarted = EFalse;
+ iFreshing = EFalse;
+ CleanupStack::Pop();
+
+
}
ToneSelectionEnginePrivate::~ToneSelectionEnginePrivate()
@@ -78,11 +135,23 @@
void ToneSelectionEnginePrivate::HandleObjectNotification( CMdESession& /*aSession*/,
TObserverNotificationType aType,
- const RArray<TItemId>& /*aObjectIdArray*/ )
+ const RArray<TItemId>& aObjectIdArray )
{
- if ( aType == ENotifyAdd || aType == ENotifyModify || aType == ENotifyRemove )
+ if ( aObjectIdArray.Count() > 0 && ( aType == ENotifyAdd || aType == ENotifyModify || aType == ENotifyRemove ) )
{
- emit notifyObjectChanged();
+ CPFW_LOG("ToneSelectionEnginePrivate::HandleObjectNotification count = " + QVariant(aObjectIdArray.Count()).toString() + " type = " + QVariant(aType).toString());
+ const TInt KOneSecond = 1000*1000;
+ if ( !iFreshing )
+ {
+ emit notifyRefreshStart();
+ iFreshing = ETrue;
+ }
+ if ( !iTimerStarted )
+ {
+ iTimer->After( 5 * KOneSecond );
+ iTimerStarted = ETrue;
+ }
+ iContinue = ETrue;
}
}
@@ -103,7 +172,18 @@
{
if( aObjectIdArray.Count() > 0 )
{
- emit notifyObjectChanged();
+ const TInt KOneSecond = 1000*1000;
+ if ( !iFreshing )
+ {
+ emit notifyRefreshStart();
+ iFreshing = ETrue;
+ }
+ if ( !iTimerStarted )
+ {
+ iTimer->After( 5 * KOneSecond );
+ iTimerStarted = ETrue;
+ }
+ iContinue = ETrue;
}
}
@@ -268,5 +348,29 @@
}
}
}
+
+void ToneSelectionEnginePrivate::ChangeObject()
+ {
+ if ( iTimerStarted )
+ {
+ emit notifyObjectChanged();
+ iTimerStarted = EFalse;
+ }
+
+ if ( iContinue )
+ {
+ iContinue = EFalse;
+ iTimer->After( 5000*1000 );
+ iTimerStarted = ETrue;
+ }
+ else
+ {
+ if ( iFreshing )
+ {
+ emit notifyRefreshFinish();
+ iFreshing = EFalse;
+ }
+ }
+ }
// End of File
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.h Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/private/symbian/toneselectionengine_p.h Wed Jun 23 18:13:38 2010 +0300
@@ -32,9 +32,30 @@
#include <QStringList>
// FORWARD DECLARATIONS
class ToneFetcherEngine;
+class ToneSelectionEnginePrivate;
// CONSTANTS
_LIT( KMimeMp3, "mp3" );
+class CTimeOutTimer : public CTimer
+{
+public:
+ static CTimeOutTimer* NewL(ToneSelectionEnginePrivate& aObserver);
+ static CTimeOutTimer* NewLC(ToneSelectionEnginePrivate& aObserver);
+
+ ~CTimeOutTimer();
+
+protected:
+ virtual void RunL();
+
+private:
+ CTimeOutTimer(ToneSelectionEnginePrivate& aObserver);
+ void ConstructL();
+
+private:
+
+ ToneSelectionEnginePrivate& iObserver;
+};
+
// CLASS DECLARATION
/**
* This class is used for quering tones from mde.
@@ -74,14 +95,15 @@
public:
ToneSelectionEnginePrivate( ToneFetcherEngine *engine );
virtual ~ToneSelectionEnginePrivate();
-
+ void ChangeObject();
signals:
void mdeSessionOpened();
void mdeSessionError( int error );
- void queryComplete( QStringList nameList, QStringList uriList );
+ void queryComplete( const QStringList& nameList, const QStringList& uriList );
void queryError( int error );
void notifyObjectChanged();
-
+ void notifyRefreshStart();
+ void notifyRefreshFinish();
public:
static CMdEPropertyDef& PropertyDefL(CMdESession* aSession, TInt aAttr);
@@ -137,6 +159,12 @@
// query error
TInt iQueryError;
+
+ // for refresh
+ CTimeOutTimer *iTimer;
+ TBool iContinue;
+ TBool iTimerStarted;
+ TBool iFreshing;
};
#endif /* TONESELECTIONENGINE_H_ */
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.cpp Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.cpp Wed Jun 23 18:13:38 2010 +0300
@@ -35,6 +35,10 @@
this, SIGNAL(queryError(int)));
connect(d, SIGNAL(notifyObjectChanged()),
this, SIGNAL(notifyObjectChanged()));
+ connect(d, SIGNAL(notifyRefreshStart()),
+ this, SIGNAL(notifyRefreshStart()));
+ connect(d, SIGNAL(notifyRefreshFinish()),
+ this, SIGNAL(notifyRefreshFinish()));
connect(mAudioPlayer, SIGNAL(notifyPreviewEvent(ToneServiceEngine::TPreviewEvent, int)),
this, SIGNAL(notifyPreviewEvent(ToneServiceEngine::TPreviewEvent, int)));
}
--- a/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h Fri Jun 11 13:39:17 2010 +0300
+++ b/controlpanelui/src/tonefetcher/tonefetcherengine/tonefetcherengine.h Wed Jun 23 18:13:38 2010 +0300
@@ -94,6 +94,8 @@
void queryError(int error);
void notifyPreviewEvent(ToneFetcherEngine::TPreviewEvent event, int errorId);
void notifyObjectChanged();
+ void notifyRefreshStart();
+ void notifyRefreshFinish();
private:
ToneSelectionEnginePrivate *d;
TonePreviewPrivate *mAudioPlayer;