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

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

#include "sortdialoglayout.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

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

    sortdialoglayoutLayout->addMultiCellLayout( Layout1, 2, 2, 0, 1 );

    m_groupSortOrder = new TQButtonGroup( this, "m_groupSortOrder" );
    m_groupSortOrder->setColumnLayout(0, TQt::Vertical );
    m_groupSortOrder->layout()->setSpacing( 6 );
    m_groupSortOrder->layout()->setMargin( 11 );
    m_groupSortOrderLayout = new TQHBoxLayout( m_groupSortOrder->layout() );
    m_groupSortOrderLayout->setAlignment( TQt::AlignTop );

    layout2 = new TQVBoxLayout( 0, 0, 6, "layout2"); 

    m_radioButtonAsc = new TQRadioButton( m_groupSortOrder, "m_radioButtonAsc" );
    m_radioButtonAsc->setChecked( true );
    layout2->addWidget( m_radioButtonAsc );

    m_radioButtonDesc = new TQRadioButton( m_groupSortOrder, "m_radioButtonDesc" );
    layout2->addWidget( m_radioButtonDesc );
    m_groupSortOrderLayout->addLayout( layout2 );

    sortdialoglayoutLayout->addWidget( m_groupSortOrder, 0, 0 );

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

    layout4 = new TQVBoxLayout( 0, 0, 6, "layout4"); 

    m_checkBoxCase = new TQCheckBox( m_groupAdvanced, "m_checkBoxCase" );
    layout4->addWidget( m_checkBoxCase );

    m_checkBoxUnique = new TQCheckBox( m_groupAdvanced, "m_checkBoxUnique" );
    layout4->addWidget( m_checkBoxUnique );

    m_checkBoxByCol = new TQCheckBox( m_groupAdvanced, "m_checkBoxByCol" );
    layout4->addWidget( m_checkBoxByCol );

    m_groupAdvancedLayout->addLayout( layout4, 0, 0 );

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

    m_textLabelStartCol = new TQLabel( m_groupAdvanced, "m_textLabelStartCol" );
    layout5->addWidget( m_textLabelStartCol );
    spacer2 = new TQSpacerItem( 30, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout5->addItem( spacer2 );

    m_lineEditStartCol = new TQLineEdit( m_groupAdvanced, "m_lineEditStartCol" );
    m_lineEditStartCol->setEnabled( false );
    m_lineEditStartCol->setMaxLength( 7 );
    layout5->addWidget( m_lineEditStartCol );

    m_groupAdvancedLayout->addMultiCellLayout( layout5, 1, 1, 0, 1 );

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

    m_textLabelEndCol = new TQLabel( m_groupAdvanced, "m_textLabelEndCol" );
    layout6->addWidget( m_textLabelEndCol );
    spacer3 = new TQSpacerItem( 31, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer3 );

    m_lineEditEndCol = new TQLineEdit( m_groupAdvanced, "m_lineEditEndCol" );
    m_lineEditEndCol->setEnabled( false );
    m_lineEditEndCol->setMaxLength( 7 );
    layout6->addWidget( m_lineEditEndCol );

    m_groupAdvancedLayout->addMultiCellLayout( layout6, 2, 2, 0, 1 );
    spacer6 = new TQSpacerItem( 130, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_groupAdvancedLayout->addItem( spacer6, 0, 1 );

    sortdialoglayoutLayout->addMultiCellWidget( m_groupAdvanced, 0, 1, 1, 1 );

    m_groupSortType = new TQButtonGroup( this, "m_groupSortType" );
    m_groupSortType->setColumnLayout(0, TQt::Vertical );
    m_groupSortType->layout()->setSpacing( 6 );
    m_groupSortType->layout()->setMargin( 11 );
    m_groupSortTypeLayout = new TQHBoxLayout( m_groupSortType->layout() );
    m_groupSortTypeLayout->setAlignment( TQt::AlignTop );

    layout3 = new TQVBoxLayout( 0, 0, 6, "layout3"); 

    m_radioButtonAlphaSort = new TQRadioButton( m_groupSortType, "m_radioButtonAlphaSort" );
    m_radioButtonAlphaSort->setChecked( true );
    layout3->addWidget( m_radioButtonAlphaSort );

    m_radioButtonNumSort = new TQRadioButton( m_groupSortType, "m_radioButtonNumSort" );
    layout3->addWidget( m_radioButtonNumSort );
    m_groupSortTypeLayout->addLayout( layout3 );

    sortdialoglayoutLayout->addWidget( m_groupSortType, 1, 0 );
    languageChange();
    resize( TQSize(426, 224).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( m_checkBoxByCol, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( toggledCol() ) );
    connect( m_radioButtonAlphaSort, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( toggledType() ) );

    // buddies
    m_textLabelEndCol->setBuddy( m_lineEditEndCol );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void sortdialoglayout::languageChange()
{
    setCaption( tr2i18n( "Sort" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    m_groupSortOrder->setTitle( tr2i18n( "Sort order" ) );
    m_radioButtonAsc->setText( tr2i18n( "&Ascending" ) );
    m_radioButtonDesc->setText( tr2i18n( "&Descending" ) );
    m_groupAdvanced->setTitle( tr2i18n( "Advanced" ) );
    m_checkBoxCase->setText( tr2i18n( "&Case sensitive" ) );
    m_checkBoxUnique->setText( tr2i18n( "Uni&que" ) );
    m_checkBoxByCol->setText( tr2i18n( "B&y column" ) );
    m_textLabelStartCol->setText( tr2i18n( "Starting at:" ) );
    m_lineEditStartCol->setInputMask( TQString::null );
    m_textLabelEndCol->setText( tr2i18n( "Ending at:" ) );
    m_lineEditEndCol->setInputMask( TQString::null );
    m_groupSortType->setTitle( tr2i18n( "Sort type" ) );
    m_radioButtonAlphaSort->setText( tr2i18n( "Alpha&betical" ) );
    m_radioButtonNumSort->setText( tr2i18n( "Nu&meric" ) );
}

void sortdialoglayout::toggledCol()
{
    tqWarning( "sortdialoglayout::toggledCol(): Not implemented yet" );
}

void sortdialoglayout::toggledType()
{
    tqWarning( "sortdialoglayout::toggledType(): Not implemented yet" );
}

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

TQMetaObject *sortdialoglayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_sortdialoglayout( "sortdialoglayout", &sortdialoglayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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