Utils::Action Class
class Utils::ActionAction 类适用于对“当前”的字符串类型参数(通常为文件名)进行操作的操作,例如“保存文件 %1”。更多内容...
| Header: | #include <Action> |
公共函数
| QString | emptyText() const |
| Utils::Action::EnablingMode | enablingMode() const |
| QString | parameterText() const |
| void | setEmptyText(const QString &) |
| void | setEnablingMode(Utils::Action::EnablingMode m) |
| void | setParameterText(const QString &) |
详细说明
该操作有 2 种状态:
- <无当前参数> 显示“执行 XX”(空文本)
- <存在参数> 显示“执行 XX 并使用 %1”。
提供了一个槽用于设置参数,并据此相应地更改显示内容和启用状态。传入的文本应已翻译;parameterText 中应包含一个 %1,该位置将插入参数。
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.