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

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

#include "addapplicationdlgbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqlabel.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a AddApplicationDialogBase 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.
 */
AddApplicationDialogBase::AddApplicationDialogBase( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "add_application_dialog" );
    setSizeGripEnabled( false );
    add_application_dialogLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "add_application_dialogLayout"); 

    GroupBox7 = new TQGroupBox( this, "GroupBox7" );
    GroupBox7->setColumnLayout(0, TQt::Vertical );
    GroupBox7->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox7->layout()->setMargin( KDialog::marginHint() );
    GroupBox7Layout = new TQGridLayout( GroupBox7->layout() );
    GroupBox7Layout->setAlignment( TQt::AlignTop );

    terminal_box = new TQCheckBox( GroupBox7, "terminal_box" );

    GroupBox7Layout->addWidget( terminal_box, 2, 1 );

    comment_edit = new KLineEdit( GroupBox7, "comment_edit" );

    GroupBox7Layout->addMultiCellWidget( comment_edit, 3, 3, 1, 3 );

    filename_edit = new KLineEdit( GroupBox7, "filename_edit" );

    GroupBox7Layout->addWidget( filename_edit, 0, 1 );

    Layout2 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout2"); 

    icon_button = new TQPushButton( GroupBox7, "icon_button" );
    icon_button->setMaximumSize( TQSize( 24, 24 ) );
    icon_button->setAutoDefault( false );
    Layout2->addWidget( icon_button );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer1 );

    GroupBox7Layout->addLayout( Layout2, 1, 3 );

    executable_combo = new TQComboBox( false, GroupBox7, "executable_combo" );
    executable_combo->setEditable( true );

    GroupBox7Layout->addWidget( executable_combo, 0, 3 );

    name_edit = new KLineEdit( GroupBox7, "name_edit" );

    GroupBox7Layout->addWidget( name_edit, 1, 1 );

    section_combo = new TQComboBox( false, GroupBox7, "section_combo" );

    GroupBox7Layout->addWidget( section_combo, 2, 3 );

    name_label_2 = new TQLabel( GroupBox7, "name_label_2" );
    TQFont name_label_2_font(  name_label_2->font() );
    name_label_2->setFont( name_label_2_font ); 
    name_label_2->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    GroupBox7Layout->addWidget( name_label_2, 0, 2 );

    icon_label = new TQLabel( GroupBox7, "icon_label" );
    TQFont icon_label_font(  icon_label->font() );
    icon_label->setFont( icon_label_font ); 
    icon_label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    GroupBox7Layout->addWidget( icon_label, 1, 2 );

    section_label = new TQLabel( GroupBox7, "section_label" );
    TQFont section_label_font(  section_label->font() );
    section_label->setFont( section_label_font ); 
    section_label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    GroupBox7Layout->addWidget( section_label, 2, 2 );

    filename_label = new TQLabel( GroupBox7, "filename_label" );
    TQFont filename_label_font(  filename_label->font() );
    filename_label->setFont( filename_label_font ); 
    filename_label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    GroupBox7Layout->addWidget( filename_label, 0, 0 );

    name_label = new TQLabel( GroupBox7, "name_label" );
    TQFont name_label_font(  name_label->font() );
    name_label->setFont( name_label_font ); 
    name_label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    GroupBox7Layout->addWidget( name_label, 1, 0 );

    comment_label = new TQLabel( GroupBox7, "comment_label" );
    TQFont comment_label_font(  comment_label->font() );
    comment_label->setFont( comment_label_font ); 
    comment_label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    GroupBox7Layout->addWidget( comment_label, 3, 0 );
    add_application_dialogLayout->addWidget( GroupBox7 );
    Spacer11 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    add_application_dialogLayout->addItem( Spacer11 );

    GroupBox6 = new TQGroupBox( this, "GroupBox6" );
    GroupBox6->setColumnLayout(0, TQt::Vertical );
    GroupBox6->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox6->layout()->setMargin( KDialog::marginHint() );
    GroupBox6Layout = new TQHBoxLayout( GroupBox6->layout() );
    GroupBox6Layout->setAlignment( TQt::AlignTop );

    Layout5 = new TQHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout5"); 

    chosentypes_listview = new TQListView( GroupBox6, "chosentypes_listview" );
    chosentypes_listview->addColumn( TQString::null );
    chosentypes_listview->setResizeMode( TQListView::LastColumn );
    Layout5->addWidget( chosentypes_listview );

    Layout3 = new TQVBoxLayout( 0, 0, KDialog::spacingHint(), "Layout3"); 
    Spacer4 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Layout3->addItem( Spacer4 );

    add_button = new TQPushButton( GroupBox6, "add_button" );
    Layout3->addWidget( add_button );

    remove_button = new TQPushButton( GroupBox6, "remove_button" );
    Layout3->addWidget( remove_button );
    Spacer5 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Layout3->addItem( Spacer5 );
    Layout5->addLayout( Layout3 );

    availtypes_listview = new TQListView( GroupBox6, "availtypes_listview" );
    availtypes_listview->addColumn( TQString::null );
    availtypes_listview->setResizeMode( TQListView::LastColumn );
    Layout5->addWidget( availtypes_listview );
    GroupBox6Layout->addLayout( Layout5 );
    add_application_dialogLayout->addWidget( GroupBox6 );

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

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

    cancelbutton = new TQPushButton( this, "cancelbutton" );
    cancelbutton->setAutoDefault( true );
    Layout1->addWidget( cancelbutton );
    add_application_dialogLayout->addLayout( Layout1 );
    languageChange();
    resize( TQSize(586, 425).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelbutton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( okbutton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( icon_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( iconClicked() ) );
    connect( add_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addTypeClicked() ) );
    connect( remove_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeTypeClicked() ) );

    // tab order
    setTabOrder( filename_edit, executable_combo );
    setTabOrder( executable_combo, name_edit );
    setTabOrder( name_edit, icon_button );
    setTabOrder( icon_button, terminal_box );
    setTabOrder( terminal_box, section_combo );
    setTabOrder( section_combo, comment_edit );
    setTabOrder( comment_edit, chosentypes_listview );
    setTabOrder( chosentypes_listview, add_button );
    setTabOrder( add_button, remove_button );
    setTabOrder( remove_button, availtypes_listview );
    setTabOrder( availtypes_listview, okbutton );
    setTabOrder( okbutton, cancelbutton );

    // buddies
    name_label_2->setBuddy( executable_combo );
    icon_label->setBuddy( icon_button );
    section_label->setBuddy( section_combo );
    filename_label->setBuddy( filename_edit );
    name_label->setBuddy( name_edit );
    comment_label->setBuddy( comment_edit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AddApplicationDialogBase::languageChange()
{
    setCaption( tr2i18n( "Add New Application .desktop File" ) );
    GroupBox7->setTitle( tr2i18n( "&Application File" ) );
    terminal_box->setText( tr2i18n( "Start in t&erminal" ) );
    icon_button->setText( TQString::null );
    section_combo->clear();
    section_combo->insertItem( tr2i18n( "Application" ) );
    section_combo->insertItem( tr2i18n( "Games" ) );
    section_combo->insertItem( tr2i18n( "Development" ) );
    section_combo->insertItem( tr2i18n( "Editors" ) );
    section_combo->insertItem( tr2i18n( "Graphics" ) );
    section_combo->insertItem( tr2i18n( "Internet" ) );
    section_combo->insertItem( tr2i18n( "Multimedia" ) );
    section_combo->insertItem( tr2i18n( "Office" ) );
    section_combo->insertItem( tr2i18n( "Settings" ) );
    section_combo->insertItem( tr2i18n( "System" ) );
    section_combo->insertItem( tr2i18n( "Toys" ) );
    section_combo->insertItem( tr2i18n( "Utilities" ) );
    section_combo->insertItem( tr2i18n( "WordProcessing" ) );
    name_label_2->setText( tr2i18n( "E&xecutable:" ) );
    icon_label->setText( tr2i18n( "&Icon:" ) );
    section_label->setText( tr2i18n( "&Section:" ) );
    filename_label->setText( tr2i18n( "&File name:" ) );
    name_label->setText( tr2i18n( "&Name:" ) );
    comment_label->setText( tr2i18n( "Co&mment:" ) );
    GroupBox6->setTitle( tr2i18n( "Mime &Types" ) );
    chosentypes_listview->header()->setLabel( 0, TQString::null );
    add_button->setText( tr2i18n( "<-" ) );
    remove_button->setText( tr2i18n( "->" ) );
    availtypes_listview->header()->setLabel( 0, TQString::null );
    okbutton->setText( tr2i18n( "&OK" ) );
    cancelbutton->setText( tr2i18n( "&Cancel" ) );
}

void AddApplicationDialogBase::addTypeClicked()
{
    tqWarning( "AddApplicationDialogBase::addTypeClicked(): Not implemented yet" );
}

void AddApplicationDialogBase::iconClicked()
{
    tqWarning( "AddApplicationDialogBase::iconClicked(): Not implemented yet" );
}

void AddApplicationDialogBase::removeTypeClicked()
{
    tqWarning( "AddApplicationDialogBase::removeTypeClicked(): Not implemented yet" );
}

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

TQMetaObject *AddApplicationDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AddApplicationDialogBase( "AddApplicationDialogBase", &AddApplicationDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool AddApplicationDialogBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: addTypeClicked(); break;
    case 2: iconClicked(); break;
    case 3: removeTypeClicked(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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