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

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

#include "devmanager.h"

#include <ntqvariant.h>
#include <tdelistview.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqgroupbox.h>
#include <ntqtextedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    ConfTabWidget = new TQTabWidget( this, "ConfTabWidget" );

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

    localListView = new TDEListView( tab, "localListView" );
    localListView->addColumn( tr2i18n( "Device" ) );
    localListView->addColumn( tr2i18n( "Status" ) );
    localListView->addColumn( tr2i18n( "Mode" ) );
    localListView->addColumn( tr2i18n( "Version" ) );
    localListView->addColumn( tr2i18n( "Port" ) );
    localListView->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, localListView->sizePolicy().hasHeightForWidth() ) );
    localListView->setMinimumSize( TQSize( 0, 125 ) );
    tabLayout->addWidget( localListView );

    serverLogGroup = new TQGroupBox( tab, "serverLogGroup" );
    serverLogGroup->setColumnLayout(0, TQt::Vertical );
    serverLogGroup->layout()->setSpacing( 6 );
    serverLogGroup->layout()->setMargin( 11 );
    serverLogGroupLayout = new TQGridLayout( serverLogGroup->layout() );
    serverLogGroupLayout->setAlignment( TQt::AlignTop );

    serverLogText = new TQTextEdit( serverLogGroup, "serverLogText" );
    serverLogText->setMinimumSize( TQSize( 0, 90 ) );
    serverLogText->setWordWrap( TQTextEdit::WidgetWidth );
    serverLogText->setReadOnly( true );

    serverLogGroupLayout->addWidget( serverLogText, 0, 0 );
    tabLayout->addWidget( serverLogGroup );

    indiModeGroup = new TQButtonGroup( tab, "indiModeGroup" );
    indiModeGroup->setColumnLayout(0, TQt::Vertical );
    indiModeGroup->layout()->setSpacing( 6 );
    indiModeGroup->layout()->setMargin( 11 );
    indiModeGroupLayout = new TQHBoxLayout( indiModeGroup->layout() );
    indiModeGroupLayout->setAlignment( TQt::AlignTop );

    localR = new TQRadioButton( indiModeGroup, "localR" );
    localR->setChecked( true );
    indiModeGroupLayout->addWidget( localR );

    serverR = new TQRadioButton( indiModeGroup, "serverR" );
    indiModeGroupLayout->addWidget( serverR );
    tabLayout->addWidget( indiModeGroup );

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

    runServiceB = new KPushButton( tab, "runServiceB" );
    runServiceB->setEnabled( false );
    layout6->addWidget( runServiceB );

    stopServiceB = new KPushButton( tab, "stopServiceB" );
    stopServiceB->setEnabled( false );
    layout6->addWidget( stopServiceB );
    spacer4 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer4 );
    tabLayout->addLayout( layout6 );
    ConfTabWidget->insertTab( tab, TQString::fromLatin1("") );

    TabPage = new TQWidget( ConfTabWidget, "TabPage" );
    TabPageLayout = new TQHBoxLayout( TabPage, 11, 6, "TabPageLayout"); 

    clientListView = new TDEListView( TabPage, "clientListView" );
    clientListView->addColumn( tr2i18n( "Status" ) );
    clientListView->addColumn( tr2i18n( "Name" ) );
    clientListView->addColumn( tr2i18n( "Port" ) );
    TabPageLayout->addWidget( clientListView );

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

    groupBox1_2 = new TQGroupBox( TabPage, "groupBox1_2" );
    groupBox1_2->setColumnLayout(0, TQt::Vertical );
    groupBox1_2->layout()->setSpacing( 6 );
    groupBox1_2->layout()->setMargin( 11 );
    groupBox1_2Layout = new TQVBoxLayout( groupBox1_2->layout() );
    groupBox1_2Layout->setAlignment( TQt::AlignTop );

    addB = new KPushButton( groupBox1_2, "addB" );
    groupBox1_2Layout->addWidget( addB );

    modifyB = new KPushButton( groupBox1_2, "modifyB" );
    groupBox1_2Layout->addWidget( modifyB );

    removeB = new KPushButton( groupBox1_2, "removeB" );
    groupBox1_2Layout->addWidget( removeB );
    layout5_2->addWidget( groupBox1_2 );

    groupBox2_2 = new TQGroupBox( TabPage, "groupBox2_2" );
    groupBox2_2->setColumnLayout(0, TQt::Vertical );
    groupBox2_2->layout()->setSpacing( 6 );
    groupBox2_2->layout()->setMargin( 11 );
    groupBox2_2Layout = new TQVBoxLayout( groupBox2_2->layout() );
    groupBox2_2Layout->setAlignment( TQt::AlignTop );

    connectHostB = new KPushButton( groupBox2_2, "connectHostB" );
    connectHostB->setEnabled( false );
    groupBox2_2Layout->addWidget( connectHostB );

    disconnectHostB = new KPushButton( groupBox2_2, "disconnectHostB" );
    disconnectHostB->setEnabled( false );
    groupBox2_2Layout->addWidget( disconnectHostB );
    layout5_2->addWidget( groupBox2_2 );
    spacer3_2 = new TQSpacerItem( 20, 31, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout5_2->addItem( spacer3_2 );
    TabPageLayout->addLayout( layout5_2 );
    ConfTabWidget->insertTab( TabPage, TQString::fromLatin1("") );
    devManagerLayout->addWidget( ConfTabWidget );

    layout6_2 = new TQHBoxLayout( 0, 0, 6, "layout6_2"); 
    Horizontal_Spacing2_3 = new TQSpacerItem( 289, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6_2->addItem( Horizontal_Spacing2_3 );

    cancelB = new TQPushButton( this, "cancelB" );
    cancelB->setAutoDefault( true );
    layout6_2->addWidget( cancelB );
    devManagerLayout->addLayout( layout6_2 );
    languageChange();
    resize( TQSize(504, 494).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancelB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( close() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void devManager::languageChange()
{
    setCaption( tr2i18n( "Device Manager" ) );
    localListView->header()->setLabel( 0, tr2i18n( "Device" ) );
    localListView->header()->setLabel( 1, tr2i18n( "Status" ) );
    localListView->header()->setLabel( 2, tr2i18n( "Mode" ) );
    localListView->header()->setLabel( 3, tr2i18n( "Version" ) );
    localListView->header()->setLabel( 4, tr2i18n( "Port" ) );
    serverLogGroup->setTitle( tr2i18n( "Server Log" ) );
    serverLogText->setText( TQString::null );
    indiModeGroup->setTitle( tr2i18n( "Mode" ) );
    localR->setText( tr2i18n( "Local" ) );
    serverR->setText( tr2i18n( "Server" ) );
    runServiceB->setText( tr2i18n( "R&un Service" ) );
    stopServiceB->setText( tr2i18n( "Stop Service" ) );
    ConfTabWidget->changeTab( tab, tr2i18n( "Local/Server" ) );
    clientListView->header()->setLabel( 0, tr2i18n( "Status" ) );
    clientListView->header()->setLabel( 1, tr2i18n( "Name" ) );
    clientListView->header()->setLabel( 2, tr2i18n( "Port" ) );
    groupBox1_2->setTitle( tr2i18n( "Hosts" ) );
    addB->setText( tr2i18n( "Add..." ) );
    modifyB->setText( tr2i18n( "Modify" ) );
    removeB->setText( tr2i18n( "Remove" ) );
    groupBox2_2->setTitle( tr2i18n( "Connection" ) );
    connectHostB->setText( tr2i18n( "Connect" ) );
    disconnectHostB->setText( tr2i18n( "Disconnect" ) );
    ConfTabWidget->changeTab( TabPage, tr2i18n( "Client" ) );
    cancelB->setText( tr2i18n( "&Close" ) );
}

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

TQMetaObject *devManager::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_devManager( "devManager", &devManager::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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