/****************************************************************************
** Form implementation generated from reading ui file 'tooraclesettingui.ui'
**
** Created: Tue Sep 18 08:21:23 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "tooraclesettingui.h"

#include <qvariant.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a toOracleSettingUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
toOracleSettingUI::toOracleSettingUI( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "toOracleSettingUI" );
    toOracleSettingUILayout = new QGridLayout( this, 1, 1, 11, 6, "toOracleSettingUILayout"); 

    TextLabel6_2_2_2 = new QLabel( this, "TextLabel6_2_2_2" );

    toOracleSettingUILayout->addWidget( TextLabel6_2_2_2, 1, 0 );

    TextLabel6_2_3 = new QLabel( this, "TextLabel6_2_3" );

    toOracleSettingUILayout->addWidget( TextLabel6_2_3, 0, 0 );

    DefaultDate = new QLineEdit( this, "DefaultDate" );

    toOracleSettingUILayout->addMultiCellWidget( DefaultDate, 1, 1, 1, 2 );

    CheckPoint = new QLineEdit( this, "CheckPoint" );

    toOracleSettingUILayout->addMultiCellWidget( CheckPoint, 0, 0, 1, 2 );

    TextLabel6_3_2 = new QLabel( this, "TextLabel6_3_2" );

    toOracleSettingUILayout->addWidget( TextLabel6_3_2, 3, 0 );

    Unlimited = new QCheckBox( this, "Unlimited" );
    Unlimited->setChecked( TRUE );

    toOracleSettingUILayout->addWidget( Unlimited, 3, 2 );

    MaxLong = new QLineEdit( this, "MaxLong" );
    MaxLong->setEnabled( FALSE );

    toOracleSettingUILayout->addWidget( MaxLong, 3, 1 );
    Spacer6 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    toOracleSettingUILayout->addItem( Spacer6, 6, 2 );
    Spacer2_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toOracleSettingUILayout->addMultiCell( Spacer2_2, 5, 5, 0, 1 );

    CreatePlanTable = new QPushButton( this, "CreatePlanTable" );
    CreatePlanTable->setEnabled( FALSE );
    CreatePlanTable->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, CreatePlanTable->sizePolicy().hasHeightForWidth() ) );

    toOracleSettingUILayout->addWidget( CreatePlanTable, 5, 2 );

    TextLabel6_3 = new QLabel( this, "TextLabel6_3" );

    toOracleSettingUILayout->addWidget( TextLabel6_3, 4, 0 );

    ExplainPlan = new QLineEdit( this, "ExplainPlan" );

    toOracleSettingUILayout->addWidget( ExplainPlan, 4, 1 );

    KeepPlans = new QCheckBox( this, "KeepPlans" );

    toOracleSettingUILayout->addWidget( KeepPlans, 4, 2 );

    OpenCursors = new QSpinBox( this, "OpenCursors" );
    OpenCursors->setMinValue( 1 );

    toOracleSettingUILayout->addWidget( OpenCursors, 2, 2 );

    TextLabel1 = new QLabel( this, "TextLabel1" );

    toOracleSettingUILayout->addMultiCellWidget( TextLabel1, 2, 2, 0, 1 );
    languageChange();
    resize( QSize(361, 287).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( CreatePlanTable, SIGNAL( clicked() ), this, SLOT( createPlanTable() ) );
    connect( Unlimited, SIGNAL( toggled(bool) ), MaxLong, SLOT( setDisabled(bool) ) );

    // tab order
    setTabOrder( CheckPoint, DefaultDate );
    setTabOrder( DefaultDate, OpenCursors );
    setTabOrder( OpenCursors, MaxLong );
    setTabOrder( MaxLong, Unlimited );
    setTabOrder( Unlimited, ExplainPlan );
    setTabOrder( ExplainPlan, KeepPlans );
    setTabOrder( KeepPlans, CreatePlanTable );

    // buddies
    TextLabel6_2_2_2->setBuddy( DefaultDate );
    TextLabel6_2_3->setBuddy( CheckPoint );
    TextLabel6_3_2->setBuddy( ExplainPlan );
    TextLabel6_3->setBuddy( ExplainPlan );
    TextLabel1->setBuddy( OpenCursors );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toOracleSettingUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    TextLabel6_2_2_2->setText( tr( "&Default date format" ) );
    QToolTip::add( TextLabel6_2_2_2, tr( "The default dateformat to use when querying the database." ) );
    TextLabel6_2_3->setText( tr( "&Checkpoint name" ) );
    QToolTip::add( TextLabel6_2_3, tr( "The name of the checkpoint used when needed to rollback work." ) );
    TextLabel6_3_2->setText( tr( "&Max long and LOB data length" ) );
    QToolTip::add( TextLabel6_3_2, tr( "Max length to read from LOB or LONG data fields. LONG:s can not be specified unlimited but will be defaulted to 33000 if unlimited." ) );
    Unlimited->setText( tr( "Unlimited" ) );
    CreatePlanTable->setText( tr( "Create Table" ) );
    TextLabel6_3->setText( tr( "&Explain plan table" ) );
    QToolTip::add( TextLabel6_3, tr( "Name of the table to put explain plan output in." ) );
    KeepPlans->setText( tr( "&Keep plans" ) );
    QToolTip::add( KeepPlans, tr( "Keep records for the plan explanations in the plan table." ) );
    TextLabel1->setText( tr( "Maximum cursors to keep open" ) );
}

void toOracleSettingUI::createPlanTable()
{
    qWarning( "toOracleSettingUI::createPlanTable(): Not implemented yet" );
}

