Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

datawidgetui.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002    application:             : Oxygen
00003 
00004    begin                    : September 2002
00005    copyright                : ( C ) 2002 by Carsten Niehaus
00006    email                    : cniehaus@handhelds.org
00007  **************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  * This program is free software; you can redistribute it and/or modify    *
00012  * it under the terms of the GNU General Public License as published by    *
00013  * the Free Software Foundation; either version 2 of the License, or       *
00014  * ( at your option ) any later version.                                   *
00015  *                                                                         *
00016  **************************************************************************/
00017 
00018 #include "datawidgetui.h"
00019 #include "dataTable.h"
00020 
00021 #include <qcombobox.h>
00022 #include <qlayout.h>
00023 
00024 dataWidgetUI::dataWidgetUI(const QStringList &list) : QWidget()
00025 {
00026         names = list;
00027         
00028         this->setCaption( tr( "Chemical Data" ));
00029     QGridLayout *qgrid = new QGridLayout( this, 2,1 );
00030     
00031     dataCombo = new QComboBox( this );
00032     
00033     //read in all names of the 118 elements
00034         int i = 0;
00035     for ( QStringList::ConstIterator it =  names.begin() ; it != names.end() ; ++it,i++)
00036     {
00037         dataCombo->insertItem( QString::number( i+1 )+" - "+*it );
00038     }
00039     OxydataWidget *oxyDW = new OxydataWidget(this, "OxydataWidget_oxyDW", names);
00040     connect ( dataCombo, SIGNAL( activated(int) ), oxyDW, SLOT( setElement(int) ) );
00041     oxyDW->setElement( 0 );
00042     oxyDW->setLayout();
00043 
00044     qgrid->addWidget(  dataCombo, 0,0);
00045     qgrid->addWidget(  oxyDW , 1,0 );
00046 }
00047 
00048 

Generated on Sat Nov 5 16:17:07 2005 for OPIE by  doxygen 1.4.2