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

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

#include "crontimerui.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a CronTimerUI 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.
 */
CronTimerUI::CronTimerUI( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CronTimerUI" );
    CronTimerUILayout = new TQGridLayout( this, 1, 1, 11, 6, "CronTimerUILayout"); 

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

    layout12 = new TQHBoxLayout( 0, 0, 6, "layout12"); 
    spacer5 = new TQSpacerItem( 32, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout12->addItem( spacer5 );

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

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

    noneRad = new TQRadioButton( cronBtnGrp, "noneRad" );
    cronBtnGrp->insert( noneRad, 0 );
    cronBtnGrpLayout->addWidget( noneRad );

    dailyRad = new TQRadioButton( cronBtnGrp, "dailyRad" );
    cronBtnGrp->insert( dailyRad, 1 );
    cronBtnGrpLayout->addWidget( dailyRad );

    weeklyRad = new TQRadioButton( cronBtnGrp, "weeklyRad" );
    cronBtnGrp->insert( weeklyRad, 2 );
    cronBtnGrpLayout->addWidget( weeklyRad );

    mnthlyRad = new TQRadioButton( cronBtnGrp, "mnthlyRad" );
    cronBtnGrp->insert( mnthlyRad, 3 );
    cronBtnGrpLayout->addWidget( mnthlyRad );

    customRad = new TQRadioButton( cronBtnGrp, "customRad" );
    cronBtnGrp->insert( customRad, 4 );
    cronBtnGrpLayout->addWidget( customRad );
    layout11->addWidget( cronBtnGrp );
    spacer2 = new TQSpacerItem( 20, 67, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout11->addItem( spacer2 );
    layout12->addLayout( layout11 );
    spacer3 = new TQSpacerItem( 39, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout12->addItem( spacer3 );

    daysGb = new TQGroupBox( this, "daysGb" );
    daysGb->setColumnLayout(0, TQt::Vertical );
    daysGb->layout()->setSpacing( 6 );
    daysGb->layout()->setMargin( 11 );
    daysGbLayout = new TQVBoxLayout( daysGb->layout() );
    daysGbLayout->setAlignment( TQt::AlignTop );

    monCb = new TQCheckBox( daysGb, "monCb" );
    daysGbLayout->addWidget( monCb );

    tueCb = new TQCheckBox( daysGb, "tueCb" );
    daysGbLayout->addWidget( tueCb );

    wedCb = new TQCheckBox( daysGb, "wedCb" );
    daysGbLayout->addWidget( wedCb );

    thuCb = new TQCheckBox( daysGb, "thuCb" );
    daysGbLayout->addWidget( thuCb );

    friCb = new TQCheckBox( daysGb, "friCb" );
    daysGbLayout->addWidget( friCb );

    satCb = new TQCheckBox( daysGb, "satCb" );
    daysGbLayout->addWidget( satCb );

    sunCb = new TQCheckBox( daysGb, "sunCb" );
    daysGbLayout->addWidget( sunCb );
    layout12->addWidget( daysGb );
    spacer4 = new TQSpacerItem( 32, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout12->addItem( spacer4 );
    layout13->addLayout( layout12 );
    spacer6 = new TQSpacerItem( 20, 95, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout13->addItem( spacer6 );

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

    cancelBtn = new KPushButton( this, "cancelBtn" );

    layout9->addWidget( cancelBtn, 1, 0 );
    spacer1 = new TQSpacerItem( 177, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer1, 1, 1 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    layout9->addMultiCellWidget( line1, 0, 0, 0, 2 );

    okBtn = new KPushButton( this, "okBtn" );

    layout9->addWidget( okBtn, 1, 2 );
    layout13->addLayout( layout9 );

    CronTimerUILayout->addLayout( layout13, 0, 0 );
    languageChange();
    resize( TQSize(317, 288).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CronTimerUI::languageChange()
{
    setCaption( tr2i18n( "Repeated Timer" ) );
    cronBtnGrp->setTitle( TQString::null );
    noneRad->setText( tr2i18n( "None" ) );
    dailyRad->setText( tr2i18n( "Daily" ) );
    weeklyRad->setText( tr2i18n( "Weekly" ) );
    mnthlyRad->setText( tr2i18n( "Monthly" ) );
    customRad->setText( tr2i18n( "Custom" ) );
    daysGb->setTitle( TQString::null );
    monCb->setText( tr2i18n( "Monday" ) );
    tueCb->setText( tr2i18n( "Tuesday" ) );
    wedCb->setText( tr2i18n( "Wednesday" ) );
    thuCb->setText( tr2i18n( "Thursday" ) );
    friCb->setText( tr2i18n( "Friday" ) );
    satCb->setText( tr2i18n( "Saturday" ) );
    sunCb->setText( tr2i18n( "Sunday" ) );
    cancelBtn->setText( TQString::null );
    okBtn->setText( TQString::null );
}

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

TQMetaObject *CronTimerUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CronTimerUI( "CronTimerUI", &CronTimerUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CronTimerUI::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(
	"CronTimerUI", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CronTimerUI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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