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

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

#include "addicondlgbase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqframe.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    type_label = new TQLabel( this, "type_label" );
    TQFont type_label_font(  type_label->font() );
    type_label->setFont( type_label_font ); 
    type_label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    add_icon_dialogLayout->addWidget( type_label, 0, 0 );

    size_label = new TQLabel( this, "size_label" );
    TQFont size_label_font(  size_label->font() );
    size_label->setFont( size_label_font ); 
    size_label->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    add_icon_dialogLayout->addWidget( size_label, 1, 0 );

    size_combo = new TQComboBox( false, this, "size_combo" );

    add_icon_dialogLayout->addWidget( size_combo, 1, 1 );

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

    add_icon_dialogLayout->addWidget( filename_label, 4, 0 );

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

    add_icon_dialogLayout->addWidget( name_label, 2, 0 );

    Line1 = new TQFrame( this, "Line1" );
    Line1->setFrameShape( TQFrame::HLine );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );

    add_icon_dialogLayout->addMultiCellWidget( Line1, 5, 5, 0, 1 );

    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_icon_dialogLayout->addMultiCellLayout( Layout1, 6, 6, 0, 1 );

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

    add_icon_dialogLayout->addWidget( name_edit, 2, 1 );

    type_combo = new TQComboBox( false, this, "type_combo" );

    add_icon_dialogLayout->addWidget( type_combo, 0, 1 );

    filename_edit = new TQLabel( this, "filename_edit" );
    filename_edit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, filename_edit->sizePolicy().hasHeightForWidth() ) );
    filename_edit->setFrameShape( TQLabel::StyledPanel );
    filename_edit->setFrameShadow( TQLabel::Sunken );

    add_icon_dialogLayout->addWidget( filename_edit, 4, 1 );
    Spacer22 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    add_icon_dialogLayout->addItem( Spacer22, 3, 1 );
    languageChange();
    resize( TQSize(301, 218).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( okbutton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( cancelbutton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( name_edit, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( somethingChanged() ) );
    connect( type_combo, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( somethingChanged() ) );
    connect( size_combo, TQ_SIGNAL( activated(int) ), this, TQ_SLOT( somethingChanged() ) );

    // tab order
    setTabOrder( type_combo, size_combo );
    setTabOrder( size_combo, name_edit );
    setTabOrder( name_edit, okbutton );
    setTabOrder( okbutton, cancelbutton );

    // buddies
    type_label->setBuddy( type_combo );
    size_label->setBuddy( size_combo );
    filename_label->setBuddy( filename_edit );
    name_label->setBuddy( name_edit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AddIconDialogBase::languageChange()
{
    setCaption( tr2i18n( "Add New Icon" ) );
    type_label->setText( tr2i18n( "&Type:" ) );
    size_label->setText( tr2i18n( "&Size:" ) );
    filename_label->setText( tr2i18n( "File name:" ) );
    name_label->setText( tr2i18n( "&Name:" ) );
    okbutton->setText( tr2i18n( "&OK" ) );
    cancelbutton->setText( tr2i18n( "&Cancel" ) );
    name_edit->setText( tr2i18n( "unknown" ) );
}

void AddIconDialogBase::somethingChanged()
{
    tqWarning( "AddIconDialogBase::somethingChanged(): Not implemented yet" );
}

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

TQMetaObject *AddIconDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AddIconDialogBase( "AddIconDialogBase", &AddIconDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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