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

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

#include "bookmarks_settings_base.h"

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

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

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

    checkBox1 = new TQCheckBox( groupBox1, "checkBox1" );
    checkBox1->setChecked( true );
    groupBox1Layout->addWidget( checkBox1 );

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

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    layout2->addWidget( textLabel1 );

    spinBox1 = new TQSpinBox( groupBox1, "spinBox1" );
    spinBox1->setMaxValue( 15 );
    spinBox1->setValue( 3 );
    layout2->addWidget( spinBox1 );
    spacer1 = new TQSpacerItem( 121, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer1 );
    groupBox1Layout->addLayout( layout2 );
    BookmarkSettingsBaseLayout->addWidget( groupBox1 );

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

    radioButton1 = new TQRadioButton( buttonGroup1, "radioButton1" );
    buttonGroup1Layout->addWidget( radioButton1 );

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

    radioButton2 = new TQRadioButton( buttonGroup1, "radioButton2" );
    radioButton2->setChecked( true );
    layout3->addWidget( radioButton2 );

    lineEdit1 = new KLineEdit( buttonGroup1, "lineEdit1" );
    layout3->addWidget( lineEdit1 );
    spacer3 = new TQSpacerItem( 71, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer3 );
    buttonGroup1Layout->addLayout( layout3 );

    radioButton3 = new TQRadioButton( buttonGroup1, "radioButton3" );
    buttonGroup1Layout->addWidget( radioButton3 );
    BookmarkSettingsBaseLayout->addWidget( buttonGroup1 );
    spacer2 = new TQSpacerItem( 20, 240, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    BookmarkSettingsBaseLayout->addItem( spacer2 );
    languageChange();
    resize( TQSize(622, 490).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( checkBox1, TQ_SIGNAL( toggled(bool) ), spinBox1, TQ_SLOT( setEnabled(bool) ) );
    connect( checkBox1, TQ_SIGNAL( toggled(bool) ), textLabel1, TQ_SLOT( setEnabled(bool) ) );
    connect( radioButton2, TQ_SIGNAL( toggled(bool) ), lineEdit1, TQ_SLOT( setEnabled(bool) ) );

    // buddies
    textLabel1->setBuddy( spinBox1 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void BookmarkSettingsBase::languageChange()
{
    groupBox1->setTitle( tr2i18n( "Code Tooltip" ) );
    TQWhatsThis::add( groupBox1, tr2i18n( "If checked, a tooltip will be shown when the mouse is over the bookmark, containing the text in the area surrounding it. <p> How many surrounding lines to include is decided by the value in the context box." ) );
    checkBox1->setText( tr2i18n( "Show code &tooltip" ) );
    TQToolTip::add( checkBox1, TQString::null );
    TQWhatsThis::add( checkBox1, TQString::null );
    textLabel1->setText( tr2i18n( "&Lines of context:" ) );
    TQWhatsThis::add( textLabel1, TQString::null );
    TQToolTip::add( spinBox1, TQString::null );
    TQWhatsThis::add( spinBox1, TQString::null );
    buttonGroup1->setTitle( tr2i18n( "Show Bookmarked Codeline in Bookmark Panel" ) );
    TQWhatsThis::add( buttonGroup1, tr2i18n( "This decides if the bookmark panel should show the content of the bookmarked line in addition to the line number.<p>This can be made optional depending on the start of the line, typically used for only showing lines containing a comment." ) );
    radioButton1->setText( tr2i18n( "&Never" ) );
    TQToolTip::add( radioButton1, TQString::null );
    TQWhatsThis::add( radioButton1, TQString::null );
    radioButton2->setText( tr2i18n( "&Only lines beginning with the following string:" ) );
    TQToolTip::add( radioButton2, TQString::null );
    radioButton3->setText( tr2i18n( "&Always" ) );
    TQToolTip::add( radioButton3, tr2i18n( "Always show the bookmarked line in addition to the line number" ) );
}

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

TQMetaObject *BookmarkSettingsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_BookmarkSettingsBase( "BookmarkSettingsBase", &BookmarkSettingsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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