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

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

#include "dialog.h"

#include <ntqvariant.h>
#include <tqvbuttongroup.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqframe.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqslider.h>
#include <knuminput.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "knuminput.h"

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

    tabWidget = new TQTabWidget( this, "tabWidget" );
    tabWidget->setAcceptDrops( false );

    Widget2 = new TQWidget( tabWidget, "Widget2" );
    Widget2Layout = new TQVBoxLayout( Widget2, 11, 6, "Widget2Layout"); 

    textLabel1 = new TQLabel( Widget2, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    textLabel1->setTextFormat( TQLabel::PlainText );
    Widget2Layout->addWidget( textLabel1 );

    m_listBox = new TQListBox( Widget2, "m_listBox" );
    Widget2Layout->addWidget( m_listBox );

    layout4 = new TQHBoxLayout( 0, 0, 6, "layout4"); 
    spacer2 = new TQSpacerItem( 180, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer2 );

    m_removeButton = new TQPushButton( Widget2, "m_removeButton" );
    m_removeButton->setEnabled( true );
    m_removeButton->setAutoDefault( false );
    layout4->addWidget( m_removeButton );

    m_addButton = new TQPushButton( Widget2, "m_addButton" );
    m_addButton->setAutoDefault( false );
    m_addButton->setDefault( false );
    layout4->addWidget( m_addButton );
    Widget2Layout->addLayout( layout4 );

    line1 = new TQFrame( Widget2, "line1" );
    line1->setMinimumSize( TQSize( 0, 15 ) );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setLineWidth( 1 );
    line1->setMidLineWidth( 1 );
    line1->setFrameShape( TQFrame::HLine );
    Widget2Layout->addWidget( line1 );

    layout7 = new TQGridLayout( 0, 1, 1, 0, 6, "layout7"); 
    spacer3 = new TQSpacerItem( 16, 50, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout7->addMultiCell( spacer3, 1, 2, 0, 0 );

    dontScanRemoteMounts = new TQCheckBox( Widget2, "dontScanRemoteMounts" );
    dontScanRemoteMounts->setEnabled( false );
    dontScanRemoteMounts->setMinimumSize( TQSize( 0, 0 ) );
    dontScanRemoteMounts->setMaximumSize( TQSize( 32767, 32767 ) );
    dontScanRemoteMounts->setAcceptDrops( false );

    layout7->addWidget( dontScanRemoteMounts, 1, 1 );

    scanAcrossMounts = new TQCheckBox( Widget2, "scanAcrossMounts" );

    layout7->addMultiCellWidget( scanAcrossMounts, 0, 0, 0, 1 );

    dontScanRemovableMedia = new TQCheckBox( Widget2, "dontScanRemovableMedia" );
    dontScanRemovableMedia->setEnabled( false );

    layout7->addWidget( dontScanRemovableMedia, 2, 1 );
    Widget2Layout->addLayout( layout7 );
    tabWidget->insertTab( Widget2, TQString::fromLatin1("") );

    Widget3 = new TQWidget( tabWidget, "Widget3" );
    Widget3Layout = new TQVBoxLayout( Widget3, 11, 6, "Widget3Layout"); 

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

    colourSchemeGroup = new TQVButtonGroup( groupBox1, "colourSchemeGroup" );
    colourSchemeGroup->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, colourSchemeGroup->sizePolicy().hasHeightForWidth() ) );
    groupBox1Layout->addWidget( colourSchemeGroup );

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

    textLabel3 = new TQLabel( groupBox1, "textLabel3" );
    textLabel3->setTextFormat( TQLabel::PlainText );
    layout10->addWidget( textLabel3 );

    contrastSlider = new TQSlider( groupBox1, "contrastSlider" );
    contrastSlider->setMinValue( 1 );
    contrastSlider->setMaxValue( 100 );
    contrastSlider->setOrientation( TQSlider::Horizontal );
    layout10->addWidget( contrastSlider );
    groupBox1Layout->addLayout( layout10 );
    Widget3Layout->addWidget( groupBox1 );

    useAntialiasing = new TQCheckBox( Widget3, "useAntialiasing" );
    Widget3Layout->addWidget( useAntialiasing );

    layout10_2 = new TQVBoxLayout( 0, 0, 0, "layout10_2"); 

    varyLabelFontSizes = new TQCheckBox( Widget3, "varyLabelFontSizes" );
    varyLabelFontSizes->setEnabled( true );
    layout10_2->addWidget( varyLabelFontSizes );

    layout9 = new TQHBoxLayout( 0, 0, 6, "layout9"); 
    spacer4 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout9->addItem( spacer4 );

    textLabel2 = new TQLabel( Widget3, "textLabel2" );
    textLabel2->setEnabled( true );
    textLabel2->setTextFormat( TQLabel::PlainText );
    layout9->addWidget( textLabel2 );

    minFontPitch = new KIntSpinBox( Widget3, "minFontPitch" );
    minFontPitch->setEnabled( true );
    minFontPitch->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, minFontPitch->sizePolicy().hasHeightForWidth() ) );
    minFontPitch->setMinimumSize( TQSize( 80, 0 ) );
    minFontPitch->setMaxValue( 20 );
    minFontPitch->setMinValue( 1 );
    minFontPitch->setValue( 9 );
    layout9->addWidget( minFontPitch );
    layout10_2->addLayout( layout9 );
    Widget3Layout->addLayout( layout10_2 );

    showSmallFiles = new TQCheckBox( Widget3, "showSmallFiles" );
    Widget3Layout->addWidget( showSmallFiles );
    tabWidget->insertTab( Widget3, TQString::fromLatin1("") );
    DialogLayout->addWidget( tabWidget );

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

    m_resetButton = new TQPushButton( this, "m_resetButton" );
    m_resetButton->setAutoDefault( false );
    layout6->addWidget( m_resetButton );
    spacer1 = new TQSpacerItem( 120, 30, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer1 );

    m_closeButton = new TQPushButton( this, "m_closeButton" );
    m_closeButton->setDefault( true );
    layout6->addWidget( m_closeButton );
    DialogLayout->addLayout( layout6 );
    languageChange();
    resize( TQSize(415, 351).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( scanAcrossMounts, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( toggleScanAcrossMounts(bool) ) );
    connect( dontScanRemoteMounts, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( toggleDontScanRemoteMounts(bool) ) );
    connect( dontScanRemovableMedia, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( toggleDontScanRemovableMedia(bool) ) );

    // tab order
    setTabOrder( tabWidget, colourSchemeGroup );
    setTabOrder( colourSchemeGroup, contrastSlider );
    setTabOrder( contrastSlider, useAntialiasing );
    setTabOrder( useAntialiasing, varyLabelFontSizes );
    setTabOrder( varyLabelFontSizes, minFontPitch );
    setTabOrder( minFontPitch, m_resetButton );
    setTabOrder( m_resetButton, m_closeButton );
    setTabOrder( m_closeButton, m_listBox );
    setTabOrder( m_listBox, m_removeButton );
    setTabOrder( m_removeButton, m_addButton );
    setTabOrder( m_addButton, scanAcrossMounts );
    setTabOrder( scanAcrossMounts, dontScanRemoteMounts );
    setTabOrder( dontScanRemoteMounts, dontScanRemovableMedia );

    // buddies
    textLabel1->setBuddy( m_listBox );
    textLabel3->setBuddy( contrastSlider );
    textLabel2->setBuddy( minFontPitch );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Dialog::languageChange()
{
    setCaption( tr2i18n( "Settings - Filelight" ) );
    textLabel1->setText( tr2i18n( "Do &not scan these directories:" ) );
    TQToolTip::add( m_listBox, TQString::null );
    TQWhatsThis::add( m_listBox, tr2i18n( "Filelight will not scan these directories unless you specifically request them." ) );
    m_removeButton->setText( tr2i18n( "R&emove" ) );
    m_addButton->setText( tr2i18n( "&Add..." ) );
    dontScanRemoteMounts->setText( tr2i18n( "Exclude remote files&ystems" ) );
    TQToolTip::add( dontScanRemoteMounts, TQString::null );
    TQWhatsThis::add( dontScanRemoteMounts, tr2i18n( "Prevents scanning of filesystems that are not on this computer, e.g. NFS or Samba mounts." ) );
    scanAcrossMounts->setText( tr2i18n( "Scan across filesystem &boundaries" ) );
    TQWhatsThis::add( scanAcrossMounts, tr2i18n( "Allows scans to enter directories that are part of other filesystems. For example, when unchecked, this will usually prevent the contents of <b>/mnt</b> from being scanned if you scan <b>/</b>." ) );
    dontScanRemovableMedia->setText( tr2i18n( "E&xclude removable media" ) );
    TQToolTip::add( dontScanRemovableMedia, TQString::null );
    TQWhatsThis::add( dontScanRemovableMedia, tr2i18n( "Prevents Filelight from scanning removable media (eg. CD-ROMs)." ) );
    tabWidget->changeTab( Widget2, tr2i18n( "Scannin&g" ) );
    groupBox1->setTitle( tr2i18n( "Scheme" ) );
    textLabel3->setText( tr2i18n( "Co&ntrast" ) );
    TQWhatsThis::add( contrastSlider, tr2i18n( "Here you can vary the contrast of the filemap in realtime." ) );
    useAntialiasing->setText( tr2i18n( "&Use anti-aliasing" ) );
    TQWhatsThis::add( useAntialiasing, tr2i18n( "Anti-aliasing the filemap makes it clearer and prettier, unfortunately it also makes rendering very slow." ) );
    varyLabelFontSizes->setText( tr2i18n( "Var&y label font sizes" ) );
    TQWhatsThis::add( varyLabelFontSizes, tr2i18n( "The font size of exploded labels can be varied relative to the depth of the directories they represent. This helps you spot the important labels more easily. Set a sensible minimum font size." ) );
    textLabel2->setText( tr2i18n( "Minimum font si&ze:" ) );
    TQWhatsThis::add( textLabel2, tr2i18n( "The smallest font size Filelight can use to render labels." ) );
    showSmallFiles->setText( tr2i18n( "Show small files" ) );
    TQWhatsThis::add( showSmallFiles, tr2i18n( "Some files are too small to be rendered on the filemap. Selecting this option makes these files visible by merging them all into a single \"multi-segment\"." ) );
    tabWidget->changeTab( Widget3, tr2i18n( "&Appearance" ) );
    m_resetButton->setText( tr2i18n( "&Reset" ) );
    TQWhatsThis::add( m_resetButton, tr2i18n( "Reset any changes you have made since you opened this dialog." ) );
    m_closeButton->setText( tr2i18n( "&Close" ) );
}

void Dialog::toggleDontScanRemovableMedia(bool)
{
    tqWarning( "Dialog::toggleDontScanRemovableMedia(bool): Not implemented yet" );
}

void Dialog::toggleDontScanRemoteMounts(bool)
{
    tqWarning( "Dialog::toggleDontScanRemoteMounts(bool): Not implemented yet" );
}

void Dialog::toggleScanAcrossMounts(bool)
{
    tqWarning( "Dialog::toggleScanAcrossMounts(bool): Not implemented yet" );
}

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

TQMetaObject *Dialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Dialog( "Dialog", &Dialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* Dialog::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 TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"toggleDontScanRemovableMedia", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"toggleDontScanRemoteMounts", 1, param_slot_1 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"toggleScanAcrossMounts", 1, param_slot_2 };
    static const TQUMethod slot_3 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "toggleDontScanRemovableMedia(bool)", &slot_0, TQMetaData::Public },
	{ "toggleDontScanRemoteMounts(bool)", &slot_1, TQMetaData::Public },
	{ "toggleScanAcrossMounts(bool)", &slot_2, TQMetaData::Public },
	{ "languageChange()", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"Dialog", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_Dialog.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool Dialog::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: toggleDontScanRemovableMedia((bool)static_QUType_bool.get(_o+1)); break;
    case 1: toggleDontScanRemoteMounts((bool)static_QUType_bool.get(_o+1)); break;
    case 2: toggleScanAcrossMounts((bool)static_QUType_bool.get(_o+1)); break;
    case 3: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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