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

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

#include "formsettings.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqspinbox.h>
#include <ntqlabel.h>
#include <ntqmultilineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    Layout4 = new TQHBoxLayout( 0, 0, 6, "Layout4"); 
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout4->addItem( Horizontal_Spacing2 );

    buttonOk = new KPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout4->addWidget( buttonOk );

    buttonCancel = new KPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout4->addWidget( buttonCancel );

    FormSettingsBaseLayout->addLayout( Layout4, 2, 0 );

    GroupBox2 = new TQGroupBox( this, "GroupBox2" );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new TQGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    spinMargin = new TQSpinBox( GroupBox2, "spinMargin" );
    spinMargin->setValue( 11 );

    GroupBox2Layout->addWidget( spinMargin, 0, 1 );

    spinSpacing = new TQSpinBox( GroupBox2, "spinSpacing" );
    spinSpacing->setValue( 6 );

    GroupBox2Layout->addWidget( spinSpacing, 1, 1 );

    TextLabel1_3 = new TQLabel( GroupBox2, "TextLabel1_3" );

    GroupBox2Layout->addWidget( TextLabel1_3, 0, 0 );

    TextLabel2_2 = new TQLabel( GroupBox2, "TextLabel2_2" );

    GroupBox2Layout->addWidget( TextLabel2_2, 1, 0 );

    FormSettingsBaseLayout->addWidget( GroupBox2, 1, 0 );

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

    editComment = new TQMultiLineEdit( GroupBox1, "editComment" );

    GroupBox1Layout->addMultiCellWidget( editComment, 3, 4, 1, 1 );
    Spacer1 = new TQSpacerItem( 20, 130, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox1Layout->addItem( Spacer1, 4, 0 );

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

    GroupBox1Layout->addWidget( TextLabel2, 3, 0 );

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

    GroupBox1Layout->addWidget( TextLabel1_2_2, 2, 0 );

    editLicense = new KLineEdit( GroupBox1, "editLicense" );

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

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

    GroupBox1Layout->addWidget( TextLabel1_2_3, 1, 0 );

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

    GroupBox1Layout->addWidget( TextLabel1_2, 0, 0 );

    editAuthor = new KLineEdit( GroupBox1, "editAuthor" );

    GroupBox1Layout->addWidget( editAuthor, 0, 1 );

    editVersion = new KLineEdit( GroupBox1, "editVersion" );

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

    FormSettingsBaseLayout->addWidget( GroupBox1, 0, 0 );
    languageChange();
    resize( TQSize(497, 490).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( okClicked() ) );

    // tab order
    setTabOrder( editAuthor, editVersion );
    setTabOrder( editVersion, editLicense );
    setTabOrder( editLicense, editComment );
    setTabOrder( editComment, spinMargin );
    setTabOrder( spinMargin, spinSpacing );
    setTabOrder( spinSpacing, buttonOk );
    setTabOrder( buttonOk, buttonCancel );

    // buddies
    TextLabel1_3->setBuddy( spinMargin );
    TextLabel2_2->setBuddy( spinSpacing );
    TextLabel2->setBuddy( editComment );
    TextLabel1_2_2->setBuddy( editAuthor );
    TextLabel1_2_3->setBuddy( editAuthor );
    TextLabel1_2->setBuddy( editAuthor );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FormSettingsBase::languageChange()
{
    setCaption( tr2i18n( "Form Settings" ) );
    TQWhatsThis::add( this, tr2i18n( "<b>Form Settings</b><p>Change settings for the form. Settings like <b>Comment</b> and <b>Author</b> are for your own use and are not required.</p>" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    TQWhatsThis::add( buttonOk, tr2i18n( "Close the dialog and apply all the changes." ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    TQWhatsThis::add( buttonCancel, tr2i18n( "Close the dialog and discard any changes." ) );
    GroupBox2->setTitle( tr2i18n( "La&youts" ) );
    TextLabel1_3->setText( tr2i18n( "Default mar&gin:" ) );
    TextLabel2_2->setText( tr2i18n( "D&efault spacing:" ) );
    GroupBox1->setTitle( tr2i18n( "&Settings" ) );
    TQWhatsThis::add( editComment, tr2i18n( "Enter a comment about the form." ) );
    TextLabel2->setText( tr2i18n( "Co&mment:" ) );
    TextLabel1_2_2->setText( tr2i18n( "&License:" ) );
    TQToolTip::add( editLicense, tr2i18n( "Enter your name" ) );
    TQWhatsThis::add( editLicense, tr2i18n( "Enter your name." ) );
    TextLabel1_2_3->setText( tr2i18n( "&Version:" ) );
    TextLabel1_2->setText( tr2i18n( "A&uthor:" ) );
    TQToolTip::add( editAuthor, tr2i18n( "Enter your name" ) );
    TQWhatsThis::add( editAuthor, tr2i18n( "Enter your name." ) );
    TQToolTip::add( editVersion, tr2i18n( "Enter your name" ) );
    TQWhatsThis::add( editVersion, tr2i18n( "Enter your name." ) );
}

void FormSettingsBase::okClicked()
{
    tqWarning( "FormSettingsBase::okClicked(): Not implemented yet" );
}

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

TQMetaObject *FormSettingsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FormSettingsBase( "FormSettingsBase", &FormSettingsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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