본문으로 건너뛰기
로딩중...
검색중...
일치하는것 없음
DialogButtonText.h
1#pragma once
2
3#include <QCoreApplication>
4#include <QDialogButtonBox>
5#include <QPushButton>
6#include <QString>
7
8namespace GdkQt {
9
14inline QString dialogButtonText(const char* sourceText)
15{
16 return QCoreApplication::translate("DialogButtonText", sourceText);
17}
18
24inline void setDialogButtonText(QDialogButtonBox* buttons,
25 QDialogButtonBox::StandardButton button,
26 const char* sourceText)
27{
28 if (!buttons) {
29 return;
30 }
31 if (QPushButton* pushButton = buttons->button(button)) {
32 pushButton->setText(dialogButtonText(sourceText));
33 }
34}
35
41inline void localizeDialogButtonBox(QDialogButtonBox* buttons)
42{
43 setDialogButtonText(buttons, QDialogButtonBox::Ok, "OK");
44 setDialogButtonText(buttons, QDialogButtonBox::Cancel, "Cancel");
45 setDialogButtonText(buttons, QDialogButtonBox::Apply, "Apply");
46 setDialogButtonText(buttons, QDialogButtonBox::Close, "Close");
47}
48
49} // namespace GdkQt
QString dialogButtonText(const char *sourceText)
대화상자 단추 문구를 번역 문맥 "DialogButtonText"로 번역합니다.
정의 DialogButtonText.h:14
void setDialogButtonText(QDialogButtonBox *buttons, QDialogButtonBox::StandardButton button, const char *sourceText)
단추 상자의 표준 단추 하나에 번역한 문구를 설정합니다.
정의 DialogButtonText.h:24
void localizeDialogButtonBox(QDialogButtonBox *buttons)
단추 상자의 OK, Cancel, Apply, Close 단추 문구를 번역한 문구로 바꿉니다.
정의 DialogButtonText.h:41
glsGdkQt의 공개 형식과 함수가 있는 네임스페이스입니다.
정의 AppSettings.h:15