~ubuntu-branches/ubuntu/vivid/youker-assistant/vivid

« back to all changes in this revision

Viewing changes to qml/func/FastclearModel.qml

  • Committer: Package Import Robot
  • Author(s): Jack Yu
  • Date: 2013-09-02 23:17:45 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130902231745-psyl14qxslg1g3dp
Tags: 0.1.6-0ubuntu1
* Modify SystemDispatcher and SessionDispatcher Classes.
* Add watch file into debian folder.
* Resolve status of onekey button(LP #1216236 ).
* Add monitorball code into systemdbus daemon.
* Optimize the status button.
* Add fcitx configuration function.
* Fix bugs due to bad references to apt lib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        target: systemdispatcher
35
35
        onFinishCleanWorkSecond: {
36
36
            if (msg == "") {
 
37
                if (cachestatus.visible == true)
 
38
                    cachestatus.visible = false;
 
39
                if (historystatus.visible == true)
 
40
                    historystatus.visible = false;
 
41
                if (cookiestatus.visible == true)
 
42
                    cookiestatus.visible = false;
 
43
                if (unneedstatus.visible == true)
 
44
                    unneedstatus.visible = false;
37
45
                onekeybtn.enabled=true;
38
46
            }
39
47
            else if (msg == "u") {
72
80
    }
73
81
 
74
82
 
75
 
//    Connections
76
 
//    {
77
 
//        target: sessiondispatcher
78
 
//        onFinishCleanWorkSecond: {
79
 
//            if (msg == "") {
80
 
//                onekeybtn.enabled=true;
81
 
//            }
82
 
//            else if (msg == "h") {
83
 
//                historystatus.state = "StatusH";
84
 
//                onekeybtn.enabled=true;
85
 
//            }
86
 
//            else if (msg == "k") {
87
 
//               cookiestatus.state = "StatusK";
88
 
//                onekeybtn.enabled=true;
89
 
//            }
90
 
 
91
 
//        }
92
 
//        onFinishCleanWorkSecondError: {
93
 
//            if (msg == "he") {
94
 
//                historystatus.state = "StatusH1";
95
 
//            }
96
 
//            else if (msg == "ke") {
97
 
//               cookiestatus.state = "StatusK1";
98
 
//            }
99
 
//        }
100
 
//    }
101
 
 
102
 
 
103
83
    //背景
104
84
    Image {
105
85
        source: "../img/skin/bg-bottom-tab.png"
162
142
    Row{
163
143
        anchors { top: parent.top; topMargin: 30;right: parent.right ; rightMargin: 40 }
164
144
        spacing: 20
165
 
        SetBtn {
 
145
        Common.Button {
166
146
            id: onekeybtn
167
 
            iconName: "onekey.png"
 
147
            hoverimage: "green1.png"
168
148
            setbtn_flag: "smallonekey"
 
149
            text:"一键清理"
169
150
            width: 120
170
151
            height: 39
171
152
////如果没有选中任何清理项,提示警告框!
172
153
            onClicked: {
 
154
 
 
155
                if(checkboxe.checked) {
 
156
                    cachestatus.visible = true;
 
157
                    cachestatus.state = "StatusCF";
 
158
                }
 
159
                else
 
160
                    cachestatus.visible = false;
 
161
                if(checkboxe2.checked) {
 
162
                    historystatus.visible = true;
 
163
                    historystatus.state = "StatusHF";
 
164
                }
 
165
                else
 
166
                    historystatus.visible = false;
 
167
                if(checkboxe3.checked) {
 
168
                    cookiestatus.visible = true;
 
169
                    cookiestatus.state = "StatusKF";
 
170
                }
 
171
                else
 
172
                    cookiestatus.visible = false;
 
173
                if(checkboxe4.checked) {
 
174
                    unneedstatus.visible = true;
 
175
                    unneedstatus.state = "StatusUF";
 
176
                }
 
177
                else
 
178
                    unneedstatus.visible = false;
 
179
 
 
180
 
173
181
                if(!(checkboxe.checked||checkboxe2.checked||checkboxe3.checked||checkboxe4.checked))
174
182
                {
175
183
                    onekeybtn.check_flag=false;
210
218
                            font.pixelSize: 14
211
219
                            color: "#008000"
212
220
                        }
213
 
//                        Image {
214
 
//                            id:select
215
 
//                            source: "../img/toolWidget/unfinish.png"
216
 
//                            states: [
217
 
//                                State {
218
 
//                                    name: "middlestate"
219
 
//                                    PropertyChanges { target: select; source: "../img/toolWidget/finish.png"  }
220
 
//                                },
221
 
 
222
 
//                                State {
223
 
//                                    name: "middlestate1"
224
 
//                                    PropertyChanges { target: select; source: "../img/toolWidget/exception.png"  }
225
 
//                                }
226
 
//                            ]
227
 
//                        }
228
221
                    }
229
222
                    Column {
230
223
                        anchors.top: parent.top
296
289
                                        }
297
290
                                    }
298
291
                                }
299
 
                                Image {
 
292
 
 
293
                                Common.StatusImage {
300
294
                                    id: cachestatus
301
 
                                    source: "../img/toolWidget/unfinish.png"
 
295
                                    visible: false
 
296
                                    iconName: "yellow.png"
 
297
                                    text: "未完成"
302
298
                                    anchors {
303
 
//                                        top: itemtip.bottom; topMargin: 20
304
299
                                        left: parent.left; leftMargin: 500
305
300
                                    }
306
301
                                    states: [
307
302
                                            State {
308
303
                                            name: "StatusC"
309
 
                                            PropertyChanges { target: cachestatus; source:"../img/toolWidget/finish.png"}
 
304
                                            PropertyChanges { target: cachestatus; iconName: "green.png"; text: "已完成"}
310
305
                                        },
311
306
 
312
307
                                            State {
313
308
                                            name: "StatusC1"
314
 
                                            PropertyChanges { target: cachestatus; source: "../img/toolWidget/exception.png"}
 
309
                                            PropertyChanges { target: cachestatus; iconName: "red.png"; text: "出现异常"}
 
310
                                        },
 
311
                                        State {
 
312
                                            name: "StatusCF"
 
313
                                            PropertyChanges { target: cachestatus; iconName: "yellow.png"; text: "未完成"}
315
314
                                        }
316
 
 
317
315
                                    ]
318
316
                                }
319
 
 
320
317
                                Rectangle {  //分割条
321
318
                                    width: parent.width; height: 1
322
319
                                    anchors { top: lineLayout.bottom; topMargin: 5}
389
386
                                }
390
387
                            }
391
388
                           }
392
 
                            Image {
 
389
                            Common.StatusImage {
393
390
                                id: historystatus
394
 
                                source: "../img/toolWidget/unfinish.png"
 
391
                                visible: false
 
392
                                iconName: "yellow.png"
 
393
                                text: "未完成"
395
394
                                anchors {
396
 
//                                    top: cachestatus.bottom; topMargin: 45
397
395
                                    left: parent.left; leftMargin: 500
398
396
                                }
399
397
                                states: [
400
398
                                        State {
401
399
                                        name: "StatusH"
402
 
                                        PropertyChanges { target: historystatus; source: "../img/toolWidget/finish.png"}
 
400
                                        PropertyChanges { target: historystatus; iconName: "green.png"; text: "已完成"}
403
401
                                    },
404
402
 
405
403
                                        State {
406
404
                                        name: "StatusH1"
407
 
                                        PropertyChanges { target: historystatus; source: "../img/toolWidget/exception.png"}
 
405
                                        PropertyChanges { target: historystatus; iconName: "red.png"; text: "出现异常"}
 
406
                                    },
 
407
                                    State {
 
408
                                        name: "StatusHF"
 
409
                                        PropertyChanges { target: historystatus; iconName: "yellow.png"; text: "未完成"}
408
410
                                    }
409
 
 
410
411
                                ]
411
412
                            }
412
413
 
484
485
                            }
485
486
                           }
486
487
 
487
 
                            Image {
 
488
                            Common.StatusImage {
488
489
                                id: cookiestatus
489
 
                                source: "../img/toolWidget/unfinish.png"
 
490
                                visible: false
 
491
                                iconName: "yellow.png"
 
492
                                text: "未完成"
490
493
                                anchors {
491
 
//                                    top: historystatus.bottom; topMargin: 45
492
494
                                    left: parent.left; leftMargin: 500
493
495
                                }
494
496
                                states: [
495
497
                                        State {
496
498
                                        name: "StatusK"
497
 
                                        PropertyChanges { target: cookiestatus; source: "../img/toolWidget/finish.png"}
 
499
                                        PropertyChanges { target: cookiestatus; iconName: "green.png"; text: "已完成"}
498
500
                                    },
499
501
 
500
502
                                        State {
501
503
                                        name: "StatusK1"
502
 
                                        PropertyChanges { target: cookiestatus; source: "../img/toolWidget/exception.png"}
 
504
                                        PropertyChanges { target: cookiestatus; iconName: "red.png"; text: "出现异常"}
 
505
                                    },
 
506
                                    State {
 
507
                                        name: "StatusKF"
 
508
                                        PropertyChanges { target: cookiestatus; iconName: "yellow.png"; text: "未完成"}
503
509
                                    }
504
510
 
505
511
                                ]
579
585
                            }
580
586
                          }
581
587
 
582
 
                            Image {
 
588
                            Common.StatusImage {
583
589
                                id: unneedstatus
584
 
                                source: "../img/toolWidget/unfinish.png"
 
590
                                visible: false
 
591
                                iconName: "yellow.png"
 
592
                                text: "未完成"
585
593
                                anchors {
586
 
//                                    top: cookiestatus.bottom; topMargin: 45
587
594
                                    left: parent.left; leftMargin: 500
588
595
                                }
589
596
                                states: [
590
597
                                        State {
591
598
                                        name: "StatusU"
592
 
                                        PropertyChanges { target: unneedstatus; source: "../img/toolWidget/finish.png"}
 
599
                                        PropertyChanges { target: unneedstatus; iconName: "green.png"; text: "已完成"}
593
600
                                    },
594
601
 
595
602
                                        State {
596
603
                                        name: "StatusU1"
597
 
                                        PropertyChanges { target: unneedstatus; source: "../img/toolWidget/exception.png"}
 
604
                                        PropertyChanges { target: unneedstatus; iconName: "red.png"; text: "出现异常"}
 
605
                                    },
 
606
                                    State {
 
607
                                        name: "StatusUF"
 
608
                                        PropertyChanges { target: unneedstatus; iconName: "yellow.png"; text: "未完成"}
598
609
                                    }
599
 
 
600
610
                                ]
601
611
                            }
602
612
 
635
645
            chek.checked="mid"
636
646
    }
637
647
}
 
648
 
 
649
 
 
650
 
 
651
 
 
652
 
 
653
//Rectangle {
 
654
//    id: fastmode
 
655
//    width: parent.width
 
656
//    height: 435
 
657
//    property string onekeypage: "second"
 
658
//    property int num: 4
 
659
//    property int check_num: num
 
660
 
 
661
//    //信号绑定,绑定qt的信号finishCleanWork,该信号emit时触发onFinishCleanWork
 
662
//    Connections
 
663
//    {
 
664
//        target: systemdispatcher
 
665
//        onFinishCleanWorkSecond: {
 
666
//            if (msg == "") {
 
667
//                onekeybtn.enabled=true;
 
668
//            }
 
669
//            else if (msg == "u") {
 
670
//                unneedstatus.state = "StatusU";
 
671
//                onekeybtn.enabled=true;
 
672
//            }
 
673
//            else if (msg == "c") {
 
674
//                cachestatus.state = "StatusC";
 
675
//                onekeybtn.enabled=true;
 
676
//            }
 
677
//            else if (msg == "h") {
 
678
//                historystatus.state = "StatusH";
 
679
//                onekeybtn.enabled=true;
 
680
//            }
 
681
//            else if (msg == "k") {
 
682
//               cookiestatus.state = "StatusK";
 
683
//                onekeybtn.enabled=true;
 
684
//            }
 
685
 
 
686
//        }
 
687
 
 
688
//        onFinishCleanWorkSecondError: {
 
689
//            if (msg == "ue") {
 
690
//                unneedstatus.state = "StatusU1";
 
691
//            }
 
692
//            else if (msg == "ce") {
 
693
//                cachestatus.state = "StatusC1";
 
694
//            }
 
695
//            else if (msg == "he") {
 
696
//                historystatus.state = "StatusH1";
 
697
//            }
 
698
//            else if (msg == "ke") {
 
699
//               cookiestatus.state = "StatusK1";
 
700
//            }
 
701
//        }
 
702
//    }
 
703
 
 
704
 
 
705
////    Connections
 
706
////    {
 
707
////        target: sessiondispatcher
 
708
////        onFinishCleanWorkSecond: {
 
709
////            if (msg == "") {
 
710
////                onekeybtn.enabled=true;
 
711
////            }
 
712
////            else if (msg == "h") {
 
713
////                historystatus.state = "StatusH";
 
714
////                onekeybtn.enabled=true;
 
715
////            }
 
716
////            else if (msg == "k") {
 
717
////               cookiestatus.state = "StatusK";
 
718
////                onekeybtn.enabled=true;
 
719
////            }
 
720
 
 
721
////        }
 
722
////        onFinishCleanWorkSecondError: {
 
723
////            if (msg == "he") {
 
724
////                historystatus.state = "StatusH1";
 
725
////            }
 
726
////            else if (msg == "ke") {
 
727
////               cookiestatus.state = "StatusK1";
 
728
////            }
 
729
////        }
 
730
////    }
 
731
 
 
732
 
 
733
//    //背景
 
734
//    Image {
 
735
//        source: "../img/skin/bg-bottom-tab.png"
 
736
//        anchors.fill: parent
 
737
//    }
 
738
 
 
739
//    //上下分割条
 
740
//    Rectangle {id: splitbar1; x: 2; y: 80; width: parent.width-4; height: 1; color: "#b9c5cc" }
 
741
//    Rectangle {id: splitbar2; x: 2; y: 82; width: parent.width-4; height: 1; color: "#fafcfe" }
 
742
 
 
743
//    Rectangle {id: splitbar11; x: 2; y: 110; width: parent.width-4; height: 1; color: "#b9c5cc" }
 
744
//    Rectangle {id: splitbar12; x: 2; y: 112; width: parent.width-4; height: 1; color: "#fafcfe" }
 
745
 
 
746
//    Rectangle {id: splitbar3; x: 2; y: 166; width: parent.width-4; height: 1; color: "#b9c5cc" }
 
747
//    Rectangle {id: splitbar4; x: 2; y: 168; width: parent.width-4; height: 1; color: "#fafcfe" }
 
748
 
 
749
//    Rectangle {id: splitbar5; x: 2; y: 234; width: parent.width-4; height: 1; color: "#b9c5cc" }
 
750
//    Rectangle {id: splitbar6; x: 2; y: 236; width: parent.width-4; height: 1; color: "#fafcfe" }
 
751
 
 
752
//    Rectangle {id: splitbar7; x: 2; y: 304; width: parent.width-4; height: 1; color: "#b9c5cc" }
 
753
//    Rectangle {id: splitbar8; x: 2; y: 306; width: parent.width-4; height: 1; color: "#fafcfe" }
 
754
 
 
755
//    Rectangle {id: splitbar9; x: 2; y: 374; width: parent.width-4; height: 1; color: "#b9c5cc" }
 
756
//    Rectangle {id: splitbar10; x: 2; y: 376; width: parent.width-4; height: 1; color: "#fafcfe" }
 
757
 
 
758
 
 
759
////    Row {
 
760
 
 
761
////        Column {
 
762
////            width: parent.width
 
763
//    Row {
 
764
//        id: myrow
 
765
//        spacing: 10
 
766
//        anchors { top: parent.top; topMargin: 20; left: parent.left; leftMargin: 20 }
 
767
//        AnimatedImage {
 
768
//            id: refreshArrow
 
769
//            source: "../img/toolWidget/clear-movie.gif"
 
770
//        }
 
771
//        Column {
 
772
//            spacing: 10
 
773
//            id: mycolumn
 
774
//            Text {
 
775
//                id: text0
 
776
//                width: 69
 
777
//                text: qsTr("全面清理电脑中的垃圾、缓存和痕迹,只需要一个按键!")
 
778
//                font.bold: true
 
779
//                font.pixelSize: 14
 
780
//                color: "#383838"
 
781
//            }
 
782
//            Text {
 
783
//                id: text
 
784
//                width: 69
 
785
////                    text: qsTr("全面清理垃圾、痕迹、注册表,高效率解决系统清理问题.")
 
786
//                text: qsTr("一键帮您节省磁盘空间,清理电脑中的垃圾,让系统运行更加快速。")
 
787
//                font.pixelSize: 12
 
788
//                color: "#7a7a7a"
 
789
//            }
 
790
//        }
 
791
//    }
 
792
//    Row{
 
793
//        anchors { top: parent.top; topMargin: 30;right: parent.right ; rightMargin: 40 }
 
794
//        spacing: 20
 
795
////        SetBtn {
 
796
////            id: onekeybtn
 
797
//////            iconName: "onekey.png"
 
798
////            iconName: "green1.png"
 
799
////            setbtn_flag: "smallonekey"
 
800
////            text: "一键清理"
 
801
////            width: 120
 
802
////            height: 39
 
803
////////如果没有选中任何清理项,提示警告框!
 
804
////            onClicked: {
 
805
////                if(!(checkboxe.checked||checkboxe2.checked||checkboxe3.checked||checkboxe4.checked))
 
806
////                {
 
807
////                    onekeybtn.check_flag=false;
 
808
 
 
809
//////                            sessiondispatcher.send_warningdialog_msg("友情提示:","对不起,您没有选中清理项,请确认!");
 
810
////                }
 
811
////                else
 
812
////                    onekeybtn.check_flag=true;
 
813
//////                            select.state="middlestate";
 
814
//////                            if(checkboxe.checked&&checkboxe2.checked&&checkboxe3.checked&&checkboxe4.checked)
 
815
//////                            {
 
816
//////                                select.state="middlestate1";
 
817
//////                            }
 
818
 
 
819
////            }
 
820
////        }
 
821
//        Common.Button {
 
822
//            id: onekeybtn
 
823
//            hoverimage: "green1.png"
 
824
//            setbtn_flag: "smallonekey"
 
825
//            text:"一键清理"
 
826
//            width: 120
 
827
//            height: 39
 
828
//////如果没有选中任何清理项,提示警告框!
 
829
//            onClicked: {
 
830
//                if(!(checkboxe.checked||checkboxe2.checked||checkboxe3.checked||checkboxe4.checked))
 
831
//                {
 
832
//                    onekeybtn.check_flag=false;
 
833
 
 
834
////                            sessiondispatcher.send_warningdialog_msg("友情提示:","对不起,您没有选中清理项,请确认!");
 
835
//                }
 
836
//                else
 
837
//                    onekeybtn.check_flag=true;
 
838
////                            select.state="middlestate";
 
839
////                            if(checkboxe.checked&&checkboxe2.checked&&checkboxe3.checked&&checkboxe4.checked)
 
840
////                            {
 
841
////                                select.state="middlestate1";
 
842
////                            }
 
843
 
 
844
//            }
 
845
//        }
 
846
 
 
847
//    }//Row
 
848
////------begin new Layout
 
849
//            Column {
 
850
//                anchors.top: parent.top
 
851
//                anchors.topMargin: 90
 
852
//                anchors.left: parent.left
 
853
//                anchors.leftMargin: 25
 
854
//                spacing:25
 
855
//                Item {
 
856
//                    id: views
 
857
//                    width: parent.width ////ListView不会随鼠标上下移动
 
858
//        //                width:fastmode.width -10 //ListView会随鼠标上下移动
 
859
//                    height: fastmode.height - refreshArrow.height - 10*2 - 20 -10
 
860
 
 
861
//                    Row{
 
862
//                        spacing: 10
 
863
//                        Common.Label {
 
864
//                            id: itemtip
 
865
//                            text: "一键清理项目"
 
866
//                            font.bold: true
 
867
//                            font.pixelSize: 14
 
868
//                            color: "#008000"
 
869
//                        }
 
870
////                        Image {
 
871
////                            id:select
 
872
////                            source: "../img/toolWidget/unfinish.png"
 
873
////                            states: [
 
874
////                                State {
 
875
////                                    name: "middlestate"
 
876
////                                    PropertyChanges { target: select; source: "../img/toolWidget/finish.png"  }
 
877
////                                },
 
878
 
 
879
////                                State {
 
880
////                                    name: "middlestate1"
 
881
////                                    PropertyChanges { target: select; source: "../img/toolWidget/exception.png"  }
 
882
////                                }
 
883
////                            ]
 
884
////                        }
 
885
//                    }
 
886
//                    Column {
 
887
//                        anchors.top: parent.top
 
888
//                        anchors.topMargin: 50   //110
 
889
//                        anchors.left: parent.left
 
890
//                        anchors.leftMargin: 45
 
891
//                        spacing:25
 
892
//                        Item {
 
893
//                            property SessionDispatcher dis: sessiondispatcher
 
894
//                            width: parent.width //clearDelegate.ListView.view.width
 
895
//                            height:45 //65
 
896
 
 
897
//                            Item {
 
898
//                                Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
 
899
//                                id: scaleMe
 
900
//                                //checkbox, picture and words
 
901
//                                Row {
 
902
//                                    id: lineLayout
 
903
//                                    spacing: 15
 
904
//                                    anchors.verticalCenter: parent.verticalCenter
 
905
////                                        left: parent.left
 
906
////                                        leftMargin: 50
 
907
 
 
908
//                                    Common.CheckBox {
 
909
//                                        id: checkboxe
 
910
//                                        checked:true    //将所有选项都check
 
911
//                                        anchors.verticalCenter: parent.verticalCenter
 
912
//                                        onCheckedChanged: {
 
913
//                                            if(checkboxe.checked)
 
914
//                                                fastmode.check_num=fastmode.check_num+1;
 
915
//                                            else fastmode.check_num=fastmode.check_num-1;
 
916
 
 
917
//                                            if (checkboxe.checked) {
 
918
//                                                        var rubbishlist = systemdispatcher.get_onekey_args2();
 
919
//                                                        var word_flag = "false";
 
920
//                                                        for (var i=0; i<rubbishlist.length; i++) {
 
921
//                                                            if (rubbishlist[i] == "cache") {
 
922
//                                                                word_flag = "true";
 
923
//                                                                break;
 
924
//                                                            }
 
925
//                                                        }
 
926
//                                                        if (word_flag == "false") {
 
927
//                                                            systemdispatcher.set_onekey_args2("cache");
 
928
//                                                        }
 
929
//                                            }
 
930
//                                            else if (!checkboxe.checked) {
 
931
//                                                    systemdispatcher.del_onekey_args2("cache");
 
932
//                                                }
 
933
//                                        }
 
934
//                                    }
 
935
//                                    Image {
 
936
//                                        id: clearImage1
 
937
//                                        width: 40; height: 42
 
938
//                                        source:"../img/toolWidget/brush.png" //picturename
 
939
//                                    }
 
940
 
 
941
//                                    Column {
 
942
//                                        spacing: 5
 
943
//                                        Text {
 
944
//                                            text: "清理垃圾"//titlename
 
945
//                                            font.bold: true
 
946
//                                            font.pixelSize: 14
 
947
//                                            color: "#383838"
 
948
//                                        }
 
949
//                                        Text {
 
950
//                                            text: "清理系统中的垃圾文件,释放磁盘空间"//detailstr
 
951
//                                            font.pixelSize: 12
 
952
//                                            color: "#7a7a7a"
 
953
//                                        }
 
954
//                                    }
 
955
//                                }
 
956
 
 
957
//                                Common.StatusImage {
 
958
//                                    id: cachestatus
 
959
//                                    iconName: "yellow.png"
 
960
//                                    text: "未完成"
 
961
//                                    anchors {
 
962
//                                        left: parent.left; leftMargin: 500
 
963
//                                    }
 
964
//                                    states: [
 
965
//                                            State {
 
966
//                                            name: "StatusC"
 
967
//                                            PropertyChanges { target: cachestatus; iconName: "green.png"; text: "已完成"}
 
968
//                                        },
 
969
 
 
970
//                                            State {
 
971
//                                            name: "StatusC1"
 
972
//                                            PropertyChanges { target: cachestatus; iconName: "red.png"; text: "出现异常"}
 
973
//                                        }
 
974
//                                    ]
 
975
//                                }
 
976
////                                Image {
 
977
////                                    id: cachestatus
 
978
////                                    source: "../img/toolWidget/unfinish.png"
 
979
////                                    anchors {
 
980
//////                                        top: itemtip.bottom; topMargin: 20
 
981
////                                        left: parent.left; leftMargin: 500
 
982
////                                    }
 
983
////                                    states: [
 
984
////                                            State {
 
985
////                                            name: "StatusC"
 
986
////                                            PropertyChanges { target: cachestatus; source:"../img/toolWidget/finish.png"}
 
987
////                                        },
 
988
 
 
989
////                                            State {
 
990
////                                            name: "StatusC1"
 
991
////                                            PropertyChanges { target: cachestatus; source: "../img/toolWidget/exception.png"}
 
992
////                                        }
 
993
 
 
994
////                                    ]
 
995
////                                }
 
996
 
 
997
//                                Rectangle {  //分割条
 
998
//                                    width: parent.width; height: 1
 
999
//                                    anchors { top: lineLayout.bottom; topMargin: 5}
 
1000
//                                    color: "gray"
 
1001
//                                }
 
1002
//                            }
 
1003
//                        }
 
1004
 
 
1005
//            //----------------------------
 
1006
//                        Item {
 
1007
//                        property SessionDispatcher dis: sessiondispatcher
 
1008
//                        width: parent.width//clearDelegate.ListView.view.width
 
1009
//                        height: 45//65
 
1010
 
 
1011
//                        Item {
 
1012
//                            Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
 
1013
//                            id: scaleMe1
 
1014
//                            //checkbox, picture and words
 
1015
//                            Row {
 
1016
//                                id: lineLayout1
 
1017
//                                spacing: 15
 
1018
//                                anchors.verticalCenter: parent.verticalCenter
 
1019
//                               Common.CheckBox {
 
1020
//                                    id: checkboxe2
 
1021
//                                    checked:true    //将所有选项都check
 
1022
//                                    anchors.verticalCenter: parent.verticalCenter
 
1023
//                                    onCheckedChanged: {
 
1024
//                                        if(checkboxe2.checked)
 
1025
//                                            fastmode.check_num=fastmode.check_num+1;
 
1026
//                                        else fastmode.check_num=fastmode.check_num-1;
 
1027
 
 
1028
//                                        if (checkboxe2.checked) {
 
1029
//                                                    var historylist = systemdispatcher.get_onekey_args2();
 
1030
//                                                    var word_flag1 = "false";
 
1031
//                                                    for (var j=0; j<historylist.length; j++) {
 
1032
//                                                        if (historylist[j] == "history") {
 
1033
//                                                            word_flag1 = "true";
 
1034
//                                                            break;
 
1035
//                                                        }
 
1036
//                                                    }
 
1037
//                                                    if (word_flag1 == "false") {
 
1038
//                                                        systemdispatcher.set_onekey_args2("history");
 
1039
//                                                    }
 
1040
//                                        }
 
1041
//                                        else if (!checkboxe2.checked) {
 
1042
//                                                systemdispatcher.del_onekey_args2("history");
 
1043
//                                            }
 
1044
//                                    }
 
1045
//                                }
 
1046
 
 
1047
 
 
1048
//                            Image {
 
1049
//                                id: clearImage2
 
1050
//                                width: 40; height: 42
 
1051
//                                source: "../img/toolWidget/history.png"//picturename
 
1052
//                            }
 
1053
 
 
1054
//                            Column {
 
1055
//                                spacing: 5
 
1056
//                                Text {
 
1057
//                                    text: "清理历史记录"//titlename
 
1058
//                                    font.bold: true
 
1059
//                                    font.pixelSize: 14
 
1060
//                                    color: "#383838"
 
1061
//                                }
 
1062
//                                Text {
 
1063
//                                    text: "清理上网时留下的历史记录,保护您的个人隐私"//detailstr
 
1064
//                                    font.pixelSize: 12
 
1065
//                                    color: "#7a7a7a"
 
1066
//                                }
 
1067
//                            }
 
1068
//                           }
 
1069
//                            Common.StatusImage {
 
1070
//                                id: historystatus
 
1071
//                                iconName: "yellow.png"
 
1072
//                                text: "未完成"
 
1073
//                                anchors {
 
1074
//                                    left: parent.left; leftMargin: 500
 
1075
//                                }
 
1076
//                                states: [
 
1077
//                                        State {
 
1078
//                                        name: "StatusH"
 
1079
//                                        PropertyChanges { target: historystatus; iconName: "green.png"; text: "已完成"}
 
1080
//                                    },
 
1081
 
 
1082
//                                        State {
 
1083
//                                        name: "StatusH1"
 
1084
//                                        PropertyChanges { target: historystatus; iconName: "red.png"; text: "出现异常"}
 
1085
//                                    }
 
1086
//                                ]
 
1087
//                            }
 
1088
 
 
1089
////                            Image {
 
1090
////                                id: historystatus
 
1091
////                                source: "../img/toolWidget/unfinish.png"
 
1092
////                                anchors {
 
1093
//////                                    top: cachestatus.bottom; topMargin: 45
 
1094
////                                    left: parent.left; leftMargin: 500
 
1095
////                                }
 
1096
////                                states: [
 
1097
////                                        State {
 
1098
////                                        name: "StatusH"
 
1099
////                                        PropertyChanges { target: historystatus; source: "../img/toolWidget/finish.png"}
 
1100
////                                    },
 
1101
 
 
1102
////                                        State {
 
1103
////                                        name: "StatusH1"
 
1104
////                                        PropertyChanges { target: historystatus; source: "../img/toolWidget/exception.png"}
 
1105
////                                    }
 
1106
 
 
1107
////                                ]
 
1108
////                            }
 
1109
 
 
1110
//                            Rectangle {  //分割条
 
1111
//                                width: parent.width; height: 1
 
1112
//                                anchors { top: historystatus.bottom; topMargin: 5}
 
1113
//                                color: "gray"
 
1114
//                            }
 
1115
 
 
1116
//                        }
 
1117
//                      }
 
1118
//            //----------------------------
 
1119
//                        Item {
 
1120
//                        property SessionDispatcher dis: sessiondispatcher
 
1121
//                        width: parent.width//clearDelegate.ListView.view.width
 
1122
//                        height: 45//65
 
1123
 
 
1124
//                        Item {
 
1125
//                            Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
 
1126
//                            id: scaleMe2
 
1127
//                            //checkbox, picture and words
 
1128
//                            Row {
 
1129
//                                id: lineLayout2
 
1130
//                                spacing: 15
 
1131
//                                anchors.verticalCenter: parent.verticalCenter
 
1132
//                               Common.CheckBox {
 
1133
//                                    id: checkboxe3
 
1134
//                                    checked:true    //将所有选项都check
 
1135
//                                    anchors.verticalCenter: parent.verticalCenter
 
1136
//                                    onCheckedChanged: {
 
1137
//                                        if(checkboxe3.checked)
 
1138
//                                            fastmode.check_num=fastmode.check_num+1;
 
1139
//                                        else fastmode.check_num=fastmode.check_num-1;
 
1140
 
 
1141
//                                        if (checkboxe3.checked) {
 
1142
//                                                    var cookieslist = systemdispatcher.get_onekey_args2();
 
1143
//                                                    var word_flag2 = "false";
 
1144
//                                                    for (var k=0; k<cookieslist.length; k++) {
 
1145
//                                                        if (cookieslist[k] == "cookies") {
 
1146
//                                                            word_flag2 = "true";
 
1147
//                                                            break;
 
1148
//                                                        }
 
1149
//                                                    }
 
1150
//                                                    if (word_flag2 == "false") {
 
1151
//                                                        systemdispatcher.set_onekey_args2("cookies");
 
1152
//                                                    }
 
1153
//                                        }
 
1154
//                                        else if (!checkboxe3.checked) {
 
1155
//                                                systemdispatcher.del_onekey_args2("cookies");
 
1156
//                                            }
 
1157
//                                    }
 
1158
//                                }
 
1159
 
 
1160
 
 
1161
//                            Image {
 
1162
//                                id: clearImage3
 
1163
//                                width: 40; height: 42
 
1164
//                                source: "../img/toolWidget/cookies.png"//picturename
 
1165
 
 
1166
//                            }
 
1167
 
 
1168
//                            Column {
 
1169
//                                spacing: 5
 
1170
//                                Text {
 
1171
//                                    text: "清理Cookies"//titlename
 
1172
//                                    font.bold: true
 
1173
//                                    font.pixelSize: 14
 
1174
//                                    color: "#383838"
 
1175
//                                }
 
1176
//                                Text {
 
1177
//                                    text: "清理上网时产生的Cookies,还浏览器一片天空"//detailstr
 
1178
//                                    font.pixelSize: 12
 
1179
//                                    color: "#7a7a7a"
 
1180
//                                }
 
1181
//                            }
 
1182
//                           }
 
1183
 
 
1184
//                            Common.StatusImage {
 
1185
//                                id: cookiestatus
 
1186
//                                iconName: "yellow.png"
 
1187
//                                text: "未完成"
 
1188
//                                anchors {
 
1189
//                                    left: parent.left; leftMargin: 500
 
1190
//                                }
 
1191
//                                states: [
 
1192
//                                        State {
 
1193
//                                        name: "StatusK"
 
1194
//                                        PropertyChanges { target: cookiestatus; iconName: "green.png"; text: "已完成"}
 
1195
//                                    },
 
1196
 
 
1197
//                                        State {
 
1198
//                                        name: "StatusK1"
 
1199
//                                        PropertyChanges { target: cookiestatus; iconName: "red.png"; text: "出现异常"}
 
1200
//                                    }
 
1201
 
 
1202
//                                ]
 
1203
//                            }
 
1204
////                            Image {
 
1205
////                                id: cookiestatus
 
1206
////                                source: "../img/toolWidget/unfinish.png"
 
1207
////                                anchors {
 
1208
//////                                    top: historystatus.bottom; topMargin: 45
 
1209
////                                    left: parent.left; leftMargin: 500
 
1210
////                                }
 
1211
////                                states: [
 
1212
////                                        State {
 
1213
////                                        name: "StatusK"
 
1214
////                                        PropertyChanges { target: cookiestatus; source: "../img/toolWidget/finish.png"}
 
1215
////                                    },
 
1216
 
 
1217
////                                        State {
 
1218
////                                        name: "StatusK1"
 
1219
////                                        PropertyChanges { target: cookiestatus; source: "../img/toolWidget/exception.png"}
 
1220
////                                    }
 
1221
 
 
1222
////                                ]
 
1223
////                            }
 
1224
 
 
1225
//                            Rectangle {  //分割条
 
1226
//                                width: parent.width; height: 1
 
1227
//                                anchors { top: cookiestatus.bottom; topMargin: 5}
 
1228
//                                color: "gray"
 
1229
//                            }
 
1230
 
 
1231
//                        }
 
1232
//                      }
 
1233
//            //----------------------------
 
1234
//                        Item {
 
1235
//                        property SessionDispatcher dis: sessiondispatcher
 
1236
//                        width: parent.width//clearDelegate.ListView.view.width
 
1237
//                        height: 45//65
 
1238
 
 
1239
//                        Item {
 
1240
//                            Behavior on scale { NumberAnimation { easing.type: Easing.InOutQuad} }
 
1241
//                            id: scaleMe3
 
1242
//                            //checkbox, picture and words
 
1243
//                            Row {
 
1244
//                                id: lineLayout3
 
1245
//                                spacing: 15
 
1246
//                                anchors.verticalCenter: parent.verticalCenter
 
1247
//                               Common.CheckBox {
 
1248
//                                    id: checkboxe4
 
1249
//                                    checked:true    //将所有选项都check
 
1250
//                                    anchors.verticalCenter: parent.verticalCenter
 
1251
//                                    onCheckedChanged: {
 
1252
//                                        if(checkboxe4.checked)
 
1253
//                                            fastmode.check_num=fastmode.check_num+1;
 
1254
//                                        else fastmode.check_num=fastmode.check_num-1;
 
1255
 
 
1256
//                                        if (checkboxe4.checked) {
 
1257
//                                                    var mylist = systemdispatcher.get_onekey_args2();
 
1258
//                                                    var word_flag3 = "false";
 
1259
//                                                    for (var q=0; q<mylist.length; q++) {
 
1260
//                                                        if (mylist[q] == "unneed") {
 
1261
//                                                            word_flag3 = "true";
 
1262
//                                                            break;
 
1263
//                                                        }
 
1264
//                                                    }
 
1265
//                                                    if (word_flag3 == "false") {
 
1266
//                                                        systemdispatcher.set_onekey_args2("unneed");
 
1267
//                                                    }
 
1268
//                                        }
 
1269
//                                        else if (!checkboxe4.checked) {
 
1270
//                                                systemdispatcher.del_onekey_args2("unneed");
 
1271
//                                            }
 
1272
//                                    }
 
1273
//                                }
 
1274
 
 
1275
 
 
1276
//                            Image {
 
1277
//                                id: clearImage4
 
1278
//                                width: 40; height: 42
 
1279
//                                source: "../img/toolWidget/deb.png"//picturename
 
1280
 
 
1281
//                            }
 
1282
 
 
1283
//                            Column {
 
1284
//                                spacing: 5
 
1285
//                                Text {
 
1286
//                                    text: "卸载不必要的程序"//titlename
 
1287
//                                    font.bold: true
 
1288
//                                    font.pixelSize: 14
 
1289
//                                    color: "#383838"
 
1290
//                                }
 
1291
//                                Text {
 
1292
//                                    text: "清理软件安装过程中安装的依赖程序,提高系统性能"//detailstr
 
1293
//                                    font.pixelSize: 12
 
1294
//                                    color: "#7a7a7a"
 
1295
//                                }
 
1296
//                            }
 
1297
//                          }
 
1298
 
 
1299
//                            Common.StatusImage {
 
1300
//                                id: unneedstatus
 
1301
//                                iconName: "yellow.png"
 
1302
//                                text: "未完成"
 
1303
//                                anchors {
 
1304
//                                    left: parent.left; leftMargin: 500
 
1305
//                                }
 
1306
//                                states: [
 
1307
//                                        State {
 
1308
//                                        name: "StatusU"
 
1309
//                                        PropertyChanges { target: unneedstatus; iconName: "green.png"; text: "已完成"}
 
1310
//                                    },
 
1311
 
 
1312
//                                        State {
 
1313
//                                        name: "StatusU1"
 
1314
//                                        PropertyChanges { target: unneedstatus; iconName: "red.png"; text: "出现异常"}
 
1315
//                                    }
 
1316
//                                ]
 
1317
//                            }
 
1318
 
 
1319
////                            Image {
 
1320
////                                id: unneedstatus
 
1321
////                                source: "../img/toolWidget/unfinish.png"
 
1322
////                                anchors {
 
1323
//////                                    top: cookiestatus.bottom; topMargin: 45
 
1324
////                                    left: parent.left; leftMargin: 500
 
1325
////                                }
 
1326
////                                states: [
 
1327
////                                        State {
 
1328
////                                        name: "StatusU"
 
1329
////                                        PropertyChanges { target: unneedstatus; source: "../img/toolWidget/finish.png"}
 
1330
////                                    },
 
1331
 
 
1332
////                                        State {
 
1333
////                                        name: "StatusU1"
 
1334
////                                        PropertyChanges { target: unneedstatus; source: "../img/toolWidget/exception.png"}
 
1335
////                                    }
 
1336
 
 
1337
////                                ]
 
1338
////                            }
 
1339
 
 
1340
//                            Rectangle {  //分割条
 
1341
//                                width: parent.width; height: 1
 
1342
//                                anchors { top: unneedstatus.bottom; topMargin: 5}
 
1343
//                                color: "gray"
 
1344
//                            }
 
1345
 
 
1346
//                        }
 
1347
//                      }
 
1348
//                   }//Column
 
1349
//                }//Item
 
1350
////            }//Column
 
1351
////------end new layout
 
1352
//    }//Row
 
1353
//    Common.MainCheckBox {
 
1354
//        id:chek
 
1355
//        x:116
 
1356
//        y:92
 
1357
//        checked:"true"    //将所有选项都check
 
1358
////                            background: red
 
1359
//        onCheckedboolChanged: {
 
1360
//            checkboxe.checked = chek.checkedbool;
 
1361
//            checkboxe2.checked = chek.checkedbool;
 
1362
//            checkboxe3.checked = chek.checkedbool;
 
1363
//            checkboxe4.checked = chek.checkedbool;
 
1364
//        }
 
1365
//    }
 
1366
//    onCheck_numChanged: {
 
1367
//        if(check_num==0)
 
1368
//            chek.checked="false"
 
1369
//        else if(check_num==num)
 
1370
//            chek.checked="true"
 
1371
//        else
 
1372
//            chek.checked="mid"
 
1373
//    }
 
1374
//}