repository for casafeather app
Source
plotHolder->setData( dirtyCut.getUX(), dirtyCut.getUY(), dirtyCut.getVX(), dirtyCut.getVY(), FeatherDataType::DIRTY_WEIGHTED );
//# Copyright (C) 2005
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
//#
using namespace casacore;
namespace casa {
const int FeatherMain::DISH_DIAMETER_DEFAULT = -1;
const int FeatherMain::SINGLE_DISH_FACTOR_DEFAULT = 1;
FeatherMain::FeatherMain(QWidget *parent)
: QMainWindow(parent), fileLoader( this ),
preferences( this ), preferencesColor( this ),
plotHolder(NULL), progressMeter(this), overWriteFileDialog( this ),
logger(LogOrigin("CASA", "Feather")){
ui.setupUi(this);
ui.outputLabel->setText("");
dataManager = new FeatherManager();
connect( dataManager, SIGNAL(featheringDone()), this, SLOT( featheringDone()));
plotHolder = new PlotHolder( this );
QHBoxLayout* layout = new QHBoxLayout();
layout->addWidget( plotHolder );
ui.plotHolderWidget->setLayout( layout );
connect( plotHolder, SIGNAL(dishDiameterChangedX(double)), this, SLOT(dishDiameterXChanged(double)));
connect( plotHolder, SIGNAL(dishDiameterChangedY(double)), this, SLOT(dishDiameterYChanged(double)));
progressMeter.setWindowTitle( "Feather");
progressMeter.setLabelText( "Feathering Images...");
progressMeter.setWindowModality( Qt::WindowModal );
progressMeter.setCancelButton( 0 );
progressMeter.setMinimum( 0 );
progressMeter.setMaximum( 0 );
progressMeter.reset(); // do not show until needed
connect( this, SIGNAL( featherFinished()), &progressMeter, SLOT(cancel()));
connect( &overWriteFileDialog, SIGNAL( overWriteOK()), this, SLOT( overWriteOK()));
//Put a validator on the effective dish diameter.
QDoubleValidator* validator = new QDoubleValidator( 0, std::numeric_limits<double>::max(), 10, this );
ui.dishDiameterXLineEdit->setValidator( validator );
ui.dishDiameterYLineEdit->setValidator( validator );
ui.singleDishFactorLineEdit->setValidator( validator );
initializeDishDiameterLimit( ui.dishDiameterXLimitLabel );
initializeDishDiameterLimit( ui.dishDiameterYLimitLabel );
connect( ui.dishDiameterXLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(dishDiameterXChanged(const QString&)));
connect( ui.dishDiameterYLineEdit, SIGNAL(textChanged(const QString&)), this, SLOT(dishDiameterYChanged(const QString&)));
ui.featherButton->setEnabled( false );
functionColorsChanged();
preferencesChanged();
QActionGroup* paletteGroup = new QActionGroup(this );
ui.actionDiameterSelector->setActionGroup( paletteGroup );