#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'histdialog.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "histdialog.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqslider.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a histDialog as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
histDialog::histDialog( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "histDialog" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 640, 325 ) );
    setMaximumSize( TQSize( 640, 325 ) );
    setSizeGripEnabled( true );
    histDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "histDialogLayout"); 

    layout17 = new TQVBoxLayout( 0, 0, 6, "layout17"); 

    maxSlider = new TQSlider( this, "maxSlider" );
    maxSlider->setOrientation( TQSlider::Horizontal );
    layout17->addWidget( maxSlider );

    histFrame = new TQFrame( this, "histFrame" );
    histFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, histFrame->sizePolicy().hasHeightForWidth() ) );
    histFrame->setMinimumSize( TQSize( 500, 150 ) );
    histFrame->setMaximumSize( TQSize( 500, 150 ) );
    histFrame->setFrameShape( TQFrame::NoFrame );
    histFrame->setFrameShadow( TQFrame::Raised );
    layout17->addWidget( histFrame );

    minSlider = new TQSlider( this, "minSlider" );
    minSlider->setOrientation( TQSlider::Horizontal );
    layout17->addWidget( minSlider );

    histDialogLayout->addLayout( layout17, 0, 0 );

    layout5 = new TQGridLayout( 0, 1, 1, 0, 6, "layout5"); 

    maxLabel = new TQLabel( this, "maxLabel" );

    layout5->addWidget( maxLabel, 1, 2 );

    intensityOUT = new KLineEdit( this, "intensityOUT" );
    intensityOUT->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, intensityOUT->sizePolicy().hasHeightForWidth() ) );
    intensityOUT->setReadOnly( true );

    layout5->addWidget( intensityOUT, 0, 1 );
    spacer1 = new TQSpacerItem( 130, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer1, 0, 4 );

    minOUT = new KLineEdit( this, "minOUT" );
    minOUT->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, minOUT->sizePolicy().hasHeightForWidth() ) );
    minOUT->setReadOnly( true );

    layout5->addWidget( minOUT, 0, 3 );

    intensityLabel = new TQLabel( this, "intensityLabel" );

    layout5->addWidget( intensityLabel, 0, 0 );

    frequencyOUT = new KLineEdit( this, "frequencyOUT" );
    frequencyOUT->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, frequencyOUT->sizePolicy().hasHeightForWidth() ) );
    frequencyOUT->setReadOnly( true );

    layout5->addWidget( frequencyOUT, 1, 1 );

    frequencyLabel = new TQLabel( this, "frequencyLabel" );

    layout5->addWidget( frequencyLabel, 1, 0 );

    minLabel = new TQLabel( this, "minLabel" );

    layout5->addWidget( minLabel, 0, 2 );

    maxOUT = new KLineEdit( this, "maxOUT" );
    maxOUT->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, maxOUT->sizePolicy().hasHeightForWidth() ) );
    maxOUT->setReadOnly( true );

    layout5->addWidget( maxOUT, 1, 3 );

    histDialogLayout->addMultiCellLayout( layout5, 1, 1, 0, 1 );

    layout13 = new TQHBoxLayout( 0, 0, 6, "layout13"); 
    Horizontal_Spacing2 = new TQSpacerItem( 270, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout13->addItem( Horizontal_Spacing2 );

    applyB = new TQPushButton( this, "applyB" );
    applyB->setAutoDefault( true );
    applyB->setDefault( true );
    layout13->addWidget( applyB );

    cancelB = new TQPushButton( this, "cancelB" );
    cancelB->setAutoDefault( true );
    layout13->addWidget( cancelB );

    histDialogLayout->addMultiCellLayout( layout13, 2, 2, 0, 1 );

    scaleGroup = new TQButtonGroup( this, "scaleGroup" );
    scaleGroup->setColumnLayout(0, TQt::Vertical );
    scaleGroup->layout()->setSpacing( 6 );
    scaleGroup->layout()->setMargin( 11 );
    scaleGroupLayout = new TQVBoxLayout( scaleGroup->layout() );
    scaleGroupLayout->setAlignment( TQt::AlignTop );

    autoR = new TQRadioButton( scaleGroup, "autoR" );
    autoR->setChecked( true );
    scaleGroupLayout->addWidget( autoR );

    linearR = new TQRadioButton( scaleGroup, "linearR" );
    scaleGroupLayout->addWidget( linearR );

    logR = new TQRadioButton( scaleGroup, "logR" );
    scaleGroupLayout->addWidget( logR );

    sqrtR = new TQRadioButton( scaleGroup, "sqrtR" );
    scaleGroupLayout->addWidget( sqrtR );

    histDialogLayout->addWidget( scaleGroup, 0, 1 );
    languageChange();
    resize( TQSize(640, 325).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
}

/*
 *  Destroys the object and frees any allocated resources
 */
histDialog::~histDialog()
{
    // no need to delete child widgets, TQt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void histDialog::languageChange()
{
    setCaption( tr2i18n( "Histogram" ) );
    maxLabel->setText( tr2i18n( "Max." ) );
    intensityLabel->setText( tr2i18n( "Intensity:" ) );
    frequencyLabel->setText( tr2i18n( "Frequency:" ) );
    minLabel->setText( tr2i18n( "Min." ) );
    applyB->setText( tr2i18n( "&Apply" ) );
    cancelB->setText( tr2i18n( "&Close" ) );
    scaleGroup->setTitle( tr2i18n( "FITS Scale" ) );
    autoR->setText( tr2i18n( "Auto" ) );
    linearR->setText( tr2i18n( "Linear" ) );
    logR->setText( tr2i18n( "Logarithmic" ) );
    sqrtR->setText( tr2i18n( "Square root" ) );
}

/****************************************************************************
** histDialog meta object code from reading C++ file 'histdialog.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "histdialog.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *histDialog::className() const
{
    return "histDialog";
}

TQMetaObject *histDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_histDialog( "histDialog", &histDialog::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString histDialog::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "histDialog", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString histDialog::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "histDialog", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* histDialog::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"histDialog", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_histDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* histDialog::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "histDialog" ) )
	return this;
    return TQDialog::tqt_cast( clname );
}

bool histDialog::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

bool histDialog::tqt_emit( int _id, TQUObject* _o )
{
    return TQDialog::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool histDialog::tqt_property( int id, int f, TQVariant* v)
{
    return TQDialog::tqt_property( id, f, v);
}

bool histDialog::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
