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

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

#include "configmiscpage.h"

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

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

    textLabel1_2_2_2 = new TQLabel( this, "textLabel1_2_2_2" );
    ConfigMiscPageLayout->addWidget( textLabel1_2_2_2 );

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

    mModifyAsk = new TQRadioButton( kcfg_modifiedBehavior, "mModifyAsk" );
    mModifyAsk->setChecked( true );
    kcfg_modifiedBehavior->insert( mModifyAsk, 0 );
    kcfg_modifiedBehaviorLayout->addWidget( mModifyAsk );

    mModifySave = new TQRadioButton( kcfg_modifiedBehavior, "mModifySave" );
    kcfg_modifiedBehavior->insert( mModifySave, 1 );
    kcfg_modifiedBehaviorLayout->addWidget( mModifySave );

    mModifyDiscard = new TQRadioButton( kcfg_modifiedBehavior, "mModifyDiscard" );
    kcfg_modifiedBehavior->insert( mModifyDiscard, 2 );
    kcfg_modifiedBehaviorLayout->addWidget( mModifyDiscard );
    ConfigMiscPageLayout->addWidget( kcfg_modifiedBehavior );
    spacer1 = new TQSpacerItem( 20, 24, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    ConfigMiscPageLayout->addItem( spacer1 );

    kcfg_autoRotateImages = new TQCheckBox( this, "kcfg_autoRotateImages" );
    kcfg_autoRotateImages->setChecked( true );
    ConfigMiscPageLayout->addWidget( kcfg_autoRotateImages );
    spacer1_2 = new TQSpacerItem( 20, 24, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    ConfigMiscPageLayout->addItem( spacer1_2 );

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

    layout1 = new TQGridLayout( 0, 1, 1, 0, 6, "layout1"); 
    spacer6 = new TQSpacerItem( 11, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout1->addItem( spacer6, 1, 0 );

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

    layout1->addWidget( kcfg_rememberURL, 1, 1 );

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

    layout1->addWidget( kcfg_rememberFilter, 0, 1 );
    ConfigMiscPageLayout->addLayout( layout1 );
    spacer5 = new TQSpacerItem( 21, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    ConfigMiscPageLayout->addItem( spacer5 );
    languageChange();
    resize( TQSize(457, 303).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConfigMiscPage::languageChange()
{
    setCaption( tr2i18n( "Miscellaneous Settings" ) );
    textLabel1_2_2_2->setText( tr2i18n( "What to do when leaving a modified image" ) );
    kcfg_modifiedBehavior->setTitle( TQString::null );
    mModifyAsk->setText( tr2i18n( "Ask" ) );
    mModifySave->setText( tr2i18n( "Save silently" ) );
    mModifyDiscard->setText( tr2i18n( "Discard changes" ) );
    kcfg_autoRotateImages->setText( tr2i18n( "Automatically rotate images on load" ) );
    textLabel1->setText( tr2i18n( "Which settings should be remembered next time you start Gwenview" ) );
    kcfg_rememberURL->setText( tr2i18n( "Last opened URL" ) );
    kcfg_rememberFilter->setText( tr2i18n( "State of filter" ) );
}

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

TQMetaObject *ConfigMiscPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConfigMiscPage( "ConfigMiscPage", &ConfigMiscPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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