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

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

#include "configproblemreporter.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqtextedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "configproblemreporter.ui.h"

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

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

    problemReporterCheckbox = new TQCheckBox( groupBox3_2, "problemReporterCheckbox" );
    groupBox3_2Layout->addWidget( problemReporterCheckbox );
    ConfigureProblemReporterLayout->addWidget( groupBox3_2 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setFrameShadow( TQGroupBox::Sunken );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( KDialog::spacingHint() );
    groupBox1->layout()->setMargin( KDialog::marginHint() );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2"); 

    bgParserCheckbox = new TQCheckBox( groupBox1, "bgParserCheckbox" );
    layout2->addWidget( bgParserCheckbox );

    delayLabel = new TQLabel( groupBox1, "delayLabel" );
    delayLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, delayLabel->sizePolicy().hasHeightForWidth() ) );
    delayLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    layout2->addWidget( delayLabel );
    groupBox1Layout->addLayout( layout2 );

    delaySlider = new TQSlider( groupBox1, "delaySlider" );
    delaySlider->setMinValue( 250 );
    delaySlider->setMaxValue( 2000 );
    delaySlider->setLineStep( 250 );
    delaySlider->setPageStep( 500 );
    delaySlider->setOrientation( TQSlider::Horizontal );
    delaySlider->setTickmarks( TQSlider::NoMarks );
    delaySlider->setTickInterval( 250 );
    groupBox1Layout->addWidget( delaySlider );
    ConfigureProblemReporterLayout->addWidget( groupBox1 );

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

    specialHeader = new TQTextEdit( groupBox3, "specialHeader" );
    groupBox3Layout->addWidget( specialHeader );
    ConfigureProblemReporterLayout->addWidget( groupBox3 );
    languageChange();
    resize( TQSize(588, 492).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( delaySlider, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( setDelayLabel(int) ) );
    connect( bgParserCheckbox, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( bgParserCheckbox_toggled(bool) ) );

    // tab order
    setTabOrder( bgParserCheckbox, delaySlider );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigureProblemReporter::languageChange()
{
    groupBox3_2->setTitle( tr2i18n( "Problem Reporter" ) );
    TQWhatsThis::add( groupBox3_2, tr2i18n( "If enabled, the C++ parser will report any syntax errors it detects. \n"
"They will be displayed in the 'Problems' output view and as markers in the editor." ) );
    problemReporterCheckbox->setText( tr2i18n( "&Use Problem Reporter" ) );
    groupBox1->setTitle( tr2i18n( "Parsing" ) );
    TQWhatsThis::add( groupBox1, tr2i18n( "If enabled, the C++ parser will run on the active file after the stated timeout, after there has been any changes to the text.\n"
"\n"
"If disabled, the parser will typically only run when the file is saved." ) );
    bgParserCheckbox->setText( tr2i18n( "Enable &background parsing" ) );
    delayLabel->setText( tr2i18n( "msec" ) );
    groupBox3->setTitle( tr2i18n( "Special &Headers" ) );
    TQWhatsThis::add( groupBox3, tr2i18n( "Often a macro that the C++ parser must understand in order to correctly parse a piece of code is defined somewhere in a non-standard header file that the parser does not look at. This textbox can be used to define those macros locally so that the C++ parser can understand them." ) );
}

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

TQMetaObject *ConfigureProblemReporter::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigureProblemReporter( "ConfigureProblemReporter", &ConfigureProblemReporter::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ConfigureProblemReporter::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 = {"init", 0, 0 };
    static const TQUMethod slot_1 = {"destroy", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ "part", &static_QUType_ptr, "CppSupportPart", TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"setPart", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"accept", 0, 0 };
    static const TQUParameter param_slot_4[] = {
	{ "b", &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_4 = {"bgParserCheckbox_toggled", 1, param_slot_4 };
    static const TQUMethod slot_5 = {"languageChange", 0, 0 };
    static const TQUParameter param_slot_6[] = {
	{ "delay", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_6 = {"setDelayLabel", 1, param_slot_6 };
    static const TQMetaData slot_tbl[] = {
	{ "init()", &slot_0, TQMetaData::Public },
	{ "destroy()", &slot_1, TQMetaData::Public },
	{ "setPart(CppSupportPart*)", &slot_2, TQMetaData::Public },
	{ "accept()", &slot_3, TQMetaData::Public },
	{ "bgParserCheckbox_toggled(bool)", &slot_4, TQMetaData::Public },
	{ "languageChange()", &slot_5, TQMetaData::Protected },
	{ "setDelayLabel(int)", &slot_6, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ConfigureProblemReporter", parentObject,
	slot_tbl, 7,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ConfigureProblemReporter.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool ConfigureProblemReporter::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: init(); break;
    case 1: destroy(); break;
    case 2: setPart((CppSupportPart*)static_QUType_ptr.get(_o+1)); break;
    case 3: accept(); break;
    case 4: bgParserCheckbox_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 5: languageChange(); break;
    case 6: setDelayLabel((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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