HumanSignal / labelImg

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.
https://youtu.be/p0nR2YsCY_U
MIT License
22.73k stars 6.3k forks source link

where is the dropdown box located. I need to replace it with a combobox, i.e. checkboxes as options under dropdown box so that I can select multiple options as filter. Also, when it is getting filtered, I want the searched options to be on the top and others go down or get invisible. Please tell me where should I edit for this and how to do it. #691

Open SrutiBh opened 3 years ago

SrutiBh commented 3 years ago
tzutalin commented 3 years ago

First, replace ComboBox with your widget https://github.com/tzutalin/labelImg/blob/master/labelImg.py#L144-L145

You can define your widget under libs/ folder.

  1. Create your own widget
  2. Your own widget will call parent's method
  3. And parent method will tell other widgets to update

For the first and second, you can reference combobox.py and https://github.com/tzutalin/labelImg/blob/master/labelImg.py#L144-L145

libs/combobox.py
When combox changes, it will call its parent widget's comboSelectionChanged method to tell if something has been changed in this combo box
        self.cb.currentIndexChanged.connect(parent.comboSelectionChanged)

comboSelectionChanged method in labelimg.py

For third one, https://github.com/tzutalin/labelImg/blob/master/labelImg.py#L878-L886