Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Being able to search objects #1467

Closed
issy123 opened this issue Mar 5, 2017 · 6 comments
Milestone

Comments

@issy123
Copy link

@issy123 issy123 commented Mar 5, 2017

Request

It would be nice if we could search objects by it's id,name or type.

Example

image

Reason

Same as #1462

Note

It would be nice to add custom attributes too! But maybe I ask too much(yeah yeah I repeat myself ik).

@bjorn

This comment has been minimized.

Copy link
Owner

@bjorn bjorn commented Mar 5, 2017

This would be a nice feature, though I would probably prefer the primary search function to take more the form of the Qt Creator "Locate..." (Ctrl+K) feature. The right side of the open documents tab bar seems like a suitable place for something like this.

Of course, that's a little bit more tricky since it involves a bit more complicated input handling. On the other hand, Qt Creator source code can be used as a reference.

@bjorn

This comment has been minimized.

Copy link
Owner

@bjorn bjorn commented Mar 15, 2017

It just occurred to me that another option would be to add a filter box on top of the objects view, like I did in the "Tile Stamps" dock. That shouldn't be very hard to implement. The downside is that it provides no real way of filtering on certain properties specifically, but I think you rarely need that.

@thabetx

This comment has been minimized.

Copy link
Contributor

@thabetx thabetx commented May 7, 2017

I started working on this issue. I'm trying to change the base class for ReversingProxyModel from QAbstractProxyModel to QSortFilterProxyModel and implement the filtering function, would like to know if this would be the preferred approach.

@bjorn

This comment has been minimized.

Copy link
Owner

@bjorn bjorn commented May 7, 2017

@thabetx Nice that you started working on this! Actually turning the ReversingProxyModel into a subclass of QSortFilterProxyModel is likely not going to work or at least will be a lot more complicated than simply chaining these proxies together. Check out how MapEditor::layerComboActivated uses two chained proxy models.

@thabetx

This comment has been minimized.

Copy link
Contributor

@thabetx thabetx commented May 7, 2017

Alright, I thought chaining would be more complicated, I will check it out, thank you.

@thabetx

This comment has been minimized.

Copy link
Contributor

@thabetx thabetx commented May 10, 2017

I'm not sure about group names, should the search match them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.