(self, new_selection)
| 3949 | self.categoryTreeSelected2(new_selection) |
| 3950 | |
| 3951 | def categoryTreeSelected2(self, new_selection): |
| 3952 | global current_category_tree_index |
| 3953 | |
| 3954 | # clear download_table |
| 3955 | self.download_table.setRowCount(0) |
| 3956 | |
| 3957 | # old_selection_index |
| 3958 | old_selection_index = current_category_tree_index |
| 3959 | |
| 3960 | # finding name of old_selection_index |
| 3961 | old_category_tree_item_text = str(old_selection_index.data()) |
| 3962 | |
| 3963 | queue_dict = {'category': old_category_tree_item_text} |
| 3964 | |
| 3965 | # start_checkBox |
| 3966 | if self.start_checkBox.isChecked(): |
| 3967 | queue_dict['start_time_enable'] = 'yes' |
| 3968 | else: |
| 3969 | queue_dict['start_time_enable'] = 'no' |
| 3970 | |
| 3971 | # end_checkBox |
| 3972 | if self.end_checkBox.isChecked(): |
| 3973 | queue_dict['end_time_enable'] = 'yes' |
| 3974 | else: |
| 3975 | queue_dict['end_time_enable'] = 'no' |
| 3976 | |
| 3977 | # start_time_qDataTimeEdit |
| 3978 | start_time = self.start_time_qDataTimeEdit.text() |
| 3979 | queue_dict['start_time'] = str(start_time) |
| 3980 | |
| 3981 | # end_time_qDateTimeEdit |
| 3982 | end_time = self.end_time_qDateTimeEdit.text() |
| 3983 | queue_dict['end_time'] = str(end_time) |
| 3984 | |
| 3985 | # reverse_checkBox |
| 3986 | if self.reverse_checkBox.isChecked(): |
| 3987 | queue_dict['reverse'] = 'yes' |
| 3988 | else: |
| 3989 | queue_dict['reverse'] = 'no' |
| 3990 | |
| 3991 | # after_checkBox |
| 3992 | if self.after_checkBox.isChecked(): |
| 3993 | queue_dict['after_download'] = 'yes' |
| 3994 | else: |
| 3995 | queue_dict['after_download'] = 'no' |
| 3996 | |
| 3997 | # if old_selection_index.data() is equal to None >> It means queue is |
| 3998 | # deleted! and no text (data) available for it |
| 3999 | if old_selection_index.data(): |
| 4000 | |
| 4001 | # update data base |
| 4002 | self.persepolis_db.updateCategoryTable([queue_dict]) |
| 4003 | |
| 4004 | # update download_table |
| 4005 | current_category_tree_index = new_selection |
| 4006 | |
| 4007 | # find category |
| 4008 | current_category_tree_text = str( |
no test coverage detected