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

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

#include "kcmlircbase.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqlabel.h>
#include <ntqsplitter.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "kcmlircbase.ui.h"

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

    tabWidget2 = new TQTabWidget( this, "tabWidget2" );
    tabWidget2->setMargin( 0 );

    tab = new TQWidget( tabWidget2, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    theMainLabel = new TQLabel( tab, "theMainLabel" );
    theMainLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, theMainLabel->sizePolicy().hasHeightForWidth() ) );
    theMainLabel->setPaletteForegroundColor( TQColor( 138, 0, 0 ) );
    TQFont theMainLabel_font(  theMainLabel->font() );
    theMainLabel_font.setBold( true );
    theMainLabel->setFont( theMainLabel_font ); 
    theMainLabel->setFrameShape( TQLabel::NoFrame );
    theMainLabel->setMargin( 1 );
    theMainLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );
    tabLayout->addWidget( theMainLabel );

    splitter4 = new TQSplitter( tab, "splitter4" );
    splitter4->setOrientation( TQSplitter::Horizontal );

    TQWidget* privateLayoutWidget = new TQWidget( splitter4, "modeLayout" );
    modeLayout = new TQVBoxLayout( privateLayoutWidget, 0, 6, "modeLayout"); 

    theRemotesLabel = new TQLabel( privateLayoutWidget, "theRemotesLabel" );
    modeLayout->addWidget( theRemotesLabel );

    theModes = new TDEListView( privateLayoutWidget, "theModes" );
    theModes->addColumn( tr2i18n( "New Column" ) );
    theModes->addColumn( tr2i18n( "New Column" ) );
    theModes->setAcceptDrops( true );
    theModes->setRootIsDecorated( true );
    theModes->setItemsRenameable( true );
    modeLayout->addWidget( theModes );

    modeButtonLayout = new TQHBoxLayout( 0, 0, 6, "modeButtonLayout"); 
    spacer6 = new TQSpacerItem( 17, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    modeButtonLayout->addItem( spacer6 );

    theAddMode = new KPushButton( privateLayoutWidget, "theAddMode" );
    theAddMode->setEnabled( false );
    modeButtonLayout->addWidget( theAddMode );

    theEditMode = new KPushButton( privateLayoutWidget, "theEditMode" );
    theEditMode->setEnabled( false );
    modeButtonLayout->addWidget( theEditMode );

    theRemoveMode = new KPushButton( privateLayoutWidget, "theRemoveMode" );
    theRemoveMode->setEnabled( false );
    modeButtonLayout->addWidget( theRemoveMode );
    modeLayout->addLayout( modeButtonLayout );

    TQWidget* privateLayoutWidget_2 = new TQWidget( splitter4, "layout9" );
    layout9 = new TQVBoxLayout( privateLayoutWidget_2, 0, 6, "layout9"); 

    theModeLabel = new TQLabel( privateLayoutWidget_2, "theModeLabel" );
    layout9->addWidget( theModeLabel );

    theActions = new TDEListView( privateLayoutWidget_2, "theActions" );
    theActions->addColumn( tr2i18n( "Button" ) );
    theActions->addColumn( tr2i18n( "Program" ) );
    theActions->addColumn( tr2i18n( "Function" ) );
    theActions->addColumn( tr2i18n( "Options" ) );
    theActions->addColumn( tr2i18n( "Notes" ) );
    theActions->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 2, 0, theActions->sizePolicy().hasHeightForWidth() ) );
    theActions->setDragAutoScroll( true );
    theActions->setProperty( "selectionMode", "FileManager" );
    theActions->setDragEnabled( true );
    layout9->addWidget( theActions );

    layout7 = new TQHBoxLayout( 0, 0, 6, "layout7"); 
    spacer1 = new TQSpacerItem( 240, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( spacer1 );

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

    theAddActions = new KPushButton( privateLayoutWidget_2, "theAddActions" );
    theAddActions->setEnabled( false );

    layout6->addMultiCellWidget( theAddActions, 0, 0, 0, 2 );

    theAddAction = new KPushButton( privateLayoutWidget_2, "theAddAction" );
    theAddAction->setEnabled( false );

    layout6->addWidget( theAddAction, 1, 0 );

    theEditAction = new TQPushButton( privateLayoutWidget_2, "theEditAction" );
    theEditAction->setEnabled( false );

    layout6->addWidget( theEditAction, 1, 1 );

    theRemoveAction = new KPushButton( privateLayoutWidget_2, "theRemoveAction" );
    theRemoveAction->setEnabled( false );

    layout6->addWidget( theRemoveAction, 1, 2 );
    layout7->addLayout( layout6 );
    layout9->addLayout( layout7 );
    tabLayout->addWidget( splitter4 );
    tabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget2, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

    splitter5 = new TQSplitter( tab_2, "splitter5" );
    splitter5->setOrientation( TQSplitter::Horizontal );

    theExtensions = new TDEListView( splitter5, "theExtensions" );
    theExtensions->addColumn( tr2i18n( "Name" ) );
    theExtensions->setRootIsDecorated( true );
    theExtensions->setFullWidth( true );

    TQWidget* privateLayoutWidget_3 = new TQWidget( splitter5, "layout9" );
    layout9_2 = new TQVBoxLayout( privateLayoutWidget_3, 0, 6, "layout9_2"); 

    theInformationLabel = new TQLabel( privateLayoutWidget_3, "theInformationLabel" );
    layout9_2->addWidget( theInformationLabel );

    theInformation = new TDEListView( privateLayoutWidget_3, "theInformation" );
    theInformation->addColumn( tr2i18n( "Name" ) );
    theInformation->addColumn( tr2i18n( "Information" ) );
    theInformation->setFullWidth( true );
    layout9_2->addWidget( theInformation );

    tabLayout_2->addWidget( splitter5, 0, 0 );
    tabWidget2->insertTab( tab_2, TQString::fromLatin1("") );

    KCMLircBaseLayout->addWidget( tabWidget2, 0, 0 );
    languageChange();
    resize( TQSize(469, 326).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KCMLircBase::languageChange()
{
    setCaption( tr2i18n( "Linux Infrared Remote Control" ) );
    theMainLabel->setText( tr2i18n( "There are currently no remote controls available. You must first set up LIRC correctly; see www.lirc.org for more information." ) );
    theRemotesLabel->setText( tr2i18n( "Remote controls and modes:" ) );
    theModes->header()->setLabel( 0, tr2i18n( "New Column" ) );
    theModes->header()->setLabel( 1, tr2i18n( "New Column" ) );
    theAddMode->setText( tr2i18n( "&Add..." ) );
    theEditMode->setText( tr2i18n( "&Edit..." ) );
    theRemoveMode->setText( tr2i18n( "&Remove" ) );
    theModeLabel->setText( TQString::null );
    theActions->header()->setLabel( 0, tr2i18n( "Button" ) );
    theActions->header()->setLabel( 1, tr2i18n( "Program" ) );
    theActions->header()->setLabel( 2, tr2i18n( "Function" ) );
    theActions->header()->setLabel( 3, tr2i18n( "Options" ) );
    theActions->header()->setLabel( 4, tr2i18n( "Notes" ) );
    theAddActions->setText( tr2i18n( "Auto-Populate..." ) );
    theAddAction->setText( tr2i18n( "A&dd..." ) );
    theEditAction->setText( tr2i18n( "Ed&it..." ) );
    theRemoveAction->setText( tr2i18n( "Re&move" ) );
    tabWidget2->changeTab( tab, tr2i18n( "Controller Functions" ) );
    theExtensions->header()->setLabel( 0, tr2i18n( "Name" ) );
    theInformationLabel->setText( TQString::null );
    theInformation->header()->setLabel( 0, tr2i18n( "Name" ) );
    theInformation->header()->setLabel( 1, tr2i18n( "Information" ) );
    tabWidget2->changeTab( tab_2, tr2i18n( "Loaded Extensions" ) );
}

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

TQMetaObject *KCMLircBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KCMLircBase( "KCMLircBase", &KCMLircBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KCMLircBase::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(
	"KCMLircBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KCMLircBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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