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

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

#include "nonKDEButtonSettings.h"

#include <ntqvariant.h>
#include <kicondialog.h>
#include <kurlrequester.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a NonKDEButtonSettings as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
NonKDEButtonSettings::NonKDEButtonSettings( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "NonKDEButtonSettings" );
    NonKDEButtonSettingsLayout = new TQGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "NonKDEButtonSettingsLayout"); 

    m_exec = new KURLRequester( this, "m_exec" );

    NonKDEButtonSettingsLayout->addMultiCellWidget( m_exec, 7, 7, 0, 1 );

    textLabel3 = new TQLabel( this, "textLabel3" );

    NonKDEButtonSettingsLayout->addMultiCellWidget( textLabel3, 8, 8, 0, 1 );

    m_inTerm = new TQCheckBox( this, "m_inTerm" );

    NonKDEButtonSettingsLayout->addMultiCellWidget( m_inTerm, 10, 10, 0, 1 );

    m_commandLine = new TQLineEdit( this, "m_commandLine" );

    NonKDEButtonSettingsLayout->addMultiCellWidget( m_commandLine, 9, 9, 0, 1 );

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

    NonKDEButtonSettingsLayout->addWidget( textLabel2, 6, 0 );

    m_title = new TQLineEdit( this, "m_title" );
    m_title->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 15, 0, m_title->sizePolicy().hasHeightForWidth() ) );

    NonKDEButtonSettingsLayout->addWidget( m_title, 1, 1 );

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

    NonKDEButtonSettingsLayout->addWidget( textLabel1, 0, 1 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    NonKDEButtonSettingsLayout->addItem( spacer1, 11, 1 );

    m_icon = new TDEIconButton( this, "m_icon" );
    m_icon->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_icon->sizePolicy().hasHeightForWidth() ) );
    m_icon->setMinimumSize( TQSize( 58, 58 ) );
    m_icon->setMaximumSize( TQSize( 58, 58 ) );
    m_icon->setIconSize( 48 );

    NonKDEButtonSettingsLayout->addMultiCellWidget( m_icon, 0, 2, 0, 0 );

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

    NonKDEButtonSettingsLayout->addWidget( textLabel4, 4, 0 );

    m_description = new TQLineEdit( this, "m_description" );
    m_description->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 15, 0, m_description->sizePolicy().hasHeightForWidth() ) );

    NonKDEButtonSettingsLayout->addMultiCellWidget( m_description, 5, 5, 0, 1 );
    spacer1_2 = new TQSpacerItem( 20, 8, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    NonKDEButtonSettingsLayout->addItem( spacer1_2, 2, 1 );
    languageChange();
    resize( TQSize(436, 225).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_icon, m_title );
    setTabOrder( m_title, m_description );
    setTabOrder( m_description, m_exec );
    setTabOrder( m_exec, m_commandLine );
    setTabOrder( m_commandLine, m_inTerm );

    // buddies
    textLabel3->setBuddy( m_commandLine );
    textLabel2->setBuddy( m_exec );
    textLabel1->setBuddy( m_title );
    textLabel4->setBuddy( m_description );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void NonKDEButtonSettings::languageChange()
{
    setCaption( TQString::null );
    TQWhatsThis::add( m_exec, tr2i18n( "Enter the name of the executable file to be run when this button is selected. If it is not in your $PATH then you will need to provide an absolute path." ) );
    textLabel3->setText( tr2i18n( "Co&mmand line arguments (optional):" ) );
    TQWhatsThis::add( textLabel3, tr2i18n( "Enter any command line options that should be passed to the command here.\n"
"\n"
"<i>Example</i>: For the command `rm -rf` enter \"-rf\" in this text box." ) );
    m_inTerm->setText( tr2i18n( "Run in a &terminal window" ) );
    TQWhatsThis::add( m_inTerm, tr2i18n( "Select this option if the command is a command line application and you wish to be able to see its output when run." ) );
    TQWhatsThis::add( m_commandLine, tr2i18n( "Enter any command line options that should be passed to the command here.\n"
"\n"
"<i>Example</i>: For the command `rm -rf` enter \"-rf\" in this text box." ) );
    textLabel2->setText( tr2i18n( "&Executable:" ) );
    TQWhatsThis::add( textLabel2, tr2i18n( "Enter the name of the executable file to be run when this button is selected. If it is not in your $PATH then you will need to provide an absolute path." ) );
    TQWhatsThis::add( m_title, tr2i18n( "Enter the name you would like to appear for this button here." ) );
    textLabel1->setText( tr2i18n( "&Button title:" ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "Enter the name you would like to appear for this button here." ) );
    m_icon->setText( TQString::null );
    textLabel4->setText( tr2i18n( "&Description:" ) );
    TQWhatsThis::add( textLabel4, tr2i18n( "Enter the name you would like to appear for this button here." ) );
    TQWhatsThis::add( m_description, tr2i18n( "Enter the name you would like to appear for this button here." ) );
}

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

TQMetaObject *NonKDEButtonSettings::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_NonKDEButtonSettings( "NonKDEButtonSettings", &NonKDEButtonSettings::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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