mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-16 01:07:23 +02:00
25 lines
No EOL
706 B
C++
25 lines
No EOL
706 B
C++
//
|
|
// Created by HifiExperiments on 2/9/21
|
|
// Copyright 2021 Vircadia contributors.
|
|
//
|
|
// Distributed under the Apache License, Version 2.0.
|
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
//
|
|
|
|
#include "TextAlignment.h"
|
|
|
|
const char* textAlignmentNames[] = {
|
|
"left",
|
|
"center",
|
|
"right"
|
|
};
|
|
|
|
static const size_t TEXT_ALIGNMENT_NAMES = (sizeof(textAlignmentNames) / sizeof(textAlignmentNames[0]));
|
|
|
|
QString TextAlignmentHelpers::getNameForTextAlignment(TextAlignment alignment) {
|
|
if (((int)alignment <= 0) || ((int)alignment >= (int)TEXT_ALIGNMENT_NAMES)) {
|
|
alignment = (TextAlignment)0;
|
|
}
|
|
|
|
return textAlignmentNames[(int)alignment];
|
|
} |