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

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

#include "SensorLoggerDlgWidget.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <knumvalidator.h>
#include <kcolordialog.h>
#include <klineedit.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "SensorLoggerDlgWidget.ui.h"

/*
 *  Constructs a SensorLoggerDlgWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
SensorLoggerDlgWidget::SensorLoggerDlgWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "SensorLoggerDlgWidget" );
    SensorLoggerDlgWidgetLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "SensorLoggerDlgWidgetLayout"); 

    fileFrame = new TQGroupBox( this, "fileFrame" );
    fileFrame->setFrameShape( TQGroupBox::GroupBoxPanel );
    fileFrame->setFrameShadow( TQGroupBox::Sunken );
    fileFrame->setColumnLayout(0, TQt::Vertical );
    fileFrame->layout()->setSpacing( KDialog::spacingHint() );
    fileFrame->layout()->setMargin( KDialog::marginHint() );
    fileFrameLayout = new TQHBoxLayout( fileFrame->layout() );
    fileFrameLayout->setAlignment( TQt::AlignTop );

    m_fileName = new KURLRequester( fileFrame, "m_fileName" );
    fileFrameLayout->addWidget( m_fileName );
    SensorLoggerDlgWidgetLayout->addWidget( fileFrame );

    timerFrame = new TQGroupBox( this, "timerFrame" );
    timerFrame->setColumnLayout(0, TQt::Vertical );
    timerFrame->layout()->setSpacing( KDialog::spacingHint() );
    timerFrame->layout()->setMargin( KDialog::marginHint() );
    timerFrameLayout = new TQHBoxLayout( timerFrame->layout() );
    timerFrameLayout->setAlignment( TQt::AlignTop );

    m_timerInterval = new KIntNumInput( timerFrame, "m_timerInterval" );
    m_timerInterval->setValue( 2 );
    m_timerInterval->setMinValue( 1 );
    m_timerInterval->setMaxValue( 99 );
    timerFrameLayout->addWidget( m_timerInterval );
    SensorLoggerDlgWidgetLayout->addWidget( timerFrame );

    GroupBox1 = new TQGroupBox( this, "GroupBox1" );
    GroupBox1->setColumnLayout(0, TQt::Vertical );
    GroupBox1->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox1->layout()->setMargin( KDialog::marginHint() );
    GroupBox1Layout = new TQHBoxLayout( GroupBox1->layout() );
    GroupBox1Layout->setAlignment( TQt::AlignTop );

    m_lowerLimitActive = new TQCheckBox( GroupBox1, "m_lowerLimitActive" );
    GroupBox1Layout->addWidget( m_lowerLimitActive );
    Spacer1 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox1Layout->addItem( Spacer1 );

    m_lblLowerLimit = new TQLabel( GroupBox1, "m_lblLowerLimit" );
    m_lblLowerLimit->setEnabled( false );
    GroupBox1Layout->addWidget( m_lblLowerLimit );

    m_lowerLimit = new TQLineEdit( GroupBox1, "m_lowerLimit" );
    m_lowerLimit->setEnabled( false );
    m_lowerLimit->setMinimumSize( TQSize( 70, 0 ) );
    GroupBox1Layout->addWidget( m_lowerLimit );
    SensorLoggerDlgWidgetLayout->addWidget( GroupBox1 );

    GroupBox1_2 = new TQGroupBox( this, "GroupBox1_2" );
    GroupBox1_2->setColumnLayout(0, TQt::Vertical );
    GroupBox1_2->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox1_2->layout()->setMargin( KDialog::marginHint() );
    GroupBox1_2Layout = new TQHBoxLayout( GroupBox1_2->layout() );
    GroupBox1_2Layout->setAlignment( TQt::AlignTop );

    m_upperLimitActive = new TQCheckBox( GroupBox1_2, "m_upperLimitActive" );
    GroupBox1_2Layout->addWidget( m_upperLimitActive );
    Spacer1_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox1_2Layout->addItem( Spacer1_2 );

    m_lblUpperLimit = new TQLabel( GroupBox1_2, "m_lblUpperLimit" );
    m_lblUpperLimit->setEnabled( false );
    GroupBox1_2Layout->addWidget( m_lblUpperLimit );

    m_upperLimit = new TQLineEdit( GroupBox1_2, "m_upperLimit" );
    m_upperLimit->setEnabled( false );
    m_upperLimit->setMinimumSize( TQSize( 70, 0 ) );
    GroupBox1_2Layout->addWidget( m_upperLimit );
    SensorLoggerDlgWidgetLayout->addWidget( GroupBox1_2 );
    languageChange();
    resize( TQSize(363, 254).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_lowerLimitActive, TQ_SIGNAL( toggled(bool) ), m_lowerLimit, TQ_SLOT( setEnabled(bool) ) );
    connect( m_upperLimitActive, TQ_SIGNAL( toggled(bool) ), m_upperLimit, TQ_SLOT( setEnabled(bool) ) );
    connect( m_lowerLimitActive, TQ_SIGNAL( toggled(bool) ), m_lblLowerLimit, TQ_SLOT( setEnabled(bool) ) );
    connect( m_upperLimitActive, TQ_SIGNAL( toggled(bool) ), m_lblUpperLimit, TQ_SLOT( setEnabled(bool) ) );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SensorLoggerDlgWidget::languageChange()
{
    fileFrame->setTitle( tr2i18n( "File" ) );
    timerFrame->setTitle( tr2i18n( "Timer Interval" ) );
    m_timerInterval->setSuffix( tr2i18n( " sec" ) );
    GroupBox1->setTitle( tr2i18n( "Alarm for Minimum Value" ) );
    m_lowerLimitActive->setText( tr2i18n( "&Enable alarm" ) );
    TQWhatsThis::add( m_lowerLimitActive, tr2i18n( "Enable the minimum value alarm." ) );
    m_lblLowerLimit->setText( tr2i18n( "Lower limit:" ) );
    GroupBox1_2->setTitle( tr2i18n( "Alarm for Maximum Value" ) );
    m_upperLimitActive->setText( tr2i18n( "E&nable alarm" ) );
    TQWhatsThis::add( m_upperLimitActive, tr2i18n( "Enable the maximum value alarm." ) );
    m_lblUpperLimit->setText( tr2i18n( "Upper limit:" ) );
}

/****************************************************************************
** SensorLoggerDlgWidget meta object code from reading C++ file 'SensorLoggerDlgWidget.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 "SensorLoggerDlgWidget.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 *SensorLoggerDlgWidget::className() const
{
    return "SensorLoggerDlgWidget";
}

TQMetaObject *SensorLoggerDlgWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SensorLoggerDlgWidget( "SensorLoggerDlgWidget", &SensorLoggerDlgWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SensorLoggerDlgWidget::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 = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SensorLoggerDlgWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SensorLoggerDlgWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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