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

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

#include "tableeditors.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqtable.h>
#include <ntqspinbox.h>
#include <ntqlineedit.h>
#include <ntqframe.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    TableEditorSLayout->addWidget( buttonCancel, 1, 3 );
    Horizontal_Spacing2 = new TQSpacerItem( 16, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    TableEditorSLayout->addItem( Horizontal_Spacing2, 1, 1 );

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

    TableEditorSLayout->addWidget( buttonOk, 1, 2 );

    buttonHelp = new KPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( true );

    TableEditorSLayout->addWidget( buttonHelp, 1, 0 );

    tabWidget = new TQTabWidget( this, "tabWidget" );

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

    textLabel5 = new TQLabel( tab, "textLabel5" );

    tabLayout->addMultiCellWidget( textLabel5, 3, 3, 0, 3 );

    tableData = new TQTable( tab, "tableData" );
    tableData->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, tableData->sizePolicy().hasHeightForWidth() ) );
    tableData->setVScrollBarMode( TQTable::AlwaysOn );
    tableData->setHScrollBarMode( TQTable::AlwaysOn );
    tableData->setNumRows( 0 );
    tableData->setNumCols( 0 );
    tableData->setSelectionMode( TQTable::Single );

    tabLayout->addMultiCellWidget( tableData, 4, 4, 0, 3 );
    spacer1 = new TQSpacerItem( 276, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tabLayout->addItem( spacer1, 0, 2 );
    spacer1_2_2 = new TQSpacerItem( 276, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tabLayout->addItem( spacer1_2_2, 1, 2 );

    rowSpinBox = new TQSpinBox( tab, "rowSpinBox" );
    rowSpinBox->setMaxValue( 999 );
    rowSpinBox->setValue( 0 );

    tabLayout->addWidget( rowSpinBox, 0, 1 );

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

    tabLayout->addWidget( textLabel2, 1, 0 );

    captionText = new TQLineEdit( tab, "captionText" );

    tabLayout->addMultiCellWidget( captionText, 2, 2, 1, 3 );

    pushButton7_2 = new KPushButton( tab, "pushButton7_2" );

    tabLayout->addWidget( pushButton7_2, 1, 3 );

    pushButton7 = new KPushButton( tab, "pushButton7" );

    tabLayout->addWidget( pushButton7, 0, 3 );

    textLabel3 = new TQLabel( tab, "textLabel3" );
    textLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );

    tabLayout->addWidget( textLabel3, 2, 0 );

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

    tabLayout->addWidget( textLabel1, 0, 0 );

    colSpinBox = new TQSpinBox( tab, "colSpinBox" );
    colSpinBox->setMaxValue( 999 );
    colSpinBox->setValue( 0 );

    tabLayout->addWidget( colSpinBox, 1, 1 );
    tabWidget->insertTab( tab, TQString::fromLatin1("") );

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

    frame3 = new TQFrame( tab_2, "frame3" );
    frame3->setEnabled( false );
    frame3->setFrameShape( TQFrame::StyledPanel );
    frame3->setFrameShadow( TQFrame::Raised );
    frame3Layout = new TQGridLayout( frame3, 1, 1, 11, 6, "frame3Layout"); 

    headerTableData = new TQTable( frame3, "headerTableData" );
    headerTableData->setResizePolicy( TQTable::AutoOneFit );
    headerTableData->setVScrollBarMode( TQTable::AlwaysOn );
    headerTableData->setHScrollBarMode( TQTable::AlwaysOn );
    headerTableData->setNumRows( 0 );
    headerTableData->setNumCols( 0 );
    headerTableData->setSelectionMode( TQTable::Single );

    frame3Layout->addMultiCellWidget( headerTableData, 3, 3, 0, 2 );
    spacer2 = new TQSpacerItem( 340, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    frame3Layout->addItem( spacer2, 0, 2 );

    headerRowSpinBox = new TQSpinBox( frame3, "headerRowSpinBox" );
    headerRowSpinBox->setMinValue( 0 );
    headerRowSpinBox->setValue( 0 );

    frame3Layout->addWidget( headerRowSpinBox, 0, 1 );

    textLabel4_2 = new TQLabel( frame3, "textLabel4_2" );

    frame3Layout->addWidget( textLabel4_2, 0, 0 );

    headerColSpinBox = new TQSpinBox( frame3, "headerColSpinBox" );
    headerColSpinBox->setMaxValue( 999 );

    frame3Layout->addWidget( headerColSpinBox, 1, 1 );

    textLabel4 = new TQLabel( frame3, "textLabel4" );

    frame3Layout->addWidget( textLabel4, 1, 0 );

    textLabel6 = new TQLabel( frame3, "textLabel6" );

    frame3Layout->addMultiCellWidget( textLabel6, 2, 2, 0, 2 );

    tabLayout_2->addMultiCellWidget( frame3, 1, 1, 0, 2 );

    headerCheckBox = new TQCheckBox( tab_2, "headerCheckBox" );

    tabLayout_2->addWidget( headerCheckBox, 0, 0 );
    spacer6 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tabLayout_2->addItem( spacer6, 0, 1 );

    pushButton7_3 = new KPushButton( tab_2, "pushButton7_3" );
    pushButton7_3->setEnabled( false );

    tabLayout_2->addWidget( pushButton7_3, 0, 2 );
    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"); 

    frame3_2 = new TQFrame( tab_3, "frame3_2" );
    frame3_2->setEnabled( false );
    frame3_2->setFrameShape( TQFrame::StyledPanel );
    frame3_2->setFrameShadow( TQFrame::Raised );
    frame3_2Layout = new TQGridLayout( frame3_2, 1, 1, 11, 6, "frame3_2Layout"); 

    footerTableData = new TQTable( frame3_2, "footerTableData" );
    footerTableData->setResizePolicy( TQTable::AutoOneFit );
    footerTableData->setVScrollBarMode( TQTable::AlwaysOn );
    footerTableData->setHScrollBarMode( TQTable::AlwaysOn );
    footerTableData->setNumRows( 0 );
    footerTableData->setNumCols( 0 );
    footerTableData->setSelectionMode( TQTable::Single );
    footerTableData->setFocusStyle( TQTable::FollowStyle );

    frame3_2Layout->addMultiCellWidget( footerTableData, 3, 3, 0, 2 );

    footerRowSpinBox = new TQSpinBox( frame3_2, "footerRowSpinBox" );
    footerRowSpinBox->setMinValue( 0 );
    footerRowSpinBox->setValue( 0 );

    frame3_2Layout->addWidget( footerRowSpinBox, 0, 1 );

    textLabel4_2_2 = new TQLabel( frame3_2, "textLabel4_2_2" );

    frame3_2Layout->addWidget( textLabel4_2_2, 0, 0 );

    footerColSpinBox = new TQSpinBox( frame3_2, "footerColSpinBox" );
    footerColSpinBox->setMaxValue( 999 );

    frame3_2Layout->addWidget( footerColSpinBox, 1, 1 );

    textLabel4_3 = new TQLabel( frame3_2, "textLabel4_3" );

    frame3_2Layout->addWidget( textLabel4_3, 1, 0 );

    textLabel6_2 = new TQLabel( frame3_2, "textLabel6_2" );

    frame3_2Layout->addMultiCellWidget( textLabel6_2, 2, 2, 0, 2 );
    spacer2_2 = new TQSpacerItem( 340, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    frame3_2Layout->addItem( spacer2_2, 0, 2 );

    tabLayout_3->addMultiCellWidget( frame3_2, 1, 1, 0, 2 );

    footerCheckBox = new TQCheckBox( tab_3, "footerCheckBox" );

    tabLayout_3->addWidget( footerCheckBox, 0, 0 );
    spacer7 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tabLayout_3->addItem( spacer7, 0, 1 );

    pushButton7_4 = new KPushButton( tab_3, "pushButton7_4" );
    pushButton7_4->setEnabled( false );

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

    TableEditorSLayout->addMultiCellWidget( tabWidget, 0, 0, 0, 3 );
    languageChange();
    resize( TQSize(692, 584).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( headerCheckBox, TQ_SIGNAL( toggled(bool) ), frame3, TQ_SLOT( setEnabled(bool) ) );
    connect( footerCheckBox, TQ_SIGNAL( toggled(bool) ), frame3_2, TQ_SLOT( setEnabled(bool) ) );
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( headerCheckBox, TQ_SIGNAL( toggled(bool) ), pushButton7_3, TQ_SLOT( setEnabled(bool) ) );
    connect( footerCheckBox, TQ_SIGNAL( toggled(bool) ), pushButton7_4, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( tabWidget, rowSpinBox );
    setTabOrder( rowSpinBox, colSpinBox );
    setTabOrder( colSpinBox, pushButton7 );
    setTabOrder( pushButton7, pushButton7_2 );
    setTabOrder( pushButton7_2, captionText );
    setTabOrder( captionText, tableData );
    setTabOrder( tableData, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
    setTabOrder( buttonCancel, buttonHelp );
    setTabOrder( buttonHelp, headerCheckBox );
    setTabOrder( headerCheckBox, pushButton7_3 );
    setTabOrder( pushButton7_3, headerRowSpinBox );
    setTabOrder( headerRowSpinBox, headerColSpinBox );
    setTabOrder( headerColSpinBox, headerTableData );
    setTabOrder( headerTableData, footerCheckBox );
    setTabOrder( footerCheckBox, pushButton7_4 );
    setTabOrder( pushButton7_4, footerRowSpinBox );
    setTabOrder( footerRowSpinBox, footerColSpinBox );
    setTabOrder( footerColSpinBox, footerTableData );

    // buddies
    textLabel5->setBuddy( tableData );
    textLabel2->setBuddy( colSpinBox );
    textLabel3->setBuddy( captionText );
    textLabel1->setBuddy( rowSpinBox );
    textLabel4_2->setBuddy( headerRowSpinBox );
    textLabel4->setBuddy( headerColSpinBox );
    textLabel6->setBuddy( headerTableData );
    textLabel4_2_2->setBuddy( footerRowSpinBox );
    textLabel4_3->setBuddy( footerColSpinBox );
    textLabel6_2->setBuddy( footerTableData );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TableEditorS::languageChange()
{
    setCaption( tr2i18n( "Table Editor" ) );
    buttonCancel->setText( tr2i18n( "Ca&ncel" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
    textLabel5->setText( tr2i18n( "Ta&ble data:" ) );
    textLabel2->setText( tr2i18n( "Co&lumns:" ) );
    pushButton7_2->setText( tr2i18n( "Bod&y Properties" ) );
    pushButton7->setText( tr2i18n( "&Table Properties" ) );
    textLabel3->setText( tr2i18n( "C&aption:" ) );
    textLabel1->setText( tr2i18n( "&Rows:" ) );
    tabWidget->changeTab( tab, tr2i18n( "&Main" ) );
    textLabel4_2->setText( tr2i18n( "Header &rows:" ) );
    textLabel4->setText( tr2i18n( "Header co&lumns:" ) );
    textLabel6->setText( tr2i18n( "Header &data:" ) );
    headerCheckBox->setText( tr2i18n( "Insert ta&ble header" ) );
    pushButton7_3->setText( tr2i18n( "&Header Properties" ) );
    tabWidget->changeTab( tab_2, tr2i18n( "Header" ) );
    textLabel4_2_2->setText( tr2i18n( "Footer &rows:" ) );
    textLabel4_3->setText( tr2i18n( "Footer co&lumns:" ) );
    textLabel6_2->setText( tr2i18n( "Footer &data:" ) );
    footerCheckBox->setText( tr2i18n( "Insert ta&ble footer" ) );
    pushButton7_4->setText( tr2i18n( "&Footer Properties" ) );
    tabWidget->changeTab( tab_3, tr2i18n( "Footer" ) );
}

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

TQMetaObject *TableEditorS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TableEditorS( "TableEditorS", &TableEditorS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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