casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
CleanGui.qo.h
Go to the documentation of this file.
00001 //# Copyright (C) 2013
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 //#
00025 #ifndef DISPLAY_CLEANGUI_H_
00026 #define DISPLAY_CLEANGUI_H_
00027 
00028 #include <map>
00029 #include <casadbus/types/variant.h>
00030 #include <QDialog>
00031 #include <display/Clean/CleanGui.ui.h>
00032 
00033 namespace casa {
00034 
00035         class ImagerControl;
00036 
00037         namespace viewer {
00038 
00039                 class CleanGui : public QDialog, private Ui::CleanGui {
00040                         Q_OBJECT
00041                         public:
00042                                 CleanGui( QWidget *parent = 0 );
00043                                 virtual ~CleanGui( );
00044 
00045                         private slots:
00046                                 void selection_change( );
00047                                 void check_box_change( QTreeWidgetItem*, int );
00048 
00049                                 void send_state_event( );
00050                                 void play_button_event( );
00051                                 void pause_button_event( );
00052                                 void stop_button_event( );
00053                                 void refresh_button_event( );
00054 
00055                                 void entry_changed_event(const QString&);
00056 
00057                         private:
00058                                 enum clean_state_t { UNDEFINED, PAUSED, RUNNING, STOPPED };
00059                                 // this class is not intended for copy or assignment...
00060                                 CleanGui( const CleanGui & );
00061                                 CleanGui operator=( const CleanGui & );
00062 
00063                                 // update information for the process currently selected...
00064                                 void refresh( );
00065                                 std::map<std::string,dbus::variant> collect( );
00066 
00067                                 // indicate (or unindicate) that values have changed,
00068                                 // and a send is required...
00069                                 void set_send_needed( bool );
00070                                 void allow_editing( bool );
00071 
00072                                 ImagerControl *ic;
00073                                 int current_process_index;
00074                                 clean_state_t current_process_state;
00075 
00076                                 std::map<QObject*,QString> current_clean_state;
00077                                 QString default_send_tooltip;
00078                 };
00079         }
00080 }
00081 #endif