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

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

#include "base_k3bbootimageview.h"

#include <ntqvariant.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    label = new TQLabel( this, "label" );
    label->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, label->sizePolicy().hasHeightForWidth() ) );
    layout17->addWidget( label );

    m_buttonNew = new TQPushButton( this, "m_buttonNew" );
    layout17->addWidget( m_buttonNew );

    m_buttonDelete = new TQPushButton( this, "m_buttonDelete" );
    layout17->addWidget( m_buttonDelete );
    base_K3bBootImageViewLayout->addLayout( layout17 );

    m_viewImages = new TDEListView( this, "m_viewImages" );
    m_viewImages->addColumn( tr2i18n( "Emulation Type" ) );
    m_viewImages->header()->setClickEnabled( false, m_viewImages->header()->count() - 1 );
    m_viewImages->header()->setResizeEnabled( false, m_viewImages->header()->count() - 1 );
    m_viewImages->addColumn( tr2i18n( "Size" ) );
    m_viewImages->addColumn( tr2i18n( "Local Path" ) );
    m_viewImages->header()->setClickEnabled( false, m_viewImages->header()->count() - 1 );
    m_viewImages->header()->setResizeEnabled( false, m_viewImages->header()->count() - 1 );
    m_viewImages->setAllColumnsShowFocus( true );
    m_viewImages->setFullWidth( true );
    base_K3bBootImageViewLayout->addWidget( m_viewImages );

    m_groupImageType = new TQButtonGroup( this, "m_groupImageType" );
    m_groupImageType->setColumnLayout(0, TQt::Vertical );
    m_groupImageType->layout()->setSpacing( 6 );
    m_groupImageType->layout()->setMargin( 11 );
    m_groupImageTypeLayout = new TQHBoxLayout( m_groupImageType->layout() );
    m_groupImageTypeLayout->setAlignment( TQt::AlignTop );

    m_radioFloppy = new TQRadioButton( m_groupImageType, "m_radioFloppy" );
    m_groupImageTypeLayout->addWidget( m_radioFloppy );

    m_radioHarddisk = new TQRadioButton( m_groupImageType, "m_radioHarddisk" );
    m_groupImageTypeLayout->addWidget( m_radioHarddisk );

    m_radioNoEmulation = new TQRadioButton( m_groupImageType, "m_radioNoEmulation" );
    m_groupImageTypeLayout->addWidget( m_radioNoEmulation );
    base_K3bBootImageViewLayout->addWidget( m_groupImageType );

    m_groupOptions = new TQGroupBox( this, "m_groupOptions" );
    m_groupOptions->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, m_groupOptions->sizePolicy().hasHeightForWidth() ) );
    m_groupOptions->setColumnLayout(0, TQt::Vertical );
    m_groupOptions->layout()->setSpacing( 6 );
    m_groupOptions->layout()->setMargin( 11 );
    m_groupOptionsLayout = new TQVBoxLayout( m_groupOptions->layout() );
    m_groupOptionsLayout->setAlignment( TQt::AlignTop );

    m_checkNoBoot = new TQCheckBox( m_groupOptions, "m_checkNoBoot" );
    m_groupOptionsLayout->addWidget( m_checkNoBoot );

    m_checkInfoTable = new TQCheckBox( m_groupOptions, "m_checkInfoTable" );
    m_groupOptionsLayout->addWidget( m_checkInfoTable );

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

    m_editLoadSegment = new TQLineEdit( m_groupOptions, "m_editLoadSegment" );
    m_editLoadSegment->setEnabled( false );

    layout10->addWidget( m_editLoadSegment, 0, 1 );

    m_editLoadSize = new TQLineEdit( m_groupOptions, "m_editLoadSize" );
    m_editLoadSize->setEnabled( false );

    layout10->addWidget( m_editLoadSize, 1, 1 );

    textLabel2_2 = new TQLabel( m_groupOptions, "textLabel2_2" );
    textLabel2_2->setEnabled( false );

    layout10->addWidget( textLabel2_2, 0, 0 );

    textLabel3 = new TQLabel( m_groupOptions, "textLabel3" );
    textLabel3->setEnabled( false );

    layout10->addWidget( textLabel3, 1, 0 );
    m_groupOptionsLayout->addLayout( layout10 );
    base_K3bBootImageViewLayout->addWidget( m_groupOptions );

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

    m_buttonToggleOptions = new TQPushButton( this, "m_buttonToggleOptions" );
    layout16->addWidget( m_buttonToggleOptions );
    spacer16 = new TQSpacerItem( 261, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout16->addItem( spacer16 );
    base_K3bBootImageViewLayout->addLayout( layout16 );

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

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

    m_editBootCataloge = new TQLineEdit( this, "m_editBootCataloge" );
    m_editBootCataloge->setReadOnly( true );
    layout18->addWidget( m_editBootCataloge );
    base_K3bBootImageViewLayout->addLayout( layout18 );
    languageChange();

    // signals and slots connections
    connect( m_radioFloppy, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( slotOptionsChanged() ) );
    connect( m_radioHarddisk, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( slotOptionsChanged() ) );
    connect( m_checkNoBoot, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( slotOptionsChanged() ) );
    connect( m_checkInfoTable, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( slotOptionsChanged() ) );
    connect( m_editLoadSegment, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( slotOptionsChanged() ) );
    connect( m_editLoadSize, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( slotOptionsChanged() ) );
    connect( m_radioNoEmulation, TQ_SIGNAL( toggled(bool) ), textLabel2_2, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioNoEmulation, TQ_SIGNAL( toggled(bool) ), textLabel3, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioNoEmulation, TQ_SIGNAL( toggled(bool) ), m_editLoadSegment, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioNoEmulation, TQ_SIGNAL( toggled(bool) ), m_editLoadSize, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioNoEmulation, TQ_SIGNAL( toggled(bool) ), m_checkNoBoot, TQ_SLOT( setDisabled(bool) ) );
    connect( m_radioNoEmulation, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( slotOptionsChanged() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bBootImageView::languageChange()
{
    label->setText( tr2i18n( "Boot images:" ) );
    m_buttonNew->setText( tr2i18n( "&New..." ) );
    TQToolTip::add( m_buttonNew, tr2i18n( "Add new boot image" ) );
    m_buttonDelete->setText( tr2i18n( "&Delete" ) );
    TQToolTip::add( m_buttonDelete, tr2i18n( "Remove selected boot image" ) );
    m_viewImages->header()->setLabel( 0, tr2i18n( "Emulation Type" ) );
    m_viewImages->header()->setLabel( 1, tr2i18n( "Size" ) );
    m_viewImages->header()->setLabel( 2, tr2i18n( "Local Path" ) );
    m_groupImageType->setTitle( tr2i18n( "Emulation Type" ) );
    m_radioFloppy->setText( tr2i18n( "Flopp&y" ) );
    TQToolTip::add( m_radioFloppy, tr2i18n( "Emulate a 1440/2880 kb floppy" ) );
    m_radioHarddisk->setText( tr2i18n( "Harddisk" ) );
    TQToolTip::add( m_radioHarddisk, tr2i18n( "Emulate a harddisk" ) );
    m_radioNoEmulation->setText( tr2i18n( "None" ) );
    TQToolTip::add( m_radioNoEmulation, tr2i18n( "No emulation at all" ) );
    m_groupOptions->setTitle( tr2i18n( "Settings" ) );
    m_checkNoBoot->setText( tr2i18n( "No boot image" ) );
    TQToolTip::add( m_checkNoBoot, tr2i18n( "Do not boot from the emulated floppy/harddisk" ) );
    m_checkInfoTable->setText( tr2i18n( "Boot-info-table" ) );
    m_editLoadSegment->setText( tr2i18n( "0" ) );
    m_editLoadSize->setText( tr2i18n( "0" ) );
    textLabel2_2->setText( tr2i18n( "Boot load segment:" ) );
    textLabel3->setText( tr2i18n( "Boot load size:" ) );
    m_buttonToggleOptions->setText( tr2i18n( "Show Advanced Op&tions" ) );
    textLabel2->setText( tr2i18n( "Boot catalog:" ) );
    m_editBootCataloge->setText( tr2i18n( "boot/boot.catalog" ) );
}

void base_K3bBootImageView::slotOptionsChanged()
{
    tqWarning( "base_K3bBootImageView::slotOptionsChanged(): Not implemented yet" );
}

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

TQMetaObject *base_K3bBootImageView::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bBootImageView( "base_K3bBootImageView", &base_K3bBootImageView::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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