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

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

#include "page_looknfeelbase.h"

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

/*
 *  Constructs a PageLooknFeelBase which is a child of 'parent', with the
 *  name 'name'.' 
 */
PageLooknFeelBase::PageLooknFeelBase( TQWidget* parent,  const char* name )
    : TQFrame( parent, name )
{
    if ( !name )
	setName( "PageLooknFeelBase" );
    setMinimumSize( TQSize( 425, 450 ) );
    setFrameShape( TQFrame::NoFrame );
    setFrameShadow( TQFrame::Plain );
    PageLooknFeelBaseLayout = new TQVBoxLayout( this, 0, 6, "PageLooknFeelBaseLayout"); 

    windowModeGB = new TQButtonGroup( this, "windowModeGB" );
    windowModeGB->setFrameShape( TQButtonGroup::Box );
    windowModeGB->setFrameShadow( TQButtonGroup::Sunken );
    windowModeGB->setColumnLayout(0, TQt::Vertical );
    windowModeGB->layout()->setSpacing( 6 );
    windowModeGB->layout()->setMargin( 11 );
    windowModeGBLayout = new TQGridLayout( windowModeGB->layout() );
    windowModeGBLayout->setAlignment( TQt::AlignTop );
    Spacer1 = new TQSpacerItem( 20, 31, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    windowModeGBLayout->addItem( Spacer1, 4, 0 );

    mdiCB = new TQRadioButton( windowModeGB, "mdiCB" );
    mdiCB->setChecked( false );
    windowModeGB->insert( mdiCB, 0 );

    windowModeGBLayout->addWidget( mdiCB, 3, 0 );
    Spacer1_2 = new TQSpacerItem( 20, 31, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    windowModeGBLayout->addItem( Spacer1_2, 1, 0 );

    wmLabel = new TQLabel( windowModeGB, "wmLabel" );
    wmLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );

    windowModeGBLayout->addWidget( wmLabel, 0, 0 );

    sdiCB = new TQRadioButton( windowModeGB, "sdiCB" );
    sdiCB->setChecked( true );
    windowModeGB->insert( sdiCB, 0 );

    windowModeGBLayout->addWidget( sdiCB, 2, 0 );

    Frame3 = new TQFrame( windowModeGB, "Frame3" );
    Frame3->setMinimumSize( TQSize( 120, 120 ) );
    Frame3->setMaximumSize( TQSize( 120, 120 ) );
    Frame3->setFrameShape( TQFrame::StyledPanel );
    Frame3->setFrameShadow( TQFrame::Raised );

    modePreview = new TQLabel( Frame3, "modePreview" );
    modePreview->setGeometry( TQRect( 10, 10, 100, 100 ) );
    modePreview->setScaledContents( true );

    windowModeGBLayout->addMultiCellWidget( Frame3, 1, 4, 1, 1 );
    PageLooknFeelBaseLayout->addWidget( windowModeGB );

    wallpaperGB = new TQGroupBox( this, "wallpaperGB" );
    wallpaperGB->setColumnLayout(0, TQt::Vertical );
    wallpaperGB->layout()->setSpacing( 6 );
    wallpaperGB->layout()->setMargin( 11 );
    wallpaperGBLayout = new TQHBoxLayout( wallpaperGB->layout() );
    wallpaperGBLayout->setAlignment( TQt::AlignTop );

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

    wallpaperPathLE = new KURLRequester( wallpaperGB, "wallpaperPathLE" );
    wallpaperPathLE->setMinimumSize( TQSize( 100, 25 ) );
    wallpaperPathLE->setMaximumSize( TQSize( 32767, 30 ) );
    Layout4->addWidget( wallpaperPathLE );
    wallpaperGBLayout->addLayout( Layout4 );

    Frame3_2 = new TQFrame( wallpaperGB, "Frame3_2" );
    Frame3_2->setMinimumSize( TQSize( 120, 120 ) );
    Frame3_2->setMaximumSize( TQSize( 120, 120 ) );
    Frame3_2->setFrameShape( TQFrame::StyledPanel );
    Frame3_2->setFrameShadow( TQFrame::Raised );

    wallpaperPreview = new TQLabel( Frame3_2, "wallpaperPreview" );
    wallpaperPreview->setGeometry( TQRect( 10, 10, 100, 100 ) );
    wallpaperPreview->setScaledContents( true );
    wallpaperGBLayout->addWidget( Frame3_2 );
    PageLooknFeelBaseLayout->addWidget( wallpaperGB );
    spacer5 = new TQSpacerItem( 51, 1, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    PageLooknFeelBaseLayout->addItem( spacer5 );
    languageChange();
    resize( TQSize(425, 452).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( sdiCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( sdiCB, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( setPreviewPixmap(bool) ) );
    connect( mdiCB, TQ_SIGNAL( clicked() ), this, TQ_SLOT( changed() ) );
    connect( wallpaperPathLE, TQ_SIGNAL( textChanged(const TQString &) ), this, TQ_SLOT( showWallpaperPixmap(const TQString&) ) );
    connect( wallpaperPathLE, TQ_SIGNAL( textChanged(const TQString &) ), this, TQ_SLOT( changed() ) );

    // tab order
    setTabOrder( sdiCB, wallpaperPathLE );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PageLooknFeelBase::languageChange()
{
    setCaption( tr2i18n( "LooknFeel" ) );
    windowModeGB->setTitle( tr2i18n( "Window Mode" ) );
    mdiCB->setText( tr2i18n( "&Paged MDI mode (XChat)" ) );
    wmLabel->setText( tr2i18n( "Choose your favorite window mode:" ) );
    sdiCB->setText( tr2i18n( "&SDI mode (old behavior)" ) );
    wallpaperGB->setTitle( tr2i18n( "Wallpaper" ) );
}

void PageLooknFeelBase::setPreviewPixmap(bool)
{
    tqWarning( "PageLooknFeelBase::setPreviewPixmap(bool): Not implemented yet" );
}

void PageLooknFeelBase::showWallpaperPixmap(const TQString&)
{
    tqWarning( "PageLooknFeelBase::showWallpaperPixmap(const TQString&): Not implemented yet" );
}

void PageLooknFeelBase::changed()
{
    tqWarning( "PageLooknFeelBase::changed(): Not implemented yet" );
}

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

TQMetaObject *PageLooknFeelBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PageLooknFeelBase( "PageLooknFeelBase", &PageLooknFeelBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* PageLooknFeelBase::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 = TQFrame::staticMetaObject();
    static const TQUMethod slot_0 = {"changed", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"setPreviewPixmap", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"showWallpaperPixmap", 1, param_slot_3 };
    static const TQMetaData slot_tbl[] = {
	{ "changed()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected },
	{ "setPreviewPixmap(bool)", &slot_2, TQMetaData::Protected },
	{ "showWallpaperPixmap(const TQString&)", &slot_3, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"PageLooknFeelBase", parentObject,
	slot_tbl, 4,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_PageLooknFeelBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool PageLooknFeelBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: changed(); break;
    case 1: languageChange(); break;
    case 2: setPreviewPixmap((bool)static_QUType_bool.get(_o+1)); break;
    case 3: showWallpaperPixmap((const TQString&)static_QUType_TQString.get(_o+1)); break;
    default:
	return TQFrame::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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