/****************************************************************************
** Form implementation generated from reading ui file 'tostoragetablespaceui.ui'
**
** Created: Tue Sep 18 08:21:25 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 "tostoragetablespaceui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "tofilesize.h"

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

    MinimumExtent = new toFilesize( this, "MinimumExtent" );

    toStorageTablespaceUILayout->addWidget( MinimumExtent, 0, 0 );

    ButtonGroup1 = new QButtonGroup( this, "ButtonGroup1" );
    ButtonGroup1->setColumnLayout(0, Qt::Vertical );
    ButtonGroup1->layout()->setSpacing( 6 );
    ButtonGroup1->layout()->setMargin( 11 );
    ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
    ButtonGroup1Layout->setAlignment( Qt::AlignTop );

    Logging = new QCheckBox( ButtonGroup1, "Logging" );
    Logging->setChecked( TRUE );

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

    Online = new QCheckBox( ButtonGroup1, "Online" );
    Online->setChecked( TRUE );

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

    Permanent = new QCheckBox( ButtonGroup1, "Permanent" );
    Permanent->setChecked( TRUE );

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

    DefaultStorage = new QCheckBox( ButtonGroup1, "DefaultStorage" );

    ButtonGroup1Layout->addWidget( DefaultStorage, 3, 0 );

    toStorageTablespaceUILayout->addWidget( ButtonGroup1, 1, 0 );

    ExtentGroup = new QButtonGroup( this, "ExtentGroup" );
    ExtentGroup->setColumnLayout(0, Qt::Vertical );
    ExtentGroup->layout()->setSpacing( 6 );
    ExtentGroup->layout()->setMargin( 11 );
    ExtentGroupLayout = new QGridLayout( ExtentGroup->layout() );
    ExtentGroupLayout->setAlignment( Qt::AlignTop );

    Dictionary = new QRadioButton( ExtentGroup, "Dictionary" );
    Dictionary->setChecked( TRUE );

    ExtentGroupLayout->addWidget( Dictionary, 0, 0 );

    LocalAuto = new QRadioButton( ExtentGroup, "LocalAuto" );

    ExtentGroupLayout->addWidget( LocalAuto, 1, 0 );

    LocalSelect = new QRadioButton( ExtentGroup, "LocalSelect" );
    LocalSelect->setEnabled( TRUE );

    ExtentGroupLayout->addWidget( LocalSelect, 2, 0 );

    LocalUniform = new toFilesize( ExtentGroup, "LocalUniform" );
    LocalUniform->setEnabled( FALSE );

    ExtentGroupLayout->addWidget( LocalUniform, 3, 0 );

    toStorageTablespaceUILayout->addWidget( ExtentGroup, 2, 0 );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    toStorageTablespaceUILayout->addItem( Spacer1, 3, 0 );
    languageChange();
    resize( QSize(592, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( DefaultStorage, SIGNAL( toggled(bool) ), this, SLOT( allowDefault(bool) ) );
    connect( Permanent, SIGNAL( toggled(bool) ), this, SLOT( permanentToggle(bool) ) );
    connect( Dictionary, SIGNAL( toggled(bool) ), this, SLOT( dictionaryToggle(bool) ) );
    connect( LocalSelect, SIGNAL( toggled(bool) ), this, SLOT( uniformToggle(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toStorageTablespaceUI::languageChange()
{
    setCaption( tr( "Form1" ) );
    ButtonGroup1->setTitle( tr( "&Options" ) );
    Logging->setText( tr( "&Logging" ) );
    QToolTip::add( Logging, tr( "Should objects created in this tablespace be logging by default" ) );
    Online->setText( tr( "&Online" ) );
    QToolTip::add( Online, tr( "Should tablespace be online at the time of creation" ) );
    Permanent->setText( tr( "&Permanent" ) );
    QToolTip::add( Permanent, tr( "Should objects in this tablespace be permanent after the end of the session" ) );
    DefaultStorage->setText( tr( "&Default storage" ) );
    QToolTip::add( DefaultStorage, tr( "Specify default storage clause (In separate tab)" ) );
    ExtentGroup->setTitle( tr( "&Extent allocation" ) );
    Dictionary->setText( tr( "&Dictionary" ) );
    QToolTip::add( Dictionary, tr( "Manage tablespace extents using dictionary tables" ) );
    LocalAuto->setText( tr( "Local &autoallocation" ) );
    QToolTip::add( LocalAuto, tr( "Specify how space is allocated in the tablespace" ) );
    LocalSelect->setText( tr( "Local &uniform" ) );
    QToolTip::add( LocalSelect, tr( "The tablespace is locally managed with fixed extent sizes of specified size" ) );
}

void toStorageTablespaceUI::permanentToggle(bool)
{
    qWarning( "toStorageTablespaceUI::permanentToggle(bool): Not implemented yet" );
}

void toStorageTablespaceUI::dictionaryToggle(bool)
{
    qWarning( "toStorageTablespaceUI::dictionaryToggle(bool): Not implemented yet" );
}

void toStorageTablespaceUI::uniformToggle(bool)
{
    qWarning( "toStorageTablespaceUI::uniformToggle(bool): Not implemented yet" );
}

void toStorageTablespaceUI::allowDefault(bool)
{
    qWarning( "toStorageTablespaceUI::allowDefault(bool): Not implemented yet" );
}

