/****************************************************************************
** 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 <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlineedit.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqmultilineedit.h>
#include <ntqspinbox.h>
#include <ntqcheckbox.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"); 

    ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setColumnLayout(0, TQt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    ButtonGroup1Layout = new TQGridLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( TQt::AlignTop );

    radioPixmapInline = new TQRadioButton( ButtonGroup1, "radioPixmapInline" );
    radioPixmapInline->setChecked( true );

    ButtonGroup1Layout->addWidget( radioPixmapInline, 0, 0 );

    radioProjectImageFile = new TQRadioButton( ButtonGroup1, "radioProjectImageFile" );

    ButtonGroup1Layout->addWidget( radioProjectImageFile, 2, 0 );

    editPixmapFunction = new TQLineEdit( ButtonGroup1, "editPixmapFunction" );
    editPixmapFunction->setEnabled( false );

    ButtonGroup1Layout->addWidget( editPixmapFunction, 1, 1 );

    radioPixmapFunction = new TQRadioButton( ButtonGroup1, "radioPixmapFunction" );

    ButtonGroup1Layout->addWidget( radioPixmapFunction, 1, 0 );

    FormSettingsBaseLayout->addWidget( ButtonGroup1, 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 );

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

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

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

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

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

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

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

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

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

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

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

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

    FormSettingsBaseLayout->addMultiCellWidget( GroupBox1, 0, 0, 0, 1 );

    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, 2 );
    Spacer3 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox2Layout->addItem( Spacer3, 0, 3 );

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

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

    checkLayoutFunctions = new TQCheckBox( GroupBox2, "checkLayoutFunctions" );

    GroupBox2Layout->addMultiCellWidget( checkLayoutFunctions, 2, 2, 0, 1 );

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

    GroupBox2Layout->addWidget( spinSpacing, 1, 2 );
    Spacer4 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox2Layout->addItem( Spacer4, 1, 3 );

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

    GroupBox2Layout->addMultiCellWidget( TextLabel1_3, 0, 0, 0, 1 );

    spaFuLabel = new TQLabel( GroupBox2, "spaFuLabel" );
    spaFuLabel->setEnabled( false );

    GroupBox2Layout->addWidget( spaFuLabel, 4, 0 );

    marFuLabel = new TQLabel( GroupBox2, "marFuLabel" );
    marFuLabel->setEnabled( false );
    marFuLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, marFuLabel->sizePolicy().hasHeightForWidth() ) );

    GroupBox2Layout->addWidget( marFuLabel, 3, 0 );
    Spacer5 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    GroupBox2Layout->addMultiCell( Spacer5, 2, 2, 2, 3 );

    editSpacingFunction = new TQLineEdit( GroupBox2, "editSpacingFunction" );
    editSpacingFunction->setEnabled( false );

    GroupBox2Layout->addMultiCellWidget( editSpacingFunction, 4, 4, 1, 3 );

    editMarginFunction = new TQLineEdit( GroupBox2, "editMarginFunction" );
    editMarginFunction->setEnabled( false );
    editMarginFunction->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, editMarginFunction->sizePolicy().hasHeightForWidth() ) );

    GroupBox2Layout->addMultiCellWidget( editMarginFunction, 3, 3, 1, 3 );

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

    Layout4 = new TQHBoxLayout( 0, 0, 6, "Layout4"); 

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );
    Layout4->addWidget( buttonHelp );
    Horizontal_Spacing2 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout4->addItem( Horizontal_Spacing2 );

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

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

    FormSettingsBaseLayout->addMultiCellLayout( Layout4, 2, 2, 0, 1 );
    languageChange();
    resize( TQSize(597, 458).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() ) );
    connect( radioPixmapFunction, TQ_SIGNAL( toggled(bool) ), editPixmapFunction, TQ_SLOT( setEnabled(bool) ) );
    connect( checkLayoutFunctions, TQ_SIGNAL( toggled(bool) ), editSpacingFunction, TQ_SLOT( setEnabled(bool) ) );
    connect( checkLayoutFunctions, TQ_SIGNAL( toggled(bool) ), editMarginFunction, TQ_SLOT( setEnabled(bool) ) );
    connect( checkLayoutFunctions, TQ_SIGNAL( toggled(bool) ), marFuLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( checkLayoutFunctions, TQ_SIGNAL( toggled(bool) ), spaFuLabel, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( editClassName, editComment );
    setTabOrder( editComment, editAuthor );
    setTabOrder( editAuthor, radioPixmapInline );
    setTabOrder( radioPixmapInline, radioPixmapFunction );
    setTabOrder( radioPixmapFunction, editPixmapFunction );
    setTabOrder( editPixmapFunction, radioProjectImageFile );
    setTabOrder( radioProjectImageFile, spinMargin );
    setTabOrder( spinMargin, spinSpacing );
    setTabOrder( spinSpacing, checkLayoutFunctions );
    setTabOrder( checkLayoutFunctions, editMarginFunction );
    setTabOrder( editMarginFunction, editSpacingFunction );
    setTabOrder( editSpacingFunction, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
    setTabOrder( buttonCancel, buttonHelp );

    // buddies
    TextLabel1_2->setBuddy( editAuthor );
    TextLabel1->setBuddy( editClassName );
    TextLabel2->setBuddy( editComment );
    TextLabel2_2->setBuddy( spinSpacing );
    TextLabel1_3->setBuddy( spinMargin );
    spaFuLabel->setBuddy( editSpacingFunction );
    marFuLabel->setBuddy( editMarginFunction );
}

/*
 *  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( tr( "Form Settings" ) );
    TQWhatsThis::add( this, tr( "<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>" ) );
    ButtonGroup1->setTitle( tr( "Pixmaps" ) );
    radioPixmapInline->setText( tr( "Save In&line" ) );
    TQToolTip::add( radioPixmapInline, tr( "Save pixmaps in the .ui files" ) );
    TQWhatsThis::add( radioPixmapInline, tr( "<b>Save Inline</b><p>Saves the pixmaps as binary data in the .ui files. Pixmaps saved like this are not shared between forms. We recommend using Project image files instead." ) );
    radioProjectImageFile->setText( tr( "Project &Imagefile" ) );
    TQToolTip::add( radioProjectImageFile, tr( "Use the Project's Image file for pixmaps" ) );
    TQWhatsThis::add( radioProjectImageFile, tr( "<b>Use the Project's Image file for pixmaps</b>\n"
"<p>Each project may have a collection of pixmaps. If you use a project, we recommend that you use this option since it shares the images and is the fastest and most efficient way to use pixmaps in your forms.</p>" ) );
    TQToolTip::add( editPixmapFunction, tr( "Specify Pixmap-Loader function (only the function's name, no parentheses!)" ) );
    TQWhatsThis::add( editPixmapFunction, tr( "<b>Specify Pixmap-Loader function</b><p>Specify the function which should be used for loading a pixmap in the generated code. <em>Only enter the function's name, with no parentheses.</em>" ) );
    radioPixmapFunction->setText( tr( "Use &Function:" ) );
    TQToolTip::add( radioPixmapFunction, tr( "Use the given function for pixmaps" ) );
    TQWhatsThis::add( radioPixmapFunction, tr( "<b>Use a given function for pixmaps</b><p>If you choose this option you must define a function in the line edit at the right which will be used in the generated code for loading pixmaps. When choosing a pixmap in <i>TQt Designer</i> you will be asked to specify the arguments which will be passed to the function in the generated code.<p> This approach makes it possible to use your own icon-loader function for loading pixmaps.  <i>TQt Designer</i> can't preview the correct image if you use your own function." ) );
    GroupBox1->setTitle( tr( "Settings" ) );
    TQToolTip::add( editClassName, tr( "Change class name" ) );
    TQWhatsThis::add( editClassName, tr( "<b>Enter the name of the class that will be created.</b><p><em>classname.h</em> and <em>classname.cpp</em> will be generated as C++ output when it is compiled by uic.</p>" ) );
    TextLabel1_2->setText( tr( "A&uthor:" ) );
    TQToolTip::add( editAuthor, tr( "Enter your name" ) );
    TQWhatsThis::add( editAuthor, tr( "Enter your name." ) );
    TextLabel1->setText( tr( "Class &Name:" ) );
    TextLabel2->setText( tr( "Co&mment:" ) );
    TQWhatsThis::add( editComment, tr( "Enter a comment about the form." ) );
    GroupBox2->setTitle( tr( "La&youts" ) );
    TextLabel2_2->setText( tr( "D&efault Spacing:" ) );
    checkLayoutFunctions->setText( tr( "Use Func&tions:" ) );
    TQToolTip::add( checkLayoutFunctions, tr( "Use functions to get the margin and spacing" ) );
    TQWhatsThis::add( checkLayoutFunctions, tr( "<b>Use a given function for margin and/or spacing</b><p>If you choose this option you must define functions in the line edit below which will be used in the generated code for getting the margin and spacing value. <i>TQt Designer</i> can't preview the correct margin or spacing if you use your own function. Instead, the default values will be used for preview." ) );
    TextLabel1_3->setText( tr( "Default Mar&gin:" ) );
    spaFuLabel->setText( tr( "S&pacing:" ) );
    marFuLabel->setText( tr( "Ma&rgin:" ) );
    TQToolTip::add( editSpacingFunction, tr( "Specify spacing function (only the function's name, no parentheses!)" ) );
    TQWhatsThis::add( editSpacingFunction, tr( "<b>Specify spacing function</b><p>Specify the function which should be used for getting the spacing in the generated code. <em>Only enter the function's name, with no parentheses.</em>" ) );
    TQToolTip::add( editMarginFunction, tr( "Specify margin function (only the function's name, no parentheses!)" ) );
    TQWhatsThis::add( editMarginFunction, tr( "<b>Specify margin function</b><p>Specify the function which should be used for getting the margin in the generated code. <em>Only enter the function's name, with no parentheses.</em>" ) );
    buttonHelp->setText( tr( "&Help" ) );
    buttonOk->setText( tr( "&OK" ) );
    TQWhatsThis::add( buttonOk, tr( "Close the dialog and apply all the changes." ) );
    buttonCancel->setText( tr( "&Cancel" ) );
    TQWhatsThis::add( buttonCancel, tr( "Close the dialog and discard any changes." ) );
}

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

