diff options
| author | deva <deva> | 2009-02-18 15:14:50 +0000 | 
|---|---|---|
| committer | deva <deva> | 2009-02-18 15:14:50 +0000 | 
| commit | 74c69254be1bf8ac2d3e535efb54d3a62b95145d (patch) | |
| tree | f5603b26b043fdef074a5cb9d8a5b19e97f49a05 /client/mainwindow.cc | |
| parent | 41df494d727810c49c1f0f3e4ffb494f9b1b9a10 (diff) | |
Added title attribute to the courses/templates, and made them show as a header in the client.
Diffstat (limited to 'client/mainwindow.cc')
| -rw-r--r-- | client/mainwindow.cc | 21 | 
1 files changed, 19 insertions, 2 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 639c9d0..884ecf2 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -58,9 +58,10 @@ MainWindow::MainWindow(QString cpr, QString course, QString host, quint16 port,    w->setLayout(new QVBoxLayout());    this->course = course; +  //  status->showMessage("Makroen blev succesfuldt indlęst."); +  setStatusBar(status); +      init(); - -  status->showMessage("Makroen blev succesfuldt indlęst.");  }  MainWindow::~MainWindow() @@ -97,6 +98,22 @@ void MainWindow::update()    QDomNodeList courses = xml_doc.documentElement().childNodes();    QDomNode coursenode = courses.at(0); // There can be only one! (Swush, flomp) + +  QDomElement course_elem = coursenode.toElement(); +  QString course_title = course_elem.attribute("title"); +  QString course_name = course_elem.attribute("name"); + +  QLabel *header = new QLabel(); +  header->setText(course_title); +  QFont headerfont = header->font(); +  headerfont.setBold(true); +  headerfont.setPointSize(headerfont.pointSize() + 4); +  header->setFont(headerfont); +  header->setAlignment(Qt::AlignHCenter); +  w->layout()->addWidget(header); +   +  statusBar()->showMessage(course_title + " (" + course_name + ")"); +    QDomNodeList macronodes = coursenode.childNodes();    for(int j = 0; j < macronodes.count(); j++) {      QDomNode macronode = macronodes.at(j);  | 
