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

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

#include "kxetreeviewsettingspage.h"

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

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

    m_pCreateItemsOnDemand = new TQCheckBox( this, "m_pCreateItemsOnDemand" );
    KXETreeViewSettingsPageLayout->addWidget( m_pCreateItemsOnDemand );

    m_pDecorateRoot = new TQCheckBox( this, "m_pDecorateRoot" );
    KXETreeViewSettingsPageLayout->addWidget( m_pDecorateRoot );

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

    m_pLblDfltExpLevel = new TQLabel( this, "m_pLblDfltExpLevel" );
    layout1->addWidget( m_pLblDfltExpLevel );

    m_pDfltExpLevel = new TQSpinBox( this, "m_pDfltExpLevel" );
    m_pDfltExpLevel->setValue( 5 );
    layout1->addWidget( m_pDfltExpLevel );
    KXETreeViewSettingsPageLayout->addLayout( layout1 );

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

    m_pEnableDrag = new TQCheckBox( m_pBoxDnD, "m_pEnableDrag" );
    m_pEnableDrag->setChecked( true );
    m_pBoxDnDLayout->addWidget( m_pEnableDrag );

    m_pEnableDrop = new TQCheckBox( m_pBoxDnD, "m_pEnableDrop" );
    m_pEnableDrop->setChecked( true );
    m_pEnableDrop->setTristate( false );
    m_pBoxDnDLayout->addWidget( m_pEnableDrop );
    KXETreeViewSettingsPageLayout->addWidget( m_pBoxDnD );

    m_pElemDisplMode = new TQButtonGroup( this, "m_pElemDisplMode" );
    m_pElemDisplMode->setColumnLayout(0, TQt::Vertical );
    m_pElemDisplMode->layout()->setSpacing( 6 );
    m_pElemDisplMode->layout()->setMargin( 11 );
    m_pElemDisplModeLayout = new TQVBoxLayout( m_pElemDisplMode->layout() );
    m_pElemDisplModeLayout->setAlignment( TQt::AlignTop );

    m_pElemDisplMode1 = new TQRadioButton( m_pElemDisplMode, "m_pElemDisplMode1" );
    m_pElemDisplMode1->setChecked( true );
    m_pElemDisplModeLayout->addWidget( m_pElemDisplMode1 );

    m_pElemDisplMode2 = new TQRadioButton( m_pElemDisplMode, "m_pElemDisplMode2" );
    m_pElemDisplModeLayout->addWidget( m_pElemDisplMode2 );

    m_pElemDisplMode3 = new TQRadioButton( m_pElemDisplMode, "m_pElemDisplMode3" );
    m_pElemDisplModeLayout->addWidget( m_pElemDisplMode3 );
    KXETreeViewSettingsPageLayout->addWidget( m_pElemDisplMode );
    spacer7 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KXETreeViewSettingsPageLayout->addItem( spacer7 );
    languageChange();
    resize( TQSize(218, 325).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    m_pLblDfltExpLevel->setBuddy( m_pDfltExpLevel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KXETreeViewSettingsPage::languageChange()
{
    setCaption( tr2i18n( "Tree View Settings Page" ) );
    m_pCreateItemsOnDemand->setText( tr2i18n( "Create items &on demand" ) );
    TQWhatsThis::add( m_pCreateItemsOnDemand, tr2i18n( "<b>Create items on demand</b>\n"
"<br>\n"
"You can determine when to create the tree view items.\n"
"Wether they are created on demand, which means their creation is postponed until\n"
"their grandparent item is opened, or all items are created while opening the XML \n"
"file.\n"
"<br>\n"
"Creating items on demand saves time and memory while opening very big, deep nested XML documents." ) );
    m_pDecorateRoot->setText( tr2i18n( "Set &root element decorated" ) );
    TQWhatsThis::add( m_pDecorateRoot, tr2i18n( "<b>Set root element decorated</b>\n"
"<br>\n"
"You can determine wether the tree view item corresponding to the XML document's root element should have a decoration or not.\n"
"<br>\n"
"A decoration is a + or - icon, with which the item can be opened or closed to show or hide its childitems." ) );
    m_pLblDfltExpLevel->setText( tr2i18n( "Default &expand level:" ) );
    TQWhatsThis::add( m_pLblDfltExpLevel, tr2i18n( "<b>Default expand level</b>\n"
"<br>\n"
"You can determine up to which level the tree view items should be opened (showing their childitems) when opening a document." ) );
    TQWhatsThis::add( m_pDfltExpLevel, tr2i18n( "<b>Default expand level</b>\n"
"<br>\n"
"You can determine up to which level the tree view items should be opened (showing their childitems) when opening a document." ) );
    m_pBoxDnD->setTitle( tr2i18n( "Drag and drop" ) );
    m_pEnableDrag->setText( tr2i18n( "Enable dra&gging" ) );
    TQWhatsThis::add( m_pEnableDrag, tr2i18n( "<b>Enable dragging</b>\n"
"<br>\n"
"You can determine wether dragging items (and their corresponding XML nodes) from the tree view is enabled or disabled." ) );
    m_pEnableDrop->setText( tr2i18n( "Enable dro&pping" ) );
    TQWhatsThis::add( m_pEnableDrop, tr2i18n( "<b>Enable dropping</b>\n"
"<br>\n"
"You can determine wether dropping XML nodes to the tree view is enabled or disabled." ) );
    m_pElemDisplMode->setTitle( tr2i18n( "&Show ..." ) );
    TQWhatsThis::add( m_pElemDisplMode, tr2i18n( "You can determine which information about XML element's attributes you want to see in the tree view. Choose between:<br>\n"
"<br>\n"
"<b><i>no attributes</i></b><br>\n"
"no information about attributes at all<br>\n"
"<br>\n"
"<b><i>attribute names only</i></b><br>\n"
"the attributes' names are shown<br>\n"
"<br>\n"
"<b><i>attribute names & values</i></b><br>\n"
"the attributes' names and the corresponding values are shown" ) );
    m_pElemDisplMode1->setText( tr2i18n( "No attributes" ) );
    m_pElemDisplMode2->setText( tr2i18n( "Attribute names only" ) );
    m_pElemDisplMode3->setText( tr2i18n( "Attribute names && values" ) );
}

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

TQMetaObject *KXETreeViewSettingsPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KXETreeViewSettingsPage( "KXETreeViewSettingsPage", &KXETreeViewSettingsPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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