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

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

#include "codegenerationoptionsbase.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqgroupbox.h>
#include <ntqcombobox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlineedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a CodeGenerationOptionsBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
CodeGenerationOptionsBase::CodeGenerationOptionsBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "CodeGenerationOptionsBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    CodeGenerationOptionsBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "CodeGenerationOptionsBaseLayout"); 

    tabWidget = new TQTabWidget( this, "tabWidget" );
    tabWidget->setEnabled( true );
    tabWidget->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, tabWidget->sizePolicy().hasHeightForWidth() ) );

    tab = new TQWidget( tabWidget, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

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

    m_SelectLanguageGroup = new TQGroupBox( tab, "m_SelectLanguageGroup" );
    m_SelectLanguageGroup->setColumnLayout(0, TQt::Vertical );
    m_SelectLanguageGroup->layout()->setSpacing( 6 );
    m_SelectLanguageGroup->layout()->setMargin( 11 );
    m_SelectLanguageGroupLayout = new TQHBoxLayout( m_SelectLanguageGroup->layout() );
    m_SelectLanguageGroupLayout->setAlignment( TQt::AlignTop );

    m_SelectLanguageBox = new TQComboBox( false, m_SelectLanguageGroup, "m_SelectLanguageBox" );
    m_SelectLanguageGroupLayout->addWidget( m_SelectLanguageBox );
    layout1->addWidget( m_SelectLanguageGroup );

    GroupBox1 = new TQGroupBox( tab, "GroupBox1" );
    GroupBox1->setColumnLayout(0, TQt::Vertical );
    GroupBox1->layout()->setSpacing( 6 );
    GroupBox1->layout()->setMargin( 11 );
    GroupBox1Layout = new TQGridLayout( GroupBox1->layout() );
    GroupBox1Layout->setAlignment( TQt::AlignTop );

    TextLabel2 = new TQLabel( GroupBox1, "TextLabel2" );

    GroupBox1Layout->addMultiCellWidget( TextLabel2, 0, 0, 0, 1 );

    m_browseOutput = new TQPushButton( GroupBox1, "m_browseOutput" );

    GroupBox1Layout->addWidget( m_browseOutput, 1, 2 );

    m_browseHeadings = new TQPushButton( GroupBox1, "m_browseHeadings" );

    GroupBox1Layout->addWidget( m_browseHeadings, 3, 2 );

    m_includeHeadings = new TQCheckBox( GroupBox1, "m_includeHeadings" );
    m_includeHeadings->setChecked( true );

    GroupBox1Layout->addMultiCellWidget( m_includeHeadings, 2, 2, 0, 1 );

    m_outputDir = new TQLineEdit( GroupBox1, "m_outputDir" );

    GroupBox1Layout->addWidget( m_outputDir, 1, 1 );

    m_headingsDir = new TQLineEdit( GroupBox1, "m_headingsDir" );

    GroupBox1Layout->addWidget( m_headingsDir, 3, 1 );
    Spacer1 = new TQSpacerItem( 30, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    GroupBox1Layout->addItem( Spacer1, 1, 0 );
    Spacer2 = new TQSpacerItem( 30, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    GroupBox1Layout->addItem( Spacer2, 3, 0 );
    layout1->addWidget( GroupBox1 );

    m_overwriteGroup = new TQButtonGroup( tab, "m_overwriteGroup" );
    m_overwriteGroup->setColumnLayout(0, TQt::Vertical );
    m_overwriteGroup->layout()->setSpacing( 6 );
    m_overwriteGroup->layout()->setMargin( 11 );
    m_overwriteGroupLayout = new TQVBoxLayout( m_overwriteGroup->layout() );
    m_overwriteGroupLayout->setAlignment( TQt::AlignTop );

    TextLabel1 = new TQLabel( m_overwriteGroup, "TextLabel1" );
    m_overwriteGroupLayout->addWidget( TextLabel1 );

    m_overwrite = new TQRadioButton( m_overwriteGroup, "m_overwrite" );
    m_overwriteGroupLayout->addWidget( m_overwrite );

    m_ask = new TQRadioButton( m_overwriteGroup, "m_ask" );
    m_ask->setChecked( true );
    m_overwriteGroupLayout->addWidget( m_ask );

    m_changeName = new TQRadioButton( m_overwriteGroup, "m_changeName" );
    m_overwriteGroupLayout->addWidget( m_changeName );
    layout1->addWidget( m_overwriteGroup );
    tabLayout->addLayout( layout1 );
    tabWidget->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

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

    groupBox5 = new TQGroupBox( tab_2, "groupBox5" );
    groupBox5->setColumnLayout(0, TQt::Vertical );
    groupBox5->layout()->setSpacing( 6 );
    groupBox5->layout()->setMargin( 11 );
    groupBox5Layout = new TQGridLayout( groupBox5->layout() );
    groupBox5Layout->setAlignment( TQt::AlignTop );
    spacer3 = new TQSpacerItem( 16, 30, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addItem( spacer3, 0, 0 );
    spacer3_2_2 = new TQSpacerItem( 16, 30, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addItem( spacer3_2_2, 2, 0 );
    spacer3_2 = new TQSpacerItem( 16, 30, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox5Layout->addItem( spacer3_2, 1, 0 );

    textLabel3 = new TQLabel( groupBox5, "textLabel3" );

    groupBox5Layout->addWidget( textLabel3, 2, 1 );

    textLabel1 = new TQLabel( groupBox5, "textLabel1" );

    groupBox5Layout->addMultiCellWidget( textLabel1, 0, 0, 1, 2 );

    textLabel2 = new TQLabel( groupBox5, "textLabel2" );

    groupBox5Layout->addMultiCellWidget( textLabel2, 1, 1, 1, 3 );

    m_SelectEndLineCharsBox = new TQComboBox( false, groupBox5, "m_SelectEndLineCharsBox" );

    groupBox5Layout->addMultiCellWidget( m_SelectEndLineCharsBox, 2, 2, 2, 4 );

    m_SelectIndentationTypeBox = new TQComboBox( false, groupBox5, "m_SelectIndentationTypeBox" );

    groupBox5Layout->addMultiCellWidget( m_SelectIndentationTypeBox, 0, 0, 3, 4 );

    m_SelectIndentationNumber = new KIntNumInput( groupBox5, "m_SelectIndentationNumber" );

    groupBox5Layout->addWidget( m_SelectIndentationNumber, 1, 4 );

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

    GroupBox3 = new TQGroupBox( tab_2, "GroupBox3" );

    m_forceSections = new TQCheckBox( GroupBox3, "m_forceSections" );
    m_forceSections->setGeometry( TQRect( 10, 60, 446, 52 ) );

    m_forceDoc = new TQCheckBox( GroupBox3, "m_forceDoc" );
    m_forceDoc->setGeometry( TQRect( 11, 29, 446, 28 ) );

    layout8->addWidget( GroupBox3, 0, 0 );

    tabLayout_2->addLayout( layout8, 0, 0 );
    tabWidget->insertTab( tab_2, TQString::fromLatin1("") );

    tab_3 = new TQWidget( tabWidget, "tab_3" );
    tabLayout_3 = new TQGridLayout( tab_3, 1, 1, 11, 6, "tabLayout_3"); 

    languageOptionsFrame = new TQFrame( tab_3, "languageOptionsFrame" );
    languageOptionsFrame->setFrameShape( TQFrame::StyledPanel );
    languageOptionsFrame->setFrameShadow( TQFrame::Raised );

    tabLayout_3->addWidget( languageOptionsFrame, 0, 0 );
    tabWidget->insertTab( tab_3, TQString::fromLatin1("") );

    CodeGenerationOptionsBaseLayout->addWidget( tabWidget, 0, 0 );
    languageChange();
    resize( TQSize(581, 525).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_includeHeadings, TQ_SIGNAL( toggled(bool) ), m_browseHeadings, TQ_SLOT( setEnabled(bool) ) );
    connect( m_includeHeadings, TQ_SIGNAL( toggled(bool) ), m_headingsDir, TQ_SLOT( setEnabled(bool) ) );
    connect( m_browseOutput, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseClicked() ) );
    connect( m_browseHeadings, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseClicked() ) );
    connect( m_SelectLanguageBox, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( activeLanguageChanged(int) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CodeGenerationOptionsBase::languageChange()
{
    setCaption( tr2i18n( "Code Generation Options" ) );
    m_SelectLanguageGroup->setTitle( tr2i18n( "Language" ) );
    GroupBox1->setTitle( tr2i18n( "Folders" ) );
    TextLabel2->setText( tr2i18n( "Write all generated files to folder:" ) );
    m_browseOutput->setText( tr2i18n( "Bro&wse..." ) );
    m_browseHeadings->setText( tr2i18n( "B&rowse..." ) );
    m_includeHeadings->setText( tr2i18n( "&Include heading files from folder:" ) );
    TQWhatsThis::add( m_outputDir, tr2i18n( "Files generated by Code Generator will be written to this folder" ) );
    TQWhatsThis::add( m_headingsDir, tr2i18n( "Files in this folder will be used as heading files in the generated code" ) );
    m_overwriteGroup->setTitle( tr2i18n( "Overwrite Policy" ) );
    TextLabel1->setText( tr2i18n( "If a file with the same name as the name code \n"
"generator wants to use as output file already exists:" ) );
    m_overwrite->setText( tr2i18n( "O&verwrite" ) );
    TQWhatsThis::add( m_overwrite, tr2i18n( "Overwrite existing files if they exist in the destination folder" ) );
    m_ask->setText( tr2i18n( "As&k" ) );
    TQWhatsThis::add( m_ask, tr2i18n( "If a file with the same name already exists, ask what to do" ) );
    m_changeName->setText( tr2i18n( "&Use a different name" ) );
    TQWhatsThis::add( m_changeName, tr2i18n( "If a file already exists in the destination folder, select a different name to use by adding a suffix to the file name" ) );
    tabWidget->changeTab( tab, tr2i18n( "General" ) );
    groupBox5->setTitle( tr2i18n( "Lines" ) );
    textLabel3->setText( tr2i18n( "Line ending style:" ) );
    textLabel1->setText( tr2i18n( "Indentation type:" ) );
    textLabel2->setText( tr2i18n( "Indentation amount:" ) );
    m_SelectEndLineCharsBox->clear();
    m_SelectEndLineCharsBox->insertItem( tr2i18n( "*NIX (\"\\n\")" ) );
    m_SelectEndLineCharsBox->insertItem( tr2i18n( "Windows (\"\\r\\n\")" ) );
    m_SelectEndLineCharsBox->insertItem( tr2i18n( "Mac (\"\\r\")" ) );
    m_SelectIndentationTypeBox->clear();
    m_SelectIndentationTypeBox->insertItem( tr2i18n( "No Indentation" ) );
    m_SelectIndentationTypeBox->insertItem( tr2i18n( "Tab" ) );
    m_SelectIndentationTypeBox->insertItem( tr2i18n( "Space" ) );
    GroupBox3->setTitle( tr2i18n( "Comment Verbosity" ) );
    m_forceSections->setText( tr2i18n( "Write comments &for sections even if section \n"
"is empty" ) );
    TQWhatsThis::add( m_forceSections, tr2i18n( "Writes comments to indicate the different sections (public, private etc) in a class, even if the sections are empty" ) );
    m_forceDoc->setText( tr2i18n( "&Write documentation comments even if empty" ) );
    TQWhatsThis::add( m_forceDoc, tr2i18n( "Write comments &for class and method documentation even if empty" ) );
    tabWidget->changeTab( tab_2, tr2i18n( "Formatting" ) );
    tabWidget->changeTab( tab_3, tr2i18n( "Language Options" ) );
}

void CodeGenerationOptionsBase::browseClicked()
{
    tqWarning( "CodeGenerationOptionsBase::browseClicked(): Not implemented yet" );
}

void CodeGenerationOptionsBase::activeLanguageChanged(int)
{
    tqWarning( "CodeGenerationOptionsBase::activeLanguageChanged(int): Not implemented yet" );
}

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

TQMetaObject *CodeGenerationOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CodeGenerationOptionsBase( "CodeGenerationOptionsBase", &CodeGenerationOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* CodeGenerationOptionsBase::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 TQUMethod slot_1 = {"browseClicked", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ "id", &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"activeLanguageChanged", 1, param_slot_2 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "browseClicked()", &slot_1, TQMetaData::Protected },
	{ "activeLanguageChanged(int)", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"CodeGenerationOptionsBase", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_CodeGenerationOptionsBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool CodeGenerationOptionsBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: browseClicked(); break;
    case 2: activeLanguageChanged((int)static_QUType_int.get(_o+1)); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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