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

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

#include "devicedialog.h"

#include <ntqvariant.h>
#include <kseparator.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqtoolbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    textLabel1_2->setPaletteForegroundColor( TQColor( 0, 0, 0 ) );
    DeviceDialogLayout->addWidget( textLabel1_2 );

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

    deviceBox = new TQListView( this, "deviceBox" );
    deviceBox->addColumn( tr2i18n( "1" ) );
    deviceBox->addColumn( tr2i18n( "2" ) );
    deviceBox->addColumn( tr2i18n( "3" ) );
    deviceBox->addColumn( tr2i18n( "4" ) );
    deviceBox->setFrameShape( TQListView::GroupBoxPanel );
    deviceBox->setFrameShadow( TQListView::Plain );
    deviceBox->setLineWidth( 2 );
    deviceBox->setSelectionMode( TQListView::Single );
    deviceBox->setAllColumnsShowFocus( true );
    deviceBox->setShowSortIndicator( false );
    layout6->addWidget( deviceBox );

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

    layout8 = new TQHBoxLayout( 0, 0, 6, "layout8"); 
    spacer5 = new TQSpacerItem( 40, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout8->addItem( spacer5 );

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

    pixmapLabel = new TQLabel( this, "pixmapLabel" );
    pixmapLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, pixmapLabel->sizePolicy().hasHeightForWidth() ) );
    pixmapLabel->setMinimumSize( TQSize( 48, 50 ) );
    pixmapLabel->setAlignment( int( TQLabel::AlignCenter ) );
    layout7->addWidget( pixmapLabel );
    spacer2 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout7->addItem( spacer2 );
    layout8->addLayout( layout7 );
    spacer6 = new TQSpacerItem( 40, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout8->addItem( spacer6 );
    layout9->addLayout( layout8 );

    configureButton = new TQToolButton( this, "configureButton" );
    configureButton->setMinimumSize( TQSize( 130, 28 ) );
    layout9->addWidget( configureButton );

    connectButton = new TQPushButton( this, "connectButton" );
    connectButton->setMinimumSize( TQSize( 130, 28 ) );
    layout9->addWidget( connectButton );

    deleteButton = new TQPushButton( this, "deleteButton" );
    deleteButton->setMinimumSize( TQSize( 130, 28 ) );
    layout9->addWidget( deleteButton );
    layout6->addLayout( layout9 );
    DeviceDialogLayout->addLayout( layout6 );

    kSeparator1 = new KSeparator( this, "kSeparator1" );
    DeviceDialogLayout->addWidget( kSeparator1 );

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

    addButton = new TQPushButton( this, "addButton" );
    addButton->setToggleButton( true );
    lastLayout->addWidget( addButton );

    okButton = new TQPushButton( this, "okButton" );
    lastLayout->addWidget( okButton );
    spacer1 = new TQSpacerItem( 410, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    lastLayout->addItem( spacer1 );
    DeviceDialogLayout->addLayout( lastLayout );
    languageChange();
    resize( TQSize(550, 190).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DeviceDialog::languageChange()
{
    setCaption( tr2i18n( "Devices" ) );
    textLabel1_2->setText( tr2i18n( "<font size=\"+1\">Configured Devices:</font>" ) );
    deviceBox->header()->setLabel( 0, tr2i18n( "1" ) );
    deviceBox->header()->setLabel( 1, tr2i18n( "2" ) );
    deviceBox->header()->setLabel( 2, tr2i18n( "3" ) );
    deviceBox->header()->setLabel( 3, tr2i18n( "4" ) );
    pixmapLabel->setText( TQString::null );
    configureButton->setText( tr2i18n( "Co&nfigure" ) );
    connectButton->setText( tr2i18n( "C&onnect" ) );
    deleteButton->setText( tr2i18n( "&Delete" ) );
    addButton->setText( tr2i18n( "&Start Discovery <<" ) );
    okButton->setText( tr2i18n( "&Close" ) );
}

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

TQMetaObject *DeviceDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DeviceDialog( "DeviceDialog", &DeviceDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* DeviceDialog::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 TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"DeviceDialog", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_DeviceDialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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