From 850b163462dae13b3c5a2bd1de17b9bc7f33620b Mon Sep 17 00:00:00 2001 From: deva Date: Tue, 2 Dec 2008 13:32:31 +0000 Subject: Use header tags in template. --- client/mainwindow.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 0997c53..90c1e40 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -76,6 +76,19 @@ void MainWindow::update() if(xml_elem.tagName() == "macro") { + if(xml_elem.hasAttribute("header")) { + // Macro is a special headline macro. + // Simply create a headline, and ignore the rest. + QLabel *header = new QLabel(); + header->setText(xml_elem.attribute("header")); + QFont headerfont = header->font(); + headerfont.setBold(true); + headerfont.setPointSize(headerfont.pointSize() + 2); + header->setFont(headerfont); + w->layout()->addWidget(header); + continue; + } + QString macroname; if(xml_elem.hasAttribute("name")) macroname = xml_elem.attribute("name"); @@ -91,7 +104,8 @@ void MainWindow::update() g->setFlat(true); { QFont f = g->font(); - f.setBold(true); + //f.setBold(true); + f.setItalic(true); g->setFont(f); } ((QBoxLayout*)w->layout())->addWidget(g); @@ -103,6 +117,7 @@ void MainWindow::update() { QFont f = b->font(); f.setBold(false); + f.setItalic(false); b->setFont(f); } @@ -117,6 +132,7 @@ void MainWindow::update() { QFont f = macros[macroname]->font(); f.setBold(false); + f.setItalic(false); macros[macroname]->setFont(f); } } else { -- cgit v1.2.3