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

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

#include "appProp.h"

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

/*
 *  Constructs a appProp 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.
 */
appProp::appProp( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "appProp" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 0, 0 ) );
    setMaximumSize( TQSize( 32767, 32767 ) );
    setSizeGripEnabled( true );
    setModal( true );
    appPropLayout = new TQGridLayout( this, 1, 1, 11, 6, "appPropLayout"); 

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

    appPropLayout->addWidget( buttonCancel, 2, 2 );

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

    appPropLayout->addWidget( buttonOk, 2, 1 );
    Horizontal_Spacing2 = new TQSpacerItem( 250, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    appPropLayout->addItem( Horizontal_Spacing2, 2, 0 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    terminal = new TQCheckBox( groupBox1, "terminal" );

    groupBox1Layout->addWidget( terminal, 0, 0 );

    cuser = new TQCheckBox( groupBox1, "cuser" );

    groupBox1Layout->addWidget( cuser, 1, 0 );

    tclose = new TQCheckBox( groupBox1, "tclose" );

    groupBox1Layout->addWidget( tclose, 0, 1 );

    user = new TQLineEdit( groupBox1, "user" );

    groupBox1Layout->addWidget( user, 1, 1 );

    appPropLayout->addMultiCellWidget( groupBox1, 1, 1, 0, 2 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, groupBox2->sizePolicy().hasHeightForWidth() ) );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQGridLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

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

    groupBox2Layout->addMultiCellWidget( textLabel3, 0, 0, 0, 1 );

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

    groupBox2Layout->addWidget( textLabel1, 2, 0 );

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

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

    cmdfile = new TQPushButton( groupBox2, "cmdfile" );

    groupBox2Layout->addWidget( cmdfile, 2, 2 );

    iconbutton = new TDEIconButton( groupBox2, "iconbutton" );

    groupBox2Layout->addMultiCellWidget( iconbutton, 0, 1, 2, 2 );

    cmdname = new TQLineEdit( groupBox2, "cmdname" );

    groupBox2Layout->addWidget( cmdname, 1, 1 );

    cmdpath = new TQLineEdit( groupBox2, "cmdpath" );

    groupBox2Layout->addWidget( cmdpath, 2, 1 );

    appPropLayout->addMultiCellWidget( groupBox2, 0, 0, 0, 2 );
    languageChange();
    resize( TQSize(421, 259).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( cuser, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( cuserchk() ) );
    connect( terminal, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( terminalchk() ) );
    connect( cmdfile, TQ_SIGNAL( clicked() ), this, TQ_SLOT( cmdfile_clicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void appProp::languageChange()
{
    setCaption( tr2i18n( "Launcher Properties" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    buttonOk->setText( tr2i18n( "&Add" ) );
    groupBox1->setTitle( tr2i18n( "Advanced Options" ) );
    terminal->setText( tr2i18n( "Run From Terminal" ) );
    cuser->setText( tr2i18n( "Run as different User" ) );
    tclose->setText( tr2i18n( "Keep terminal open after exit" ) );
    groupBox2->setTitle( tr2i18n( "Minimal Options" ) );
    textLabel3->setText( tr2i18n( "Don't forget to chose an icon." ) );
    textLabel1->setText( tr2i18n( "<b>Command</b>" ) );
    textLabel2->setText( tr2i18n( "<b>Name</b>" ) );
    cmdfile->setText( tr2i18n( "&Browse" ) );
    iconbutton->setText( tr2i18n( "Icon" ) );
}

void appProp::cuserchk(bool)
{
    tqWarning( "appProp::cuserchk(bool): Not implemented yet" );
}

void appProp::cuserchk()
{
    tqWarning( "appProp::cuserchk(): Not implemented yet" );
}

void appProp::terminalchk()
{
    tqWarning( "appProp::terminalchk(): Not implemented yet" );
}

void appProp::cmdfile_clicked()
{
    tqWarning( "appProp::cmdfile_clicked(): Not implemented yet" );
}

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

TQMetaObject *appProp::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_appProp( "appProp", &appProp::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* appProp::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 TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"cuserchk", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"cuserchk", 0, 0 };
    static const TQUMethod slot_2 = {"terminalchk", 0, 0 };
    static const TQUMethod slot_3 = {"cmdfile_clicked", 0, 0 };
    static const TQUMethod slot_4 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "cuserchk(bool)", &slot_0, TQMetaData::Public },
	{ "cuserchk()", &slot_1, TQMetaData::Public },
	{ "terminalchk()", &slot_2, TQMetaData::Public },
	{ "cmdfile_clicked()", &slot_3, TQMetaData::Public },
	{ "languageChange()", &slot_4, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"appProp", parentObject,
	slot_tbl, 5,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_appProp.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool appProp::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: cuserchk((bool)static_QUType_bool.get(_o+1)); break;
    case 1: cuserchk(); break;
    case 2: terminalchk(); break;
    case 3: cmdfile_clicked(); break;
    case 4: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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