Utils::StringAspect Class
class Utils::StringAspect문자열 측면이란 특정 객체의 문자열과 유사한 속성과, 시각화나 영구 저장 같은 일반적인 연산에 대한 동작 설명을 함께 의미합니다. 더 보기...
| Header: | #include <StringAspect> |
| Inherits: | Utils::TypedAspect |
공개 유형
| enum | DisplayStyle { LabelDisplay, LineEditDisplay, TextEditDisplay, PasswordLineEditDisplay } |
공개 함수
| StringAspect(Utils::AspectContainer *container = nullptr) | |
| void | makeCheckable(Utils::CheckBoxPlacement checkBoxPlacement, const QString &checkerLabel, const Utils::Key &checkerKey) |
| void | setDisplayFilter(const std::function<QString (const QString &)> &displayFilter) |
| void | setDisplayStyle(Utils::StringAspect::DisplayStyle displayStyle) |
| void | setElideMode(Qt::TextElideMode elideMode) |
| void | setHistoryCompleter(const Utils::Key &historyCompleterKey) |
| void | setPlaceHolderText(const QString &placeHolderText) |
재구현된 공용 함수
| virtual void | fromMap(const Utils::Store &map) override |
| virtual void | toMap(Utils::Store &map) const override |
상세 설명
문자열 측면은 예를 들어 외부 명령의 매개 변수, 파일 시스템의 경로 또는 단순히 문자열을 나타낼 수 있습니다.
문자열은 QLabel, QLineEdit, QTextEdit 또는 Utils::PathChooser 을 사용하여 표시할 수 있습니다.
시각적 표현에는 종종 실제 값이 표시되기 전에 레이블이 포함됩니다.
멤버 유형 문서
enum StringAspect::DisplayStyle
DisplayStyle 열거형은 문자열 측면의 주요 시각적 특성을 설명합니다.
| 상수 | 값 | 설명 |
|---|---|---|
Utils::StringAspect::LabelDisplay | 0 | QLabel 을 기반으로 하며, 빌드 시스템에 정의된 실행 파일 이름과 같이 사용자가 이 위치에서 변경할 수 없는 텍스트에 사용됩니다. |
Utils::StringAspect::LineEditDisplay | 1 | QLineEdit 를 기반으로 하며, 일반적으로 한 줄에 들어가는 사용자가 편집할 수 있는 문자열에 사용됩니다. |
Utils::StringAspect::TextEditDisplay | 2 | QTextEdit 를 기반으로 하며, 한 줄에 다 들어가지 않는 경우가 많은 사용자가 편집할 수 있는 문자열에 사용됩니다. |
Utils::StringAspect::PasswordLineEditDisplay | 3 | QLineEdit 를 기반으로 하며, 비밀번호 문자열에 사용됩니다. |
Utils::PathChooser도 참조하십시오 .
멤버 함수 설명서
StringAspect::StringAspect(Utils::AspectContainer *container = nullptr)
container 라는 문자열 어스펙트를 생성합니다.
[override virtual] void StringAspect::fromMap(const Utils::Store &map)
BaseAspect::fromMap(const Utils::Store &map)를 재구현합니다.
void StringAspect::makeCheckable(Utils::CheckBoxPlacement checkBoxPlacement, const QString &checkerLabel, const Utils::Key &checkerKey)
checkBoxPlacement 에 따라 checkerLabel 을 적용한 체크박스를 라인 에디트에 추가합니다.
checkerKey 가 비어 있지 않은 경우, 체크 박스의 상태가 영구적으로 유지됩니다.
void StringAspect::setDisplayFilter(const std::function<QString (const QString &)> &displayFilter)
이 문자열 측면의 값이 표시되는 방식을 미세하게 조정하기 위해 ‘ displayFilter ’를 설정합니다.
void StringAspect::setDisplayStyle(Utils::StringAspect::DisplayStyle displayStyle)
displayStyle 에 따라 아스펙트의 주요 표시 특성을 선택합니다.
참고: 모든 StringAspect 기능이 모든 디스플레이 스타일에서 사용 가능한 것은아닙니다 .
Utils::StringAspect::DisplayStyle도 참조하십시오 .
void StringAspect::setElideMode(Qt::TextElideMode elideMode)
elideMode 를 레이블 생략 모드로 설정합니다.
void StringAspect::setHistoryCompleter(const Utils::Key &historyCompleterKey)
historyCompleterKey 를 줄 편집 및 경로 선택기 표시의 기록 자동 완성 설정 키로 설정합니다.
Utils::PathChooser::setExpectedKind()도 참조하십시오 .
void StringAspect::setPlaceHolderText(const QString &placeHolderText)
placeHolderText 를 줄 및 텍스트 표시를 위한 자리 표시자로 설정합니다.
[override virtual] void StringAspect::toMap(Utils::Store &map) const
BaseAspect::toMap(Utils::Store &map) const를 재구현합니다.
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.