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

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

#include "ktouchopenrequest_dlg.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <ksqueezedtextlabel.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    openChoiceGroup = new TQButtonGroup( this, "openChoiceGroup" );
    openChoiceGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, openChoiceGroup->sizePolicy().hasHeightForWidth() ) );
    openChoiceGroup->setColumnLayout(0, TQt::Vertical );
    openChoiceGroup->layout()->setSpacing( 6 );
    openChoiceGroup->layout()->setMargin( 11 );
    openChoiceGroupLayout = new TQGridLayout( openChoiceGroup->layout() );
    openChoiceGroupLayout->setAlignment( TQt::AlignTop );

    currentRadioBtn = new TQRadioButton( openChoiceGroup, "currentRadioBtn" );
    currentRadioBtn->setMinimumSize( TQSize( 0, 28 ) );

    openChoiceGroupLayout->addWidget( currentRadioBtn, 0, 0 );

    presetRadioBtn = new TQRadioButton( openChoiceGroup, "presetRadioBtn" );
    presetRadioBtn->setMinimumSize( TQSize( 0, 28 ) );

    openChoiceGroupLayout->addWidget( presetRadioBtn, 1, 0 );

    presetCombo = new TQComboBox( false, openChoiceGroup, "presetCombo" );

    openChoiceGroupLayout->addWidget( presetCombo, 1, 1 );

    newRadioBtn = new TQRadioButton( openChoiceGroup, "newRadioBtn" );

    openChoiceGroupLayout->addWidget( newRadioBtn, 4, 0 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    openChoiceGroupLayout->addItem( spacer1, 3, 0 );
    spacer3 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    openChoiceGroupLayout->addItem( spacer3, 5, 0 );

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

    openFileEdit = new KLineEdit( openChoiceGroup, "openFileEdit" );
    layout3->addWidget( openFileEdit );

    browseBtn = new KPushButton( openChoiceGroup, "browseBtn" );
    browseBtn->setFlat( false );
    layout3->addWidget( browseBtn );

    openChoiceGroupLayout->addLayout( layout3, 2, 1 );

    currentLabel = new KSqueezedTextLabel( openChoiceGroup, "currentLabel" );

    openChoiceGroupLayout->addWidget( currentLabel, 0, 1 );

    openFileRadioBtn = new TQRadioButton( openChoiceGroup, "openFileRadioBtn" );
    openFileRadioBtn->setMinimumSize( TQSize( 0, 28 ) );

    openChoiceGroupLayout->addWidget( openFileRadioBtn, 2, 0 );
    KTouchOpenRequestDlgLayout->addWidget( openChoiceGroup );

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 
    spacer2 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer2 );

    okBtn = new KPushButton( this, "okBtn" );
    okBtn->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, okBtn->sizePolicy().hasHeightForWidth() ) );
    okBtn->setAutoDefault( true );
    layout1->addWidget( okBtn );

    cancelBtn = new KPushButton( this, "cancelBtn" );
    layout1->addWidget( cancelBtn );
    KTouchOpenRequestDlgLayout->addLayout( layout1 );
    languageChange();
    resize( TQSize(436, 236).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( okBtnClicked() ) );
    connect( cancelBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( currentRadioBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( radioBtnChanged() ) );
    connect( presetRadioBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( radioBtnChanged() ) );
    connect( openFileRadioBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( radioBtnChanged() ) );
    connect( newRadioBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( radioBtnChanged() ) );
    connect( browseBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT( browseBtnClicked() ) );

    // tab order
    setTabOrder( currentRadioBtn, presetRadioBtn );
    setTabOrder( presetRadioBtn, presetCombo );
    setTabOrder( presetCombo, openFileRadioBtn );
    setTabOrder( openFileRadioBtn, browseBtn );
    setTabOrder( browseBtn, newRadioBtn );
    setTabOrder( newRadioBtn, okBtn );
    setTabOrder( okBtn, cancelBtn );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KTouchOpenRequestDlg::languageChange()
{
    setCaption( tr2i18n( "Open Something in Editor" ) );
    openChoiceGroup->setTitle( tr2i18n( "Select File to Open" ) );
    currentRadioBtn->setText( tr2i18n( "Current something" ) );
    presetRadioBtn->setText( tr2i18n( "Preset something:" ) );
    newRadioBtn->setText( tr2i18n( "New something" ) );
    browseBtn->setText( tr2i18n( "Browse..." ) );
    currentLabel->setText( tr2i18n( "Current something file" ) );
    openFileRadioBtn->setText( tr2i18n( "Open file:" ) );
    okBtn->setText( tr2i18n( "&OK" ) );
    cancelBtn->setText( tr2i18n( "&Cancel" ) );
}

void KTouchOpenRequestDlg::okBtnClicked()
{
    tqWarning( "KTouchOpenRequestDlg::okBtnClicked(): Not implemented yet" );
}

void KTouchOpenRequestDlg::radioBtnChanged()
{
    tqWarning( "KTouchOpenRequestDlg::radioBtnChanged(): Not implemented yet" );
}

void KTouchOpenRequestDlg::browseBtnClicked()
{
    tqWarning( "KTouchOpenRequestDlg::browseBtnClicked(): Not implemented yet" );
}

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

TQMetaObject *KTouchOpenRequestDlg::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KTouchOpenRequestDlg( "KTouchOpenRequestDlg", &KTouchOpenRequestDlg::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KTouchOpenRequestDlg::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 = {"okBtnClicked", 0, 0 };
    static const TQUMethod slot_1 = {"radioBtnChanged", 0, 0 };
    static const TQUMethod slot_2 = {"browseBtnClicked", 0, 0 };
    static const TQUMethod slot_3 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "okBtnClicked()", &slot_0, TQMetaData::Public },
	{ "radioBtnChanged()", &slot_1, TQMetaData::Public },
	{ "browseBtnClicked()", &slot_2, TQMetaData::Public },
	{ "languageChange()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KTouchOpenRequestDlg", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KTouchOpenRequestDlg.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KTouchOpenRequestDlg::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: okBtnClicked(); break;
    case 1: radioBtnChanged(); break;
    case 2: browseBtnClicked(); break;
    case 3: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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