Terminal strip item font is editable

The font used in the terminal strip item can be edited
trough the terminal strip layout editor widget
This commit is contained in:
joshua
2025-03-12 19:22:30 +01:00
parent ae5e188866
commit 7747223dfa
6 changed files with 345 additions and 232 deletions

View File

@@ -16,10 +16,12 @@
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#include "terminalstriplayoutpattern.h"
#include "../../../utils/qetutils.h"
#include <QDebug>
TerminalStripLayoutPattern::TerminalStripLayoutPattern()
{
m_font.setPixelSize(15);
updateHeaderTextOption();
updateTerminalsTextOption();
}
@@ -39,6 +41,15 @@ QTextOption TerminalStripLayoutPattern::headerTextOption() const {
return m_header_text_option;
}
QFont TerminalStripLayoutPattern::font() const {
return m_font;
}
void TerminalStripLayoutPattern::setFont(const QFont &font) {
m_font = font;
QETUtils::pixelSizedFont(m_font);
}
void TerminalStripLayoutPattern::setTerminalsTextAlignment(const QVector<Qt::Alignment> &alignment)
{
m_terminals_text_alignment = alignment;