casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TBValidityChecker.qo.h
Go to the documentation of this file.
00001 //# TBValidityChecker.qo.h: Widget for running TBTests on opened tables.
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 //# $Id: $
00027 #ifndef TBVALIDITYCHECKER_H_
00028 #define TBVALIDITYCHECKER_H_
00029 
00030 #include <casaqt/QtBrowser/TBValidityChecker.ui.h>
00031 
00032 #include <casa/BasicSL/String.h>
00033 
00034 #include <vector>
00035 
00036 #include <QtGui>
00037 
00038 #include <casa/namespace.h>
00039 using namespace std;
00040 
00041 namespace casa {
00042 
00043 //# Forward Declarations
00044 class TBBrowser;
00045 class TBTest;
00046 
00047 // <summary>
00048 // Widget for running TBTests on opened tables.
00049 // </summary>
00050 //
00051 // <synopsis>
00052 // A TBValidityChecker allows the user to select a table and then run any
00053 // defined TBTests on it.  The pass/fail results are then shown to the user.
00054 // </synopsis>
00055 
00056 class TBValidityChecker : public QWidget, Ui::ValidityChecker {
00057     Q_OBJECT
00058     
00059 public:
00060         // Constructor that takes the browser parent.
00061     TBValidityChecker(TBBrowser* browser);
00062 
00063     ~TBValidityChecker();
00064 
00065 private:
00066         // Browser parent.
00067     TBBrowser* browser;
00068     
00069     // List of tests that can be run.
00070     vector<TBTest*> tests;
00071 
00072     
00073     // Sets up the tests in the GUI.
00074     void setupTests();
00075 
00076 private slots:
00077         // Slot for when the user selects a new table.
00078     void tableChanged(QString newTable);
00079 
00080     // Slot for when the user selects a new test.  Loads the checks in the
00081     // right side of the widget.
00082     void loadTest(int index);
00083 
00084     // Slot to run all checks in the selected test on the selected table.
00085     void runChecks();
00086 
00087     // Slot to run the selected check in the selected test on the selected
00088     // table.
00089     void runCheck();
00090 
00091     // Slot for when a new table is opened in the browser.  Adds the name to
00092     // the list of opened tables.
00093     void tableOpened(String table);
00094 
00095     // Slot for when a table is closed in the browser.  Removes the name from
00096     // the list of opened tables. 
00097     void tableClosed(String table);
00098 };
00099 
00100 }
00101 
00102 #endif /* TBVALIDITYCHECKER_H_ */