-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Dynamic export options #9271
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
Dynamic export options #9271
Conversation
d7f233b
to
6351a4c
Compare
18b116a
to
2019200
Compare
15c0a01
to
1fe0a64
Compare
Component.onCompleted: { | ||
// NOTE: position dialog so entire content is visible | ||
y = -250 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain what problem you are solving with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the export dialog we have static components and dynamically loaded. At the time export dialog is positioned on the screen we only know about static ones -> and it is positioned correctly in the center. But when dynamic components are loaded, the dialog grows in height but the dialog does not reposition itself again: that means a part of the dialog gets rendered below the screen and it's not visible.
This is just a hack to move window a bit more to the top so it doesn't matter which format you choose, you always see entire dialog on the screen.
Do you have any ideas how to solve that riddle without this ugly hack?
@@ -26,4 +26,45 @@ class ExportChannelsPref | |||
}; | |||
Q_ENUM(ExportChannels) | |||
}; | |||
|
|||
class ExportOptionType |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These refer to the UI framework from within an application-logic source file. We had this discussion about the delete behavior (https://mu--se.slack.com/archives/C06RX437GJV/p1755682183400249 - restricted access) and there's a way of keeping this ui-agnostic here and converting to a ui-specific type in a view
directory.
This is a bit more work, though, so I'm not sure it's worthwhile. Only if you have some spare energy and you don't find the idea too silly :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible I'd really like to reduce all possible fat off of this big, big source file. Things I see possible:
- Gathering those properties that are used in 6 different place in a dedicated file, as explained in an inline comment.
- Place the components defined at the bottom of the file in their own source files.
- Use the
RadioButtonGroup
withid: channelsGroup
properly, making use of itsmodel
property (seeDeleteBehaviorPanel.qml
for an example) - Use Row and Column in place of RowLayout and ColumnLayout where possible ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- All of these components are so small after a cleanup that it doesn't really make sense to me to put a separate file with this for example:
Component {
id: enumComp
StyledDropdown {
property var option
model: option.names
currentIndex: option.value
onActivated: function(index, value) {
dynamicOptionsModel.setData(dynamicOptionsModel.index(option.index, 0),
option.values[index],
ExportOptionType.ValueRole)
}
}
}
left it as is
- About RadioButtonGroup: I have it planned to do here: Implement custom mapping for export channels #8963
1fe0a64
to
e0210ab
Compare
Resolves: #9207
Resolves: #9232
Resolves: #9205
Resolves: #9220
Resolves: #9162
Recommended: