OSDN Git Service

Ring 1.10 以来となる開発環境の日本語ローカライズ版 (評価版) を追加 (ノートパッド、フォームデザイナー、対話型実行環境、ファイルの検索)。
[ring-lang-081/ring.git] / applications / build / ja-jp / formdesigner / controls / qdial.ring
1 /*
2 **      Project : Form Designer 
3 **      File Purpose :  QDial Control
4 **      Date : 2017.04.29
5 **      Author :  Mahmoud Fayed <msfclipper@yahoo.com>
6 */
7
8 package formdesigner
9
10 class FormDesigner_QDial from QDial
11
12         CreateCommonAttributes()
13         CreateMoveResizeCornersAttributes()
14
15         cMinimum = ""
16         cMaximum = ""
17         cRange = ""
18         cValue = ""
19
20         cvalueChangedEvent = ""
21
22         func MinimumValue
23                 return cMinimum
24
25         func SetMinimumValue Value
26                 cMinimum = Value
27
28         func MaximumValue
29                 return cMaximum
30
31         func SetMaximumValue Value
32                 cMaximum = Value
33
34         func RangeValue
35                 return cRange
36
37         func SetRangeValue Value
38                 cRange = Value
39
40         func ValueValue
41                 return cValue
42
43         func SetValueValue Value
44                 cValue = Value
45
46         func SetvalueChangedEventCode cValue
47                 cvalueChangedEvent = cValue
48
49         func valueChangedEventCode
50                 return cvalueChangedEvent
51
52         func AddObjectProperties  oDesigner
53                 AddObjectCommonProperties(oDesigner)
54                 oDesigner.oView.AddProperty(T_FORMDESIGNER_ATTRIBUTE_SETMINIMUM,False)                   # "Set Minimum"
55                 oDesigner.oView.AddProperty(T_FORMDESIGNER_ATTRIBUTE_SETMAXIMUM,False)                   # "Set Maximum"
56                 oDesigner.oView.AddProperty(T_FORMDESIGNER_ATTRIBUTE_SETRANGE,False)                     # "Set Range"
57                 oDesigner.oView.AddProperty(T_FORMDESIGNER_ATTRIBUTE_SETVALUE,False)                     # "Set Value"
58                 oDesigner.oView.AddProperty(T_FORMDESIGNER_ATTRIBUTE_VALUECHANGEDEVENT,False)            # "valueChangedEvent"
59
60         func DisplayProperties oDesigner
61                 DisplayCommonProperties(oDesigner)
62                 oPropertiesTable = oDesigner.oView.oPropertiesTable
63                 oPropertiesTable.Blocksignals(True)
64                 # Minimum, Maximum, Range and Value
65                         oPropertiesTable.item(C_AFTERCOMMON,1).settext(MinimumValue())
66                         oPropertiesTable.item(C_AFTERCOMMON+1,1).settext(MaximumValue())
67                         oPropertiesTable.item(C_AFTERCOMMON+2,1).settext(RangeValue())
68                         oPropertiesTable.item(C_AFTERCOMMON+3,1).settext(ValueValue())
69                 oPropertiesTable.item(C_AFTERCOMMON+4,1).settext(valueChangedEventcode())
70                 oPropertiesTable.Blocksignals(False)
71
72         func UpdateProperties oDesigner,nRow,nCol,cValue
73                 UpdateCommonProperties(oDesigner,nRow,nCol,cValue)
74                 if nCol = 1 {
75                         switch nRow {
76                                 case C_AFTERCOMMON
77                                         setMinimumValue(cValue)
78                                 case C_AFTERCOMMON+1
79                                         setMaximumValue(cValue)
80                                 case C_AFTERCOMMON+2
81                                         setRangeValue(cValue)
82                                 case C_AFTERCOMMON+3
83                                         setValueValue(cValue)
84                                 case C_AFTERCOMMON+4
85                                         setvalueChangedEventCode(cValue)
86                         }
87                 }
88
89         func ObjectDataAsString oDesigner,nTabsCount
90                 cOutput = ObjectDataAsString2(oDesigner,nTabsCount)
91                 cTabs = std_copy(char(9),nTabsCount)
92                 cOutput += "," + nl + cTabs + ' :minimum =  "' + oDesigner.PrepareStringForFormFile(MinimumValue())  + '"'
93                 cOutput += "," + nl + cTabs + ' :maximum =  "' + oDesigner.PrepareStringForFormFile(MaximumValue())  + '"'
94                 cOutput += "," + nl + cTabs + ' :range =  "' + oDesigner.PrepareStringForFormFile(RangeValue())  + '"'
95                 cOutput += "," + nl + cTabs + ' :value =  "' + oDesigner.PrepareStringForFormFile(ValueValue())  + '"'
96                 cOutput += "," + nl + cTabs + ' :setvalueChangedEvent =  "' + oDesigner.PrepareStringForFormFile(valueChangedEventCode()) + '"'
97                 return cOutput
98
99         func GenerateCustomCode oDesigner
100                 cOutput = ""
101                 if Minimumvalue() != NULL {
102                         cOutput += 'setMinimum(#{f1})' + nl
103                         cOutput = substr(cOutput,"#{f1}",""+MinimumValue())
104                 }
105                 if Maximumvalue() != NULL {
106                         cOutput += 'setMaximum(#{f1})' + nl
107                         cOutput = substr(cOutput,"#{f1}",""+MaximumValue())
108                 }
109                 if Rangevalue() != NULL {
110                         cOutput += 'setRange(#{f1})' + nl
111                         cOutput = substr(cOutput,"#{f1}",""+RangeValue())
112                 }
113                 if ValueValue() != NULL {
114                         cOutput += 'setValue(#{f1})' + nl
115                         cOutput = substr(cOutput,"#{f1}",""+ValueValue())
116                 }
117                 cOutput += 'setvalueChangedEvent("#{f1}")' + nl
118                 cOutput = PrepareEvent(cOutput,valueChangedEventCode(),"#{f1}")
119                 cOutput = substr(cOutput,"#{f1}",valueChangedEventCode())
120                 return cOutput
121
122         func RestoreProperties oDesigner,Item
123                 RestoreCommonProperties(oDesigner,item)
124                 itemdata = item[:data]
125                 setMinimumValue(itemdata[:minimum])
126                 setMaximumValue(itemdata[:maximum])
127                 setRangeValue(itemdata[:range])
128                 setValueValue(itemdata[:value])
129                 SetvalueChangedEventCode(itemdata[:setvalueChangedEvent])