00001 /****************************************************************************** 00002 * 00003 * This file is part of Cardio Curves. 00004 * Copyright (C) 2009 Jan Gunnar Andreassen 00005 * Copyright (C) 2009 Lars Magne Engedal 00006 * 00007 * Cardio Curves is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU Lesser General Public License as published 00009 * by the Free Software Foundation, either version 2.1 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * Cardio Cruves is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public License 00018 * along with Cardio Curves. If not, see <http://www.gnu.org/licenses/>. 00019 * 00020 * Developer contact: 00021 * (janislazzaroni at users.sourceforge.net) 00022 * (engedal at users.sourceforge.net ) 00023 ******************************************************************************/ 00024 00025 #include <QtGui> 00026 00027 #include "infodialog.h" 00028 #include "mfertablewidget.h" 00029 #include "mferreader.h" 00030 00031 InfoDialog::InfoDialog(QWidget *parent) 00032 : QDialog(parent) 00033 { 00034 infoWidget = new MferTableWidget(this); 00035 QHBoxLayout *layout = new QHBoxLayout; 00036 layout->addWidget(infoWidget); 00037 setLayout(layout); 00038 ready = false; 00039 } 00040 00041 void InfoDialog::fillDialog(const MferReader& reader) 00042 { 00043 infoWidget->fillTableWidget(reader); 00044 ready = true; 00045 } 00046 00047 void InfoDialog::showDialog() 00048 { 00049 if (ready) 00050 { 00051 show(); 00052 activateWindow(); 00053 } 00054 }