이 페이지에서

Core::Context Class

class Core::Context

Context 클래스는 컨텍스트 ID 목록을 구현합니다. 더 보기...

Header: #include <coreplugin/icontext.h>

공개 유형

공개 함수

Context()
Context(Utils::Id c1)
Context(Utils::Id c1, Utils::Id c2)
Context(Utils::Id c1, Utils::Id c2, Utils::Id c3)
void add(Utils::Id c)
void add(const Core::Context &c)
Utils::Id at(int i) const
Core::Context::const_iterator begin() const
bool contains(Utils::Id c) const
Core::Context::const_iterator end() const
int indexOf(Utils::Id c) const
bool isEmpty() const
void prepend(Utils::Id c)
void removeAt(int i)
int size() const

상세 설명

컨텍스트는 ` Core::ActionManager`에 액션을 등록하거나, 액션에 대한 컨텍스트를 제공하는 UI 요소를 생성할 때 사용됩니다.

컨텍스트 사용 방법에 대한 개요는 ‘액션 관리자 및 명령’을 참조하십시오.

Core::IContext, Core::ActionManager 및 ‘액션 관리자 및 명령’도 참조하십시오 .

멤버 유형 문서

[alias] Context::const_iterator

Context::const_iterator는 Context에 대한 STL 스타일의 const 이터레이터를 제공합니다.

멤버 함수 설명서

[constexpr noexcept] Context::Context()

전역 컨텍스트를 나타내는 컨텍스트 목록을 생성합니다.

[explicit] Context::Context(Utils::Id c1)

c1 라는 단일 ID를 가진 컨텍스트 목록을 생성합니다.

Context::Context(Utils::Id c1, Utils::Id c2)

ID가 c1 및 c2 인 컨텍스트 목록을 생성합니다.

Context::Context(Utils::Id c1, Utils::Id c2, Utils::Id c3)

ID가 c1, c2, c3 인 컨텍스트 목록을 생성합니다.

void Context::add(Utils::Id c)

컨텍스트 목록의 끝에 ID “ c ”를 추가합니다.

void Context::add(const Core::Context &c)

이 컨텍스트 목록의 끝에 c 컨텍스트 목록을 추가합니다.

Utils::Id Context::at(int i) const

컨텍스트 목록에서 인덱스 i 에 해당하는 ID를 반환합니다.

Core::Context::const_iterator Context::begin() const

컨텍스트 목록의 첫 번째 ID를 가리키는 STL 스타일의 이터레이터를 반환합니다.

bool Context::contains(Utils::Id c) const

이 컨텍스트 목록에 ID c 가 포함되어 있는지 여부를 반환합니다.

Core::Context::const_iterator Context::end() const

컨텍스트 목록의 마지막 ID 다음에 있는 가상의 항목을 가리키는 STL 스타일의 이터레이터를 반환합니다.

int Context::indexOf(Utils::Id c) const

컨텍스트 목록에서 ID c 의 인덱스 위치를 반환합니다. 일치하는 항목이 없으면 -1을 반환합니다.

bool Context::isEmpty() const

이 컨텍스트 목록이 비어 있어 기본 생성된 것인지 여부를 반환합니다.

void Context::prepend(Utils::Id c)

ID가 c 인 항목을 컨텍스트 목록의 첫 번째 항목으로 추가합니다.

void Context::removeAt(int i)

컨텍스트 목록에서 인덱스 i 에 있는 ID를 제거합니다.

int Context::size() const

컨텍스트 목록에 포함된 ID의 개수를 반환합니다.

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.