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

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

#include "editmodebase.h"

#include <ntqvariant.h>
#include <kicondialog.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include <ntqimage.h>
#include <ntqpixmap.h>

static const char* const image0_data[] = { 
"16 16 17 1",
". c None",
"# c #000000",
"o c #181818",
"n c #313031",
"m c #414041",
"l c #5a5d5a",
"k c #6a696a",
"h c #8b898b",
"j c #949594",
"g c #9c959c",
"d c #b4b6b4",
"e c #bdb6bd",
"c c #bdbabd",
"b c #bdbebd",
"a c #c5bec5",
"f c #d5d2d5",
"i c #ffffff",
"................",
".....###########",
"....############",
"...##abcdaecbf##",
"..##ghiihjhiih##",
".##kkliiiliiil##",
"##mmmmniiiiinm##",
"#oooooo#iii#oo##",
"i######iiiii####",
".i####iii#iii###",
"..i###ii###ii###",
"...i############",
"....i###########",
".....iiiiiiiiii#",
"................",
"................"};


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

    textLabel1 = new TQLabel( this, "textLabel1" );
    EditModeBaseLayout->addWidget( textLabel1 );

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

    layout25 = new TQGridLayout( 0, 1, 1, 0, 6, "layout25"); 

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

    layout25->addWidget( textLabel4, 1, 0 );

    layout24 = new TQHBoxLayout( 0, 0, 6, "layout24"); 
    spacer11 = new TQSpacerItem( 110, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout24->addItem( spacer11 );

    theIcon = new TDEIconButton( this, "theIcon" );
    theIcon->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, theIcon->sizePolicy().hasHeightForWidth() ) );
    layout24->addWidget( theIcon );

    kPushButton9 = new KPushButton( this, "kPushButton9" );
    kPushButton9->setPixmap( image0 );
    layout24->addWidget( kPushButton9 );

    layout25->addLayout( layout24, 1, 1 );

    theName = new TQLineEdit( this, "theName" );
    theName->setEnabled( false );

    layout25->addWidget( theName, 0, 1 );

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

    layout25->addWidget( textLabel5, 0, 0 );
    EditModeBaseLayout->addLayout( layout25 );
    spacer4 = new TQSpacerItem( 410, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    EditModeBaseLayout->addItem( spacer4 );

    textLabel2 = new TQLabel( this, "textLabel2" );
    EditModeBaseLayout->addWidget( textLabel2 );

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

    theDefault = new TQCheckBox( this, "theDefault" );
    EditModeBaseLayout->addWidget( theDefault );
    spacer9 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    EditModeBaseLayout->addItem( spacer9 );

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

    layout15 = new TQHBoxLayout( 0, 0, 6, "layout15"); 
    spacer10 = new TQSpacerItem( 231, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout15->addItem( spacer10 );

    theOK = new KPushButton( this, "theOK" );
    layout15->addWidget( theOK );

    kPushButton8 = new KPushButton( this, "kPushButton8" );
    layout15->addWidget( kPushButton8 );
    EditModeBaseLayout->addLayout( layout15 );
    languageChange();
    resize( TQSize(461, 334).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( theName, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( slotCheckText(const TQString&) ) );
    connect( theOK, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( kPushButton8, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( kPushButton9, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotClearIcon() ) );

    // buddies
    textLabel4->setBuddy( theIcon );
    textLabel5->setBuddy( theName );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EditModeBase::languageChange()
{
    setCaption( tr2i18n( "Edit Mode" ) );
    textLabel1->setText( tr2i18n( "<b>Description</b>" ) );
    textLabel4->setText( tr2i18n( "&Icon for system tray:" ) );
    theIcon->setText( TQString::null );
    kPushButton9->setText( TQString::null );
    textLabel5->setText( tr2i18n( "&Mode name:" ) );
    textLabel2->setText( tr2i18n( "<b>Behavior</b>" ) );
    theDefault->setText( tr2i18n( "Mo&de is the default for its remote control" ) );
    theOK->setText( tr2i18n( "&OK" ) );
    kPushButton8->setText( tr2i18n( "&Cancel" ) );
}

void EditModeBase::slotCheckText(const TQString&)
{
    tqWarning( "EditModeBase::slotCheckText(const TQString&): Not implemented yet" );
}

void EditModeBase::slotClearIcon()
{
    tqWarning( "EditModeBase::slotClearIcon(): Not implemented yet" );
}

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

TQMetaObject *EditModeBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EditModeBase( "EditModeBase", &EditModeBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* EditModeBase::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_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"slotCheckText", 1, param_slot_0 };
    static const TQUMethod slot_1 = {"slotClearIcon", 0, 0 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotCheckText(const TQString&)", &slot_0, TQMetaData::Public },
	{ "slotClearIcon()", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"EditModeBase", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_EditModeBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool EditModeBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotCheckText((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 1: slotClearIcon(); break;
    case 2: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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