在菜单项中嵌入文本框
这是一个概念验证问题。我正在设计一个 GUI,用于在飞行模拟应用程序中编辑空中交通参与者的航路点。在当前的概念中,所选航路点的参数显示在一堆文本框中。该输入掩码既充当数据视图又充当编辑掩码。编辑字段后,用户可以:
- 保存对航点的更改
- 根据输入创建新的路径点
如果仅需要为新路径点更改某些参数子集,则此设计可以避免重新输入数据。
只有一个问题:在哪里插入路径点?我的答案是“另存为新”按钮上的下拉菜单,其中包含以下菜单项:
- 作为飞行计划的第一个航点
- 所选航路点之前的位置
- 选定航路点后
- 作为飞行计划的最后一个航点
- 在索引位置
最后一项是棘手的。索引位置需要由用户输入,我想避免弹出窗口只要求单个值。
我的想法是:将文本框嵌入到菜单项中。
这种方法在 QT 或 wxWidgets 中可行吗?您对 GUI 设计有何看法?
问候, Arne
PS:请注意,这一切都处于概念阶段。该小组甚至还没有决定使用哪种 GUI 框架:Qt 或 wxWidgets。
this is a proof of concept question. I am designing a GUI for way point editing of air traffic participants in a flight simulation application. In the current concept parameters of a selected way point are shown in bunch of text boxes. This input mask serves as both a view into the data as well as an edit mask. Once fields have been edited the user can either:
- save changes to the way point
- create a new way point based on the input
This design avoids reentering data if only some subset of parameters need to be changed for the new way point.
There is only one problem: where to insert the way point? My answer is a drop down menu on the "Save as new"-button having the following menu items:
- as first way point of Flight Plan
- previous to selected way point
- after selected way point
- as last way point of flight plan
- at index position
The last item is the tricky one. The index position needs to be entered by the user and I would like to avoid a popup window only asking for a single value.
My idea is this: embed a textbox into the menu item.
Is this aproach feasible in QT or wxWidgets? What do you think about the GUI desing?
Regards,
Arne
PS: note that this is all at concept stage. The group has not even decided on the GUI framework to use: Qt or wxWidgets.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的方法在QT中是完全可行的。您可以使用 QWidgetAction 将控件\小部件作为 QMenu 项。下面是一个例子:
希望这有帮助,问候
your approach is completely feasible in QT. You can have controls\widgets as QMenu items using QWidgetAction. Below is an example:
hope this helps, regards
对于任何 Mac OS X 本机 API 来说,这绝对是不可能的,所以不,对于任何官方 wxWidgets API 来说,这是不可能的(尽管 wxFlatMenuBar 可能是这样)。
不管怎样,如果你计划在 OSX 上发布(假设你正在考虑 wx 或 qt),你真的应该意识到,你的 OSX 用户会鄙视你,因为你把文本输入控件放在了菜单上,但它并没有这样做。 t 属于。您的 Windows 用户将会更加宽容。我强烈建议您花时间为此操作设计一个更好、更标准的 UI 设计,我保证一定有这样的设计。
This is definitely not possible with any Mac OS X native API, so no, it's not possible with any official wxWidgets API (though it might be with wxFlatMenuBar).
Either way, if you plan on releasing on OSX (as assumed since you're considering wx or qt), you really should be aware that your OSX users are going to despise you for putting a text input control on a menu where it doesn't belong. Your Windows users will be much more forgiving. I would urge you to take the time to come up with a better, more standard UI design for this action, I guarantee there's one out there.