diff options
author | deva <deva> | 2008-12-02 13:32:31 +0000 |
---|---|---|
committer | deva <deva> | 2008-12-02 13:32:31 +0000 |
commit | 850b163462dae13b3c5a2bd1de17b9bc7f33620b (patch) | |
tree | e4f6c7ddded529ebd33dfcf040081785278efc5e /client/mainwindow.cc | |
parent | 4dcca60cd3113676cae1410119c3dd6accfb48af (diff) |
Use header tags in template.
Diffstat (limited to 'client/mainwindow.cc')
-rw-r--r-- | client/mainwindow.cc | 18 |
1 files changed, 17 insertions, 1 deletions
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 { |