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

In objects view being able to add columns #1462

Closed
issy123 opened this Issue Mar 2, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@issy123

issy123 commented Mar 2, 2017

Request

It would be nice if we could add columns to the objects list. Like id, x,y.
When you right click on the columns you should see a list of columns you can add/remove.

Example

27u04nt

Reason

Same as #1453

Note

It would be nice to add custom attributes too! But maybe I ask too much.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 2, 2017

Owner

It would be nice if we could add columns to the objects list. Like id, x,y.
When you right click on the columns you should see a list of columns you can add/remove.

Good idea! It could be implemented by using QHeaderView::setSectionHidden and Qt::CustomContextMenu.

Same as #1453

What does this have to do with exporting to PNG? Wrong number?

It would be nice to add custom attributes too! But maybe I ask too much.

That is definitely asking too much! :-P

Actually this would be entirely possible, but the implementation would look very different and could work relatively independent of the other feature, so it should just be done in its own patch. You would not use setSectionHidden but would instead talk to the MapObjectModel about adding custom columns.

Owner

bjorn commented Mar 2, 2017

It would be nice if we could add columns to the objects list. Like id, x,y.
When you right click on the columns you should see a list of columns you can add/remove.

Good idea! It could be implemented by using QHeaderView::setSectionHidden and Qt::CustomContextMenu.

Same as #1453

What does this have to do with exporting to PNG? Wrong number?

It would be nice to add custom attributes too! But maybe I ask too much.

That is definitely asking too much! :-P

Actually this would be entirely possible, but the implementation would look very different and could work relatively independent of the other feature, so it should just be done in its own patch. You would not use setSectionHidden but would instead talk to the MapObjectModel about adding custom columns.

@issy123

This comment has been minimized.

Show comment
Hide comment
@issy123

issy123 Mar 5, 2017

Same as #1453

What does this have to do with exporting to PNG? Wrong number?

This:

Some games may have user contributed levels/maps (take for example happy wheels). We want the users to make their own map with tiled and upload a .tmx file.

It has to do with parsing contributed maps and giving the users some information to work with if errors occur.

If I tell the user the object with id x has an invalid value of property y
If he has to click on every single object he has made to get object x, this wouldn't be user-friendly.

You may ask why not refer to object name or type? Well it can be that this is also not defined, the only way to refer to an object with empty values is by it's ID or location (x,y).

Ps. i'm heavily using tiled so expect more feature requests 🏭
Hope you won't mind ghehe

issy123 commented Mar 5, 2017

Same as #1453

What does this have to do with exporting to PNG? Wrong number?

This:

Some games may have user contributed levels/maps (take for example happy wheels). We want the users to make their own map with tiled and upload a .tmx file.

It has to do with parsing contributed maps and giving the users some information to work with if errors occur.

If I tell the user the object with id x has an invalid value of property y
If he has to click on every single object he has made to get object x, this wouldn't be user-friendly.

You may ask why not refer to object name or type? Well it can be that this is also not defined, the only way to refer to an object with empty values is by it's ID or location (x,y).

Ps. i'm heavily using tiled so expect more feature requests 🏭
Hope you won't mind ghehe

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 5, 2017

Owner

Alright, that makes sense.

Ps. i'm heavily using tiled so expect more feature requests
Hope you won't mind ghehe

Not at all, it's great receiving your feedback!

Owner

bjorn commented Mar 5, 2017

Alright, that makes sense.

Ps. i'm heavily using tiled so expect more feature requests
Hope you won't mind ghehe

Not at all, it's great receiving your feedback!

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 5, 2017

Owner

An example implementation of this can be found at https://github.com/rsachetto/sir/blob/0f7d463e9be25c883e49bc734dfc136564c4fe93/src/widgets/treewidgetheader.cpp. Though I'd prefer an implementation that did not rely on subclassing the QHeaderView, but rather used Qt::CustomContextMenu to change the context menu of the existing header.

Owner

bjorn commented Mar 5, 2017

An example implementation of this can be found at https://github.com/rsachetto/sir/blob/0f7d463e9be25c883e49bc734dfc136564c4fe93/src/widgets/treewidgetheader.cpp. Though I'd prefer an implementation that did not rely on subclassing the QHeaderView, but rather used Qt::CustomContextMenu to change the context menu of the existing header.

@bjorn bjorn closed this in f925b8a Mar 15, 2017

arcrowel added a commit to kpresler/tiled that referenced this issue Mar 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment