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

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

#include "configimagelistpage.h"

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

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

    kcfg_showDirs = new TQCheckBox( this, "kcfg_showDirs" );
    ConfigImageListPageLayout->addWidget( kcfg_showDirs );

    kcfg_loadMetadata = new TQCheckBox( this, "kcfg_loadMetadata" );
    ConfigImageListPageLayout->addWidget( kcfg_loadMetadata );
    spacer10_2 = new TQSpacerItem( 21, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    ConfigImageListPageLayout->addItem( spacer10_2 );

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

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

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

    kcfg_thumbnailMarginSize = new TQSpinBox( this, "kcfg_thumbnailMarginSize" );
    kcfg_thumbnailMarginSize->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kcfg_thumbnailMarginSize->sizePolicy().hasHeightForWidth() ) );
    kcfg_thumbnailMarginSize->setButtonSymbols( TQSpinBox::UpDownArrows );
    kcfg_thumbnailMarginSize->setMaxValue( 50 );
    kcfg_thumbnailMarginSize->setMinValue( 2 );
    kcfg_thumbnailMarginSize->setLineStep( 1 );
    Layout6->addWidget( kcfg_thumbnailMarginSize );
    Spacer7 = new TQSpacerItem( 20, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout6->addItem( Spacer7 );
    ConfigImageListPageLayout->addLayout( Layout6 );

    textLabel1 = new TQLabel( this, "textLabel1" );
    ConfigImageListPageLayout->addWidget( textLabel1 );

    layout6 = new TQGridLayout( 0, 1, 1, 0, 6, "layout6"); 
    spacer7 = new TQSpacerItem( 21, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout6->addItem( spacer7, 1, 0 );

    mShowFileName = new TQCheckBox( this, "mShowFileName" );

    layout6->addWidget( mShowFileName, 0, 1 );

    mShowImageSize = new TQCheckBox( this, "mShowImageSize" );

    layout6->addWidget( mShowImageSize, 3, 1 );

    mShowFileSize = new TQCheckBox( this, "mShowFileSize" );

    layout6->addWidget( mShowFileSize, 2, 1 );

    mShowFileDate = new TQCheckBox( this, "mShowFileDate" );

    layout6->addWidget( mShowFileDate, 1, 1 );
    ConfigImageListPageLayout->addLayout( layout6 );
    spacer10 = new TQSpacerItem( 21, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    ConfigImageListPageLayout->addItem( spacer10 );

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

    kcfg_storeThumbnailsInCache = new TQCheckBox( this, "kcfg_storeThumbnailsInCache" );
    ConfigImageListPageLayout->addWidget( kcfg_storeThumbnailsInCache );

    kcfg_deleteCacheOnExit = new TQCheckBox( this, "kcfg_deleteCacheOnExit" );
    ConfigImageListPageLayout->addWidget( kcfg_deleteCacheOnExit );

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

    mCalculateCacheSize = new TQPushButton( this, "mCalculateCacheSize" );
    layout7->addWidget( mCalculateCacheSize );

    mEmptyCache = new TQPushButton( this, "mEmptyCache" );
    layout7->addWidget( mEmptyCache );
    ConfigImageListPageLayout->addLayout( layout7 );
    languageChange();
    resize( TQSize(328, 411).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    TextLabel1->setBuddy( kcfg_thumbnailMarginSize );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigImageListPage::languageChange()
{
    setCaption( tr2i18n( "Configure Image List" ) );
    kcfg_showDirs->setText( tr2i18n( "&Show folders and archives" ) );
    TQWhatsThis::add( kcfg_showDirs, tr2i18n( "If enabled, folders and archives will be displayed alongside images in the browse view." ) );
    kcfg_loadMetadata->setText( tr2i18n( "Load &metadata from files" ) );
    TQWhatsThis::add( kcfg_loadMetadata, tr2i18n( "<p>This will cause metadata to be loaded from all the files in the current folder.</p>\n"
"<p>The metadata will be used to display the creation timestamp of the image instead of the file's mtime. Also, if the preview load fails, it may be used to display the image dimensions as a fallback.\n"
"</p>\n"
"<p>For this option to work, you will need to have appropriate file plugins from <i>tdegraphics</i> to be installed.\n"
"</p>\n"
"<p>This may have some performance impact when browsing very large folders.</p>" ) );
    textLabel1_2_2->setText( tr2i18n( "<b>Thumbnail View</b>" ) );
    TextLabel1->setText( tr2i18n( "&Margin between thumbnails:" ) );
    TQWhatsThis::add( kcfg_thumbnailMarginSize, tr2i18n( "This is the distance in pixel between items in thumbnail view." ) );
    textLabel1->setText( tr2i18n( "Information to display in the thumbnail text:" ) );
    mShowFileName->setText( tr2i18n( "File &name" ) );
    TQWhatsThis::add( mShowFileName, tr2i18n( "<p>Whether to display the filename in thumbnail view with information on the bottom.</p>\n"
"<p>\n"
"In thumbnail view with text on the right, this is always displayed.</p>" ) );
    mShowImageSize->setText( tr2i18n( "&Image size" ) );
    TQWhatsThis::add( mShowImageSize, tr2i18n( "<p>Whether to display the image dimensions in thumbnail view with information on the bottom if available.</p>\n"
"<p>\n"
"The dimensions will be calculated when loading the previews. If the preview loading fails, the information will be queried from image metadata (if the \"<i>Load metadata from files</i>\" option is enabled).</p>\n"
"<p>\n"
"In thumbnail view with text on the right, this is always displayed.</p>" ) );
    mShowFileSize->setText( tr2i18n( "File si&ze" ) );
    TQWhatsThis::add( mShowFileSize, tr2i18n( "<p>Whether to display the filesize in thumbnail view with information on the bottom.</p>\n"
"<p>\n"
"In thumbnail view with text on the right, this is always displayed.</p>" ) );
    mShowFileDate->setText( tr2i18n( "File &date" ) );
    TQWhatsThis::add( mShowFileDate, tr2i18n( "<p>Whether to display the file's timestamp in thumbnail view with information on the bottom.</p>\n"
"<p>\n"
"If \"<i>Load metadata from files</i>\" option is enabled and the metadata is available in the file this will display file creation date. Otherwice the file modification time (mtime) will be used instead.</p>\n"
"<p>\n"
"In thumbnail view with text on the right, this is always displayed.</p>" ) );
    textLabel1_2->setText( tr2i18n( "<b>Thumbnail Cache</b>" ) );
    kcfg_storeThumbnailsInCache->setText( tr2i18n( "Store thumbnails in &cache" ) );
    TQWhatsThis::add( kcfg_storeThumbnailsInCache, tr2i18n( "<p>Save generated thumbnails in the dedicated cache directory. This will speed up the thumbnail load in the future.</p>\n"
"<p>\n"
"The cache directory is usually located in <i>~/.tumbnails</i>.</p>" ) );
    kcfg_deleteCacheOnExit->setText( tr2i18n( "Automatically &empty thumbnail cache on exit" ) );
    TQWhatsThis::add( kcfg_deleteCacheOnExit, tr2i18n( "If this option is enabled, all the files in the thumbnail cache directory will be removed on exit from the gwenview." ) );
    mCalculateCacheSize->setText( tr2i18n( "Calculate Cache Size" ) );
    mEmptyCache->setText( tr2i18n( "Empty Cache" ) );
}

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

TQMetaObject *ConfigImageListPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigImageListPage( "ConfigImageListPage", &ConfigImageListPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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