2 import com.nokia.meego 1.0
3 import "file:///usr/lib/qt4/imports/com/meego/UIConstants.js" as UIConstants
4 //import "file:///usr/lib/qt4/imports/com/nokia/extras/constants.js" as ExtrasConstants
5 import "Library/js/DBUtility.js" as DBUtility
6 import "Library/js/CoreLogic.js" as Core
12 Component.onCompleted: {
13 DBUtility.initialize();
23 anchors.top:parent.top
24 width: parent.width ; height: appWindow.inPortrait ? UIConstants.HEADER_DEFAULT_HEIGHT_PORTRAIT: UIConstants.HEADER_DEFAULT_HEIGHT_LANDSCAPE
29 font.family: UIConstants.FONT_FAMILY
30 font.pixelSize: UIConstants.FONT_SLARGE
31 color: UIConstants.COLOR_FOREGROUND
32 anchors.centerIn: parent
33 horizontalAlignment: Text.AlignHCenter;
34 text: qsTr("VICaR - Rules")
41 anchors {top: headerRect.bottom; bottom: parent.bottom}
67 height: UIConstants.LIST_ITEM_HEIGHT_DEFAULT
71 visible: mouseArea.pressed
72 source: theme.inverted ?
73 'image://theme/meegotouch-list-fullwidth-inverted-background-pressed-vertical-center':
74 'image://theme/meegotouch-list-fullwidth-background-pressed-vertical-center'
78 height: parent.height;
79 anchors {left: parent.left;leftMargin: UIConstants.DEFAULT_MARGIN; right: parent.right; rightMargin: UIConstants.DEFAULT_MARGIN}
80 font.family: UIConstants.FONT_FAMILY
81 font.pixelSize: UIConstants.FONT_SLARGE
82 color: UIConstants.COLOR_FOREGROUND
83 horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
84 wrapMode: Text.WordWrap
85 //lineHeightMode: Text.ProportionalHeight; lineHeight: 1.5
86 text: "For numbers starting with "+numberpattern+ ", use "+gatewaynumber;
92 ruleContextMenu.ruleID = id;
93 console.log("Setting Rule ID as "+id);
94 ruleContextMenu.open();
102 property int ruleID:0
108 Core.editRule(ruleContextMenu.ruleID);
112 text: qsTr("Delete");
114 DBUtility.removeRule(ruleContextMenu.ruleID);
126 anchors.centerIn: parent
127 text: qsTr("Add rules for call routing.")