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

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

#include "thresholdoptionsbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqcombobox.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ThresholdOptionsBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ThresholdOptionsBase::ThresholdOptionsBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "ThresholdOptionsBase" );
    ThresholdOptionsBaseLayout = new TQGridLayout( this, 1, 1, 0, 6, "ThresholdOptionsBaseLayout"); 

    typecomp = new TQComboBox( false, this, "typecomp" );
    typecomp->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, typecomp->sizePolicy().hasHeightForWidth() ) );

    ThresholdOptionsBaseLayout->addWidget( typecomp, 1, 1 );

    querycomp = new TQComboBox( false, this, "querycomp" );

    ThresholdOptionsBaseLayout->addWidget( querycomp, 3, 1 );

    badcomp = new TQComboBox( false, this, "badcomp" );

    ThresholdOptionsBaseLayout->addWidget( badcomp, 4, 1 );

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

    ThresholdOptionsBaseLayout->addWidget( label_grade, 2, 0 );

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

    ThresholdOptionsBaseLayout->addWidget( label_bcount, 4, 0 );

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

    ThresholdOptionsBaseLayout->addWidget( label_qdate, 5, 0 );

    datecomp = new TQComboBox( false, this, "datecomp" );

    ThresholdOptionsBaseLayout->addWidget( datecomp, 5, 1 );

    badlist = new TQComboBox( false, this, "badlist" );

    ThresholdOptionsBaseLayout->addWidget( badlist, 4, 2 );

    querylist = new TQComboBox( false, this, "querylist" );

    ThresholdOptionsBaseLayout->addWidget( querylist, 3, 2 );

    datelist = new TQComboBox( false, this, "datelist" );

    ThresholdOptionsBaseLayout->addWidget( datelist, 5, 2 );

    typelist = new TQComboBox( false, this, "typelist" );
    typelist->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, typelist->sizePolicy().hasHeightForWidth() ) );

    ThresholdOptionsBaseLayout->addWidget( typelist, 1, 2 );

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

    ThresholdOptionsBaseLayout->addWidget( label_type, 1, 0 );

    gradelist = new TQComboBox( false, this, "gradelist" );

    ThresholdOptionsBaseLayout->addWidget( gradelist, 2, 2 );

    gradecomp = new TQComboBox( false, this, "gradecomp" );

    ThresholdOptionsBaseLayout->addWidget( gradecomp, 2, 1 );

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

    ThresholdOptionsBaseLayout->addWidget( label_qcount, 3, 0 );

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

    b_all_less = new TQPushButton( this, "b_all_less" );
    b_all_less->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, b_all_less->sizePolicy().hasHeightForWidth() ) );

    layout8->addWidget( b_all_less, 2, 1 );

    lessonlist = new TQListBox( this, "lessonlist" );
    lessonlist->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)3, 0, 0, lessonlist->sizePolicy().hasHeightForWidth() ) );
    lessonlist->setSelectionMode( TQListBox::Multi );

    layout8->addMultiCellWidget( lessonlist, 1, 3, 3, 4 );

    b_none_less = new TQPushButton( this, "b_none_less" );

    layout8->addWidget( b_none_less, 2, 2 );

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

    layout8->addWidget( l_lesson, 0, 3 );
    Spacer2 = new TQSpacerItem( 20, 50, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout8->addItem( Spacer2, 3, 2 );
    Spacer1 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding );
    layout8->addMultiCell( Spacer1, 2, 3, 0, 0 );

    l_count = new TQLabel( this, "l_count" );
    l_count->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)1, 0, 0, l_count->sizePolicy().hasHeightForWidth() ) );

    layout8->addWidget( l_count, 0, 4 );

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

    layout8->addWidget( label_lesson, 1, 0 );

    lessoncomp = new TQComboBox( false, this, "lessoncomp" );
    lessoncomp->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, lessoncomp->sizePolicy().hasHeightForWidth() ) );

    layout8->addMultiCellWidget( lessoncomp, 1, 1, 1, 2 );

    ThresholdOptionsBaseLayout->addMultiCellLayout( layout8, 0, 0, 0, 2 );
    spacer12 = new TQSpacerItem( 290, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ThresholdOptionsBaseLayout->addMultiCell( spacer12, 6, 6, 0, 2 );
    languageChange();
    resize( TQSize(402, 313).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    label_grade->setBuddy( gradecomp );
    label_bcount->setBuddy( badcomp );
    label_qdate->setBuddy( datecomp );
    label_type->setBuddy( typecomp );
    label_qcount->setBuddy( querycomp );
    label_lesson->setBuddy( lessoncomp );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ThresholdOptionsBase::languageChange()
{
    label_grade->setText( tr2i18n( "G&rade:" ) );
    label_bcount->setText( tr2i18n( "&Bad count:" ) );
    label_qdate->setText( tr2i18n( "Last q&uery:" ) );
    label_type->setText( tr2i18n( "Word t&ype:" ) );
    label_qcount->setText( tr2i18n( "Query c&ount:" ) );
    b_all_less->setText( tr2i18n( "&All" ) );
    b_none_less->setText( tr2i18n( "&None" ) );
    l_lesson->setText( tr2i18n( "Selected lessons:" ) );
    l_count->setText( tr2i18n( "-" ) );
    label_lesson->setText( tr2i18n( "&Lesson:" ) );
}

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

TQMetaObject *ThresholdOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ThresholdOptionsBase( "ThresholdOptionsBase", &ThresholdOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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