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

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

#include "base_k3badvanceddataimagesettings.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <tdelistview.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    groupIsoSettings = new TQGroupBox( this, "groupIsoSettings" );
    groupIsoSettings->setColumnLayout(0, TQt::Vertical );
    groupIsoSettings->layout()->setSpacing( 6 );
    groupIsoSettings->layout()->setMargin( 11 );
    groupIsoSettingsLayout = new TQVBoxLayout( groupIsoSettings->layout() );
    groupIsoSettingsLayout->setAlignment( TQt::AlignTop );

    m_viewIsoSettings = new TDEListView( groupIsoSettings, "m_viewIsoSettings" );
    m_viewIsoSettings->addColumn( tr2i18n( "ISO9660 Filesystem" ) );
    m_viewIsoSettings->header()->setClickEnabled( false, m_viewIsoSettings->header()->count() - 1 );
    m_viewIsoSettings->header()->setResizeEnabled( false, m_viewIsoSettings->header()->count() - 1 );
    m_viewIsoSettings->setFullWidth( true );
    groupIsoSettingsLayout->addWidget( m_viewIsoSettings );

    base_K3bDataCustomFilesystemsWidgetLayout->addMultiCellWidget( groupIsoSettings, 1, 1, 0, 1 );

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQVBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    m_checkRockRidge = new TQCheckBox( groupBox3, "m_checkRockRidge" );
    m_checkRockRidge->setChecked( true );
    groupBox3Layout->addWidget( m_checkRockRidge );

    m_checkJoliet = new TQCheckBox( groupBox3, "m_checkJoliet" );
    groupBox3Layout->addWidget( m_checkJoliet );

    m_checkUdf = new TQCheckBox( groupBox3, "m_checkUdf" );
    groupBox3Layout->addWidget( m_checkUdf );

    base_K3bDataCustomFilesystemsWidgetLayout->addWidget( groupBox3, 0, 0 );

    groupBox5 = new TQGroupBox( this, "groupBox5" );
    groupBox5->setColumnLayout(0, TQt::Vertical );
    groupBox5->layout()->setSpacing( 6 );
    groupBox5->layout()->setMargin( 11 );
    groupBox5Layout = new TQVBoxLayout( groupBox5->layout() );
    groupBox5Layout->setAlignment( TQt::AlignTop );

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

    m_checkForceInputCharset = new TQCheckBox( groupBox5, "m_checkForceInputCharset" );
    layout1->addWidget( m_checkForceInputCharset );

    m_comboInputCharset = new KComboBox( false, groupBox5, "m_comboInputCharset" );
    m_comboInputCharset->setEnabled( false );
    m_comboInputCharset->setEditable( true );
    layout1->addWidget( m_comboInputCharset );
    groupBox5Layout->addLayout( layout1 );

    m_checkPreservePermissions = new TQCheckBox( groupBox5, "m_checkPreservePermissions" );
    groupBox5Layout->addWidget( m_checkPreservePermissions );

    base_K3bDataCustomFilesystemsWidgetLayout->addWidget( groupBox5, 0, 1 );
    languageChange();

    // signals and slots connections
    connect( m_checkForceInputCharset, TQ_SIGNAL( toggled(bool) ), m_comboInputCharset, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( m_checkRockRidge, m_checkJoliet );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bAdvancedDataImageSettings::languageChange()
{
    setCaption( tr2i18n( "Custom Data Filesystems" ) );
    groupIsoSettings->setTitle( tr2i18n( "File System Settings" ) );
    m_viewIsoSettings->header()->setLabel( 0, tr2i18n( "ISO9660 Filesystem" ) );
    groupBox3->setTitle( tr2i18n( "File Systems" ) );
    m_checkRockRidge->setText( tr2i18n( "&Generate Rock Ridge extensions" ) );
    TQToolTip::add( m_checkRockRidge, tr2i18n( "Add Rock Ridge extensions to the file system" ) );
    TQWhatsThis::add( m_checkRockRidge, tr2i18n( "<p>If this option is checked, K3b will generate the System Use Sharing Protocol records (SUSP) specified by the Rock Ridge Interchange Protocol (IEEE-P1282).\n"
"<p>Rock Ridge extends the ISO-9660 filesystem by features equal to the UNIX filesystems (permissions, symbolic links, very long filenames, ...). It uses ISO-8859 or UTF-16 based characters and allows 255 octets.\n"
"<p>Rock Ridge extensions are located at the end of each ISO-9660 directory record. This makes the Rock Ridge tree closely coupled to the ISO-9660 tree.\n"
"<p><b>It is highly recommended to use Rock Ridge extensions on every data CD or DVD.</b>" ) );
    m_checkJoliet->setText( tr2i18n( "Generate &Joliet extensions" ) );
    TQToolTip::add( m_checkJoliet, tr2i18n( "Add Joliet extensions to the file system" ) );
    TQWhatsThis::add( m_checkJoliet, tr2i18n( "<p>If this option is checked, K3b will add additional Joliet extensions to the ISO-9660 file system.\n"
"<p>Joliet is not an accepted independent international standard like ISO-9660 or Rock Ridge. It is mainly used on Windows systems.\n"
"<p>Joliet does not allow all characters, so the Joliet filenames are not identical to the filenames on disk (as compared to Rock Ridge). Joliet has a filename length limitation of 64 chars (independent from the character coding and type e.g. European vs. Japanese). This is annoying, as modern file systems all allow 255 characters per path name component.\n"
"<p>Joliet uses UTF-16 coding.\n"
"<p><b>Caution:</b> With the exception of Linux and FreeBSD, there is no POSIX-like OS that supports Joliet. So <b>never create Joliet-only CDs or DVDs</b> for that reason." ) );
    m_checkUdf->setText( tr2i18n( "Generate &UDF structures" ) );
    TQToolTip::add( m_checkUdf, tr2i18n( "Add UDF structures to the file system" ) );
    TQWhatsThis::add( m_checkUdf, tr2i18n( "<p>If this option is checked K3b will create UDF filesystem structures in addition to the ISO9660 filesystem.\n"
"<p>The UDF (<em><b>U</b>niversal <b>D</b>isk <b>F</b>ormat</em>) is mainly used for DVDs." ) );
    groupBox5->setTitle( tr2i18n( "Other Settings" ) );
    m_checkForceInputCharset->setText( tr2i18n( "F&orce input charset:" ) );
    m_checkPreservePermissions->setText( tr2i18n( "Preserve file permissions (bac&kup)" ) );
    TQWhatsThis::add( m_checkPreservePermissions, tr2i18n( "<p>If this option is checked, all files in the resulting file system will have exactly the same permissions as the source files. (Otherwise, all files will have equal permissions and be owned by root).\n"
"<p>This is mainly useful for backups.<p><b>Caution:</b> The permissions may not make much sense on other file systems; for example, if a user that owns a file on the CD or DVD does not exist." ) );
}

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

TQMetaObject *base_K3bAdvancedDataImageSettings::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bAdvancedDataImageSettings( "base_K3bAdvancedDataImageSettings", &base_K3bAdvancedDataImageSettings::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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