casa
$Rev:20696$
|
00001 00002 //# Copyright (C) 2005 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 00027 #ifndef LINEOVERLAYSSEARCHRESULTSDIALOG_QO_H 00028 #define LINEOVERLAYSSEARCHRESULTSDIALOG_QO_H 00029 #include <QtGui/QDialog> 00030 #include <display/QtPlotter/LineOverlaysSearchResultsDialog.ui.h> 00031 #include <display/QtPlotter/SearchMoleculesResultDisplayer.h> 00032 #include <casa/Containers/Record.h> 00033 #include <casa/aips.h> 00034 namespace casa { 00035 00036 class SearchMoleculesResultsWidget; 00037 00038 class LineOverlaysSearchResultsDialog : public QDialog, public SearchMoleculesResultDisplayer 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 LineOverlaysSearchResultsDialog(QWidget *parent = 0); 00044 QList<int> getLineIndices() const; 00045 bool getLine(int lineIndex, Float& peak, Float& center, 00046 QString& molecularName, QString& chemicalName, 00047 QString& resolvedQNs, QString& frequencyUnit ) const; 00048 void getLines( QList<float>& peaks, QList<float>& centers, 00049 QString& molecularName, QList<QString>& chemicalNames, 00050 QList<QString>& resolvedQNs, QString& frequencyUnit ) const; 00051 void displaySearchResults( const vector<SplatResult>& results, int offset, 00052 int totalCount); 00053 int getLineCount() const; 00054 ~LineOverlaysSearchResultsDialog(); 00055 00056 signals: 00057 void graphSelectedLines(); 00058 void graphSelectedSpecies(); 00059 void showPreviousSearchResults(); 00060 void showNextSearchResults(); 00061 00062 private slots: 00063 void drawSelectedLines(); 00064 void drawSelectedSpecies(); 00065 00066 00067 private: 00068 void setSearchScrollingVisible( bool visible ); 00069 Ui::LineOverlaysSearchResultsDialogClass ui; 00070 SearchMoleculesResultsWidget* searchResultsWidget; 00071 const static QString NO_LINES_SELECTED; 00072 }; 00073 00074 } 00075 #endif // LINEOVERLAYSSEARCHRESULTSDIALOG_QO_H