26
26
width: parent.width
27
27
height: 435//420//340
28
28
property string btn_text: "开始扫描"
29
// property string title: "清理浏览器Cookies"
30
// property string description: "清理浏览器Cookies可以保障系统安全"
31
29
property string title: "清理浏览器登录信息,保护个人隐私"
32
30
property string description: "清理上网时留下的登录信息,目前仅支持Firefox浏览器"
33
31
property string btn_flag: "cookies_scan"
39
37
property int sub_num:coo_sub_num
40
38
property bool check_flag: true
41
39
property bool null_flag: false
40
property int deleget_arrow :0
43
42
signal cookies_signal(string cookies_msg);
44
43
onCookies_signal: {
46
45
//get data of cookies
47
46
// var cookies_data = systemdispatcher.scan_cookies_records_qt();
48
47
var cookies_data = sessiondispatcher.scan_cookies_records_qt();
49
if (cookies_data == "")
48
if (cookies_data == "") {
50
49
root.null_flag = true;
50
if(statusImage.visible == true)
51
statusImage.visible = false;
52
54
root.null_flag = false;
55
statusImage.visible = true;
53
57
root.coo_sub_num = cookies_data.length;
54
58
systemdispatcher.clear_cookies_args();
124
onFinishCleanWorkError: {
125
if (btn_flag == "cookies_work") {
126
if (msg == "cookies") {
127
root.work_result = msg;
128
root.state = "CookiesWorkError";
129
toolkits.alertMSG("清理出现异常!", mainwindow.pos.x, mainwindow.pos.y);
120
133
onFinishCleanWork: {
121
134
if (btn_flag == "cookies_work") {
122
if (msg == "cookies") {
136
resetBtn.visible = true;
138
else if (msg == "cookies") {
123
139
root.work_result = msg;
124
140
root.state = "CookiesWorkFinish";
141
toolkits.alertMSG("清理完毕!", mainwindow.pos.x, mainwindow.pos.y);
142
cookies_signal("CookiesWork");
202
216
cookies_signal("CookiesWork");
203
217
if(root.null_flag == true) {
204
218
root.state = "CookiesWorkEmpty";
205
sessiondispatcher.send_warningdialog_msg("友情提示:","扫描内容为空,不再执行清理!");
220
sessiondispatcher.showWarningDialog("友情提示:","扫描内容为空,不再执行清理!", mainwindow.pos.x, mainwindow.pos.y);
207
222
else if(root.null_flag == false)
208
224
root.state = "CookiesWork";
226
toolkits.alertMSG("扫描完成!", mainwindow.pos.x, mainwindow.pos.y);
210
229
else if (btn_flag == "cookies_work") {
211
230
systemdispatcher.set_user_homedir_qt();
212
231
systemdispatcher.clean_cookies_records_qt(systemdispatcher.get_cookies_args());
213
// sessiondispatcher.clean_cookies_records_qt(systemdispatcher.get_cookies_args());
217
sessiondispatcher.send_warningdialog_msg("友情提示:","对不起,您没有选择需要清理的项,请确认!");
224
//// hoverimage: "scan-start.png"
228
// anchors.verticalCenter: parent.verticalCenter
230
// if(root.check_flag)
233
// if (btn_flag == "cookies_scan") {
234
// cookies_signal("CookiesWork");
235
// if(root.null_flag == true) {
236
// root.state = "CookiesWorkEmpty";
237
// sessiondispatcher.send_warningdialog_msg("友情提示:","扫描内容为空,不再执行清理!");
239
// else if(root.null_flag == false)
240
// root.state = "CookiesWork";
242
// else if (btn_flag == "cookies_work") {
243
// systemdispatcher.set_user_homedir_qt();
244
// systemdispatcher.clean_cookies_records_qt(systemdispatcher.get_cookies_args());
245
//// sessiondispatcher.clean_cookies_records_qt(systemdispatcher.get_cookies_args());
249
// sessiondispatcher.send_warningdialog_msg("友情提示:","对不起,您没有选择需要清理的项,请确认!");
250
// console.log(root.sub_num)
236
sessiondispatcher.showWarningDialog("友情提示:","对不起,您没有选择需要清理的项,请确认!", mainwindow.pos.x, mainwindow.pos.y);
243
iconName: "revoke.png"
245
anchors.verticalCenter: parent.verticalCenter
247
resetBtn.visible = false;
249
root.state = "CookiesWorkAGAIN";
263
262
width: parent.width - 4
269
// id: listViewDelegate
272
// property alias expandedItemCount: subItemRepeater.count
275
// height: headerItemRect.height + subItemsRect.height
278
// //checkbox, picture and words
280
// id: headerItemRect
283
// height: root.itemHeight
289
// fillMode: "PreserveAspectFit"
290
// height: parent.height*0.9
296
// id: status_update_content
298
// anchors.verticalCenter: parent.verticalCenter
301
// font.pointSize: 11
314
// fillMode: "PreserveAspectFit"
315
//// height: parent.height*0.3
320
// source: root.arrow
321
// //当鼠标点击后,箭头图片旋转90度
322
//// rotation: expanded ? 90 : 0
323
// rotation: expanded ? 0 : -180
327
// anchors.fill: parent
329
//// console.log(root.width)
330
// expanded = !expanded
337
// property int itemHeight: root.itemHeight
338
// y: headerItemRect.height
340
// //当高度需要扩展时,根据expandedItemCount数目和itemHeight高度去扩展
341
// height: expanded ? delegate.expandedItemCount * itemHeight : 0
344
// Behavior on height {
345
// SequentialAnimation {
346
// NumberAnimation { duration: 100; easing.type: Easing.InOutQuad }
353
// id: subItemRepeater
354
//// model: attributes
356
//// model: mysubmodel
357
// width: subItemsRect.width
361
// height: subItemsRect.itemHeight
362
//// text: subItemTitle
366
// checkbox_status: root.check_flag
367
//// bgImage: "../../img/icons/list_subitem.png"
369
// fontName: root.subItemFontName
370
// fontSize: root.subItemFontSize
371
// fontColor: root.subItemFontColor
374
// btn_flag: root.btn_flag
376
// onClicked: {/*console.log(number)*/}
386
267
Common.ScrollArea {
388
269
anchors.top: titlebar.bottom
389
anchors.topMargin: 30
390
height: root.height -titlebar.height - 50
270
anchors.topMargin: 20//30
271
anchors.left:parent.left
272
anchors.leftMargin: 27
273
height: root.height -titlebar.height - 37//50
274
width: parent.width -27 -2
393
276
width: parent.width
394
277
height: (root.sub_num + 1) * 40 //450 + //this height must be higher than root.height, then the slidebar can display
398
281
height: parent.height
400
283
delegate: Cleardelegate{
401
sub_num:root.coo_sub_num;sub_model:subModel;btn_flag:root.btn_flag;
284
sub_num:root.coo_sub_num;sub_model:subModel;btn_flag:root.btn_flag;arrow_display:deleget_arrow;
402
285
delegate_flag: false
403
286
onSubpressed: {root.sub_num=hMark}
404
287
onCheckchanged: {root.check_flag=checkchange}
421
304
name: "CookiesWork"
422
PropertyChanges { target: label; visible: true; text: "cookies扫描完成"}
423
PropertyChanges { target: bitButton; /*hoverimage: "clear-start.png"*/ text:"开始清理"}
305
PropertyChanges { target: bitButton; text:"开始清理"}
424
306
PropertyChanges { target: root; btn_flag: "cookies_work" }
307
PropertyChanges { target: statusImage; visible: true; iconName: "yellow.png"; text: "未完成"}
310
name: "CookiesWorkAGAIN"
311
PropertyChanges { target: bitButton; text:"开始扫描" }
312
PropertyChanges { target: root; btn_flag: "cookies_scan" }
313
PropertyChanges { target: statusImage; visible: false }
316
name: "CookiesWorkError"
317
PropertyChanges { target: bitButton; text:"开始扫描" }
318
PropertyChanges { target: root; btn_flag: "cookies_scan" }
319
PropertyChanges { target: statusImage; visible: true; iconName: "red.png"; text: "出现异常"}
427
322
name: "CookiesWorkFinish"
428
PropertyChanges { target: label; visible: true; text: root.work_result + "清理完毕!" }
429
PropertyChanges { target: bitButton; /*hoverimage: "scan-start.png"*/ text:"开始扫描"}
323
PropertyChanges { target: bitButton; text:"开始扫描"}
430
324
PropertyChanges { target: root; btn_flag: "cookies_scan" }
431
PropertyChanges { target: statusImage; iconName: "green.png"; text: "已完成"}
325
PropertyChanges { target: statusImage; visible: true; iconName: "green.png"; text: "已完成"}
434
328
name: "CookiesWorkEmpty"
435
PropertyChanges { target: label; visible: true; text: "扫描内容为空,不再执行清理!" }
436
PropertyChanges { target: bitButton; /*hoverimage: "scan-start.png"*/ text:"开始扫描"}
329
PropertyChanges { target: bitButton; text:"开始扫描"}
437
330
PropertyChanges { target: root; btn_flag: "cookies_scan" }
438
PropertyChanges { target: statusImage; iconName: "green.png"; text: "已完成"}
331
PropertyChanges { target: statusImage; visible: false}