00001 //# QtDataOptionsPanel.qo.h: Qt implementation of viewer data manager widget. 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 00028 #ifndef QTDATAOPTIONSPANEL_H_ 00029 #define QTDATAOPTIONSPANEL_H_ 00030 00031 #include <casa/aips.h> 00032 00033 #include <graphics/X11/X_enter.h> 00034 # include <QWidget> 00035 # include <QResizeEvent> 00036 //#dk Be careful to put *.ui.h within X_enter/exit bracket too, 00037 //# because they'll have Qt includes. 00038 //# E.g. <QApplication> needs the X11 definition of 'Display' 00039 # include <display/QtViewer/QtDataOptionsPanel.ui.h> 00040 #include <graphics/X11/X_exit.h> 00041 00042 00043 namespace casa { //# NAMESPACE CASA - BEGIN 00044 00045 class QtDisplayPanelGui; 00046 class QtDisplayData; 00047 00048 class QtDataOptionsPanel : public QWidget, protected Ui::QtDataOptionsPanel { 00049 00050 Q_OBJECT //# Allows slot/signal definition. Must only occur in 00051 //# implement/.../*.h files; also, makefile must include 00052 //# name of this file in 'mocs' section. 00053 00054 00055 public: 00056 00057 QtDataOptionsPanel(QtDisplayPanelGui* panel=0, QWidget* parent=0 ); 00058 ~QtDataOptionsPanel(); 00059 void removeDD( QtDisplayData* data ){ 00060 removeDDTab_( data ); 00061 } 00062 00063 signals: 00064 void setAutoApply(bool); 00065 void globalColorSettingsChanged( bool ); 00066 void dataOptionsTabChanged( const QString& name ); 00067 00068 protected: 00069 00070 //void paintEvent(QPaintEvent* event); //#dk (hye-type trick) 00071 00072 void resizeEvent (QResizeEvent* ev); //#diag -- to show size 00073 00074 QWidget *parent_; 00075 QtDisplayPanelGui *panel_; 00076 00077 protected slots: 00078 00079 // These respond to DD creation/removal signals from viewer_ 00080 // <group> 00081 virtual void createDDTab_(QtDisplayData*, Bool autoRegister, int insertPosition); 00082 virtual void removeDDTab_(QtDisplayData*); 00083 // </group> 00084 virtual void auto_apply_state_change(bool); 00085 00086 private slots: 00087 void tabChanged( int index ); 00088 00089 private: 00090 00091 QtDataOptionsPanel() { } // (not intended for use). 00092 00093 }; 00094 00095 } //# NAMESPACE CASA - END 00096 00097 #endif