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

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

#include "trackerviewbase.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <tdelistview.h>
#include <ntqlineedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a TrackerViewBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
TrackerViewBase::TrackerViewBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "TrackerViewBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    TrackerViewBaseLayout = new TQGridLayout( this, 1, 1, 11, 6, "TrackerViewBaseLayout"); 

    txtTracker = new TQLineEdit( this, "txtTracker" );

    TrackerViewBaseLayout->addWidget( txtTracker, 1, 0 );

    btnUpdate = new KPushButton( this, "btnUpdate" );

    TrackerViewBaseLayout->addWidget( btnUpdate, 0, 1 );

    btnAdd = new KPushButton( this, "btnAdd" );

    TrackerViewBaseLayout->addWidget( btnAdd, 1, 1 );

    layout8 = new TQVBoxLayout( 0, 0, 6, "layout8"); 

    btnRemove = new KPushButton( this, "btnRemove" );
    layout8->addWidget( btnRemove );

    btnChange = new TQPushButton( this, "btnChange" );
    layout8->addWidget( btnChange );
    spacer4_2 = new TQSpacerItem( 20, 68, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout8->addItem( spacer4_2 );

    btnRestore = new KPushButton( this, "btnRestore" );
    layout8->addWidget( btnRestore );

    TrackerViewBaseLayout->addLayout( layout8, 2, 1 );

    listTrackers = new TDEListView( this, "listTrackers" );
    listTrackers->addColumn( tr2i18n( "Trackers" ) );
    listTrackers->setResizeMode( TDEListView::AllColumns );
    listTrackers->setFullWidth( true );

    TrackerViewBaseLayout->addWidget( listTrackers, 2, 0 );

    layout6 = new TQHBoxLayout( 0, 0, 6, "layout6"); 

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( textLabel1 );

    lblCurrent = new TQLineEdit( this, "lblCurrent" );
    TQFont lblCurrent_font(  lblCurrent->font() );
    lblCurrent_font.setBold( true );
    lblCurrent->setFont( lblCurrent_font ); 
    lblCurrent->setFrameShape( TQLineEdit::NoFrame );
    lblCurrent->setFrameShadow( TQLineEdit::Plain );
    lblCurrent->setReadOnly( true );
    layout6->addWidget( lblCurrent );
    spacer5_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout6->addItem( spacer5_2 );

    textLabel3 = new TQLabel( this, "textLabel3" );
    textLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( textLabel3 );

    lblStatus = new TQLabel( this, "lblStatus" );
    lblStatus->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, lblStatus->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( lblStatus );
    spacer15 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout6->addItem( spacer15 );

    textLabel5 = new TQLabel( this, "textLabel5" );
    textLabel5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel5->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( textLabel5 );

    lblUpdate = new TQLabel( this, "lblUpdate" );
    layout6->addWidget( lblUpdate );

    TrackerViewBaseLayout->addLayout( layout6, 0, 0 );
    languageChange();
    resize( TQSize(750, 254).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( btnChange, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnChange_clicked() ) );
    connect( btnUpdate, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnUpdate_clicked() ) );
    connect( btnAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnAdd_clicked() ) );
    connect( btnRemove, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnRemove_clicked() ) );
    connect( btnRestore, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnRestore_clicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TrackerViewBase::languageChange()
{
    btnUpdate->setText( tr2i18n( "&Update Tracker" ) );
    TQToolTip::add( btnUpdate, tr2i18n( "Minimum update interval - 60 seconds" ) );
    btnAdd->setText( tr2i18n( "Add Trac&ker" ) );
    btnRemove->setText( tr2i18n( "Remove Tracker" ) );
    btnChange->setText( tr2i18n( "Ch&ange Tracker" ) );
    btnRestore->setText( tr2i18n( "Restore Defaults" ) );
    listTrackers->header()->setLabel( 0, tr2i18n( "Trackers" ) );
    textLabel1->setText( tr2i18n( "URL:" ) );
    textLabel3->setText( tr2i18n( "Status:" ) );
    lblStatus->setText( TQString::null );
    textLabel5->setText( tr2i18n( "Next update in:" ) );
    lblUpdate->setText( TQString::null );
}

void TrackerViewBase::btnChange_clicked()
{
    tqWarning( "TrackerViewBase::btnChange_clicked(): Not implemented yet" );
}

void TrackerViewBase::listTrackers_currentChanged(TQListViewItem*)
{
    tqWarning( "TrackerViewBase::listTrackers_currentChanged(TQListViewItem*): Not implemented yet" );
}

void TrackerViewBase::btnUpdate_clicked()
{
    tqWarning( "TrackerViewBase::btnUpdate_clicked(): Not implemented yet" );
}

void TrackerViewBase::btnAdd_clicked()
{
    tqWarning( "TrackerViewBase::btnAdd_clicked(): Not implemented yet" );
}

void TrackerViewBase::btnRemove_clicked()
{
    tqWarning( "TrackerViewBase::btnRemove_clicked(): Not implemented yet" );
}

void TrackerViewBase::btnRestore_clicked()
{
    tqWarning( "TrackerViewBase::btnRestore_clicked(): Not implemented yet" );
}

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

TQMetaObject *TrackerViewBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TrackerViewBase( "TrackerViewBase", &TrackerViewBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* TrackerViewBase::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 = {"btnChange_clicked", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"listTrackers_currentChanged", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"btnUpdate_clicked", 0, 0 };
    static const TQUMethod slot_3 = {"btnAdd_clicked", 0, 0 };
    static const TQUMethod slot_4 = {"btnRemove_clicked", 0, 0 };
    static const TQUMethod slot_5 = {"btnRestore_clicked", 0, 0 };
    static const TQUMethod slot_6 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "btnChange_clicked()", &slot_0, TQMetaData::Public },
	{ "listTrackers_currentChanged(TQListViewItem*)", &slot_1, TQMetaData::Public },
	{ "btnUpdate_clicked()", &slot_2, TQMetaData::Public },
	{ "btnAdd_clicked()", &slot_3, TQMetaData::Public },
	{ "btnRemove_clicked()", &slot_4, TQMetaData::Public },
	{ "btnRestore_clicked()", &slot_5, TQMetaData::Public },
	{ "languageChange()", &slot_6, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TrackerViewBase", parentObject,
	slot_tbl, 7,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TrackerViewBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool TrackerViewBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: btnChange_clicked(); break;
    case 1: listTrackers_currentChanged((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 2: btnUpdate_clicked(); break;
    case 3: btnAdd_clicked(); break;
    case 4: btnRemove_clicked(); break;
    case 5: btnRestore_clicked(); break;
    case 6: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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