Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

publoverview.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *                                                                         *
00003  *   publoverview.cpp                                                              *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   Read the file COPYING for details.                                    *
00011  *                                                                         *
00012  *   copyright: (C) 2003 by Jan Mueller                                    *
00013  *   email: janmueller7@hotmail.com                                        *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #include "publoverview.h"
00018 #include "linklistbox.h"
00019 #include "linklistboxitem.h"
00020 #include <qlabel.h>
00021 #include <qsqlquery.h>
00022 #include <qlayout.h>
00023 #include "liturl.h"
00024 
00025 PublOverview::PublOverview(LitUrl u, QObject *receiver, QString slot, QWidget *parent, const char *name): ReadOnlyFormBase(u, receiver, slot, parent, name) {
00026     publoverviewform=new OverviewForm(this, "PublOverviewForm");
00027     Q_ASSERT(publoverviewform);
00028     QHBoxLayout *l=new QHBoxLayout(this);
00029     l->addWidget(publoverviewform);
00030     setData();
00031 }
00032 
00033 bool PublOverview::setData() {
00034   publoverviewform->title->setText("Publications");
00035   publoverviewform->linklistbox->clear();    
00036   publoverviewform->linklistbox->setColumnText(0, "Titles");
00037   QSqlQuery query("select title, no from publication order by title");
00038   
00039   while(query.next()) {
00040     new LinkListBoxItem(publoverviewform->linklistbox, query.value(0).toString(), LitUrl("lit://publication/publication?no="+query.value(1).toString()));
00041     setValid(true);
00042   }
00043   return true;
00044 }    
00045 
00046 PublOverview::~PublOverview() {
00047 }

Generated on Sat Mar 27 19:20:43 2004 for Literature by doxygen 1.3.6-20040222