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

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

#include "fontfamilychoosers.h"

#include <ntqvariant.h>
#include <kpushbutton.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqbuttongroup.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a fontFamilyChooserS 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.
 */
fontFamilyChooserS::fontFamilyChooserS( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "fontFamilyChooserS" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( true );
    fontFamilyChooserSLayout = new TQGridLayout( this, 1, 1, 11, 6, "fontFamilyChooserSLayout"); 

    layout42 = new TQVBoxLayout( 0, 0, 6, "layout42"); 

    layout40 = new TQVBoxLayout( 0, 0, 6, "layout40"); 

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

    layout36 = new TQVBoxLayout( 0, 0, 6, "layout36"); 

    layout20 = new TQVBoxLayout( 0, 0, 6, "layout20"); 

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

    lbAvailable = new TQListBox( this, "lbAvailable" );
    layout20->addWidget( lbAvailable );
    layout36->addLayout( layout20 );

    layout15 = new TQVBoxLayout( 0, 0, 6, "layout15"); 

    textLabel3 = new TQLabel( this, "textLabel3" );
    layout15->addWidget( textLabel3 );

    lbGeneric = new TQListBox( this, "lbGeneric" );
    lbGeneric->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, lbGeneric->sizePolicy().hasHeightForWidth() ) );
    layout15->addWidget( lbGeneric );
    layout36->addLayout( layout15 );
    layout39->addLayout( layout36 );

    layout38 = new TQVBoxLayout( 0, 0, 0, "layout38"); 
    spacer20 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout38->addItem( spacer20 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setEnabled( true );
    buttonGroup1->setFrameShape( TQButtonGroup::NoFrame );
    buttonGroup1->setFrameShadow( TQButtonGroup::Plain );
    buttonGroup1->setLineWidth( 2 );
    buttonGroup1->setMidLineWidth( 0 );
    buttonGroup1->setAlignment( int( TQButtonGroup::AlignCenter ) );
    buttonGroup1->setFlat( false );
    buttonGroup1->setRadioButtonExclusive( false );
    buttonGroup1->setProperty( "selectedId", -1 );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 0 );
    buttonGroup1->layout()->setMargin( 0 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    pbMoveUp = new KPushButton( buttonGroup1, "pbMoveUp" );
    pbMoveUp->setMinimumSize( TQSize( 22, 22 ) );
    pbMoveUp->setMaximumSize( TQSize( 22, 22 ) );

    buttonGroup1Layout->addWidget( pbMoveUp, 0, 1 );

    pbAdd = new KPushButton( buttonGroup1, "pbAdd" );
    pbAdd->setMinimumSize( TQSize( 22, 22 ) );
    pbAdd->setMaximumSize( TQSize( 22, 22 ) );

    buttonGroup1Layout->addWidget( pbAdd, 1, 2 );

    pbRemove = new KPushButton( buttonGroup1, "pbRemove" );
    pbRemove->setMinimumSize( TQSize( 22, 22 ) );
    pbRemove->setMaximumSize( TQSize( 22, 22 ) );

    buttonGroup1Layout->addWidget( pbRemove, 1, 0 );

    pbMoveDown = new KPushButton( buttonGroup1, "pbMoveDown" );
    pbMoveDown->setMinimumSize( TQSize( 22, 22 ) );
    pbMoveDown->setMaximumSize( TQSize( 22, 22 ) );

    buttonGroup1Layout->addMultiCellWidget( pbMoveDown, 2, 2, 1, 2 );
    layout38->addWidget( buttonGroup1 );
    spacer21 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout38->addItem( spacer21 );
    layout39->addLayout( layout38 );

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

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout6->addWidget( textLabel2 );

    lbSelected = new TQListBox( this, "lbSelected" );
    lbSelected->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, lbSelected->sizePolicy().hasHeightForWidth() ) );
    layout6->addWidget( lbSelected );
    layout39->addLayout( layout6 );
    layout40->addLayout( layout39 );

    lePreview = new TQLineEdit( this, "lePreview" );
    layout40->addWidget( lePreview );
    layout42->addLayout( layout40 );

    layout41 = new TQHBoxLayout( 0, 0, 6, "layout41"); 
    spacer1 = new TQSpacerItem( 313, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout41->addItem( spacer1 );

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

    pbOK = new KPushButton( this, "pbOK" );
    layout9->addWidget( pbOK );

    pbCancel = new KPushButton( this, "pbCancel" );
    layout9->addWidget( pbCancel );
    layout41->addLayout( layout9 );
    layout42->addLayout( layout41 );

    fontFamilyChooserSLayout->addLayout( layout42, 0, 0 );
    languageChange();
    resize( TQSize(487, 399).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pbCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( pbOK, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void fontFamilyChooserS::languageChange()
{
    setCaption( tr2i18n( "Font Family Chooser" ) );
    textLabel1->setText( tr2i18n( "Available system font families:" ) );
    textLabel3->setText( tr2i18n( "Generic family:" ) );
    lbGeneric->clear();
    lbGeneric->insertItem( tr2i18n( "cursive" ) );
    lbGeneric->insertItem( tr2i18n( "fantasy" ) );
    lbGeneric->insertItem( tr2i18n( "monospace" ) );
    lbGeneric->insertItem( tr2i18n( "sans-serif" ) );
    lbGeneric->insertItem( tr2i18n( "serif" ) );
    buttonGroup1->setTitle( TQString::null );
    pbMoveUp->setText( TQString::null );
    pbAdd->setText( TQString::null );
    pbRemove->setText( TQString::null );
    pbMoveDown->setText( TQString::null );
    textLabel2->setText( tr2i18n( "Selected font families:" ) );
    pbOK->setText( tr2i18n( "&OK" ) );
    pbCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *fontFamilyChooserS::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_fontFamilyChooserS( "fontFamilyChooserS", &fontFamilyChooserS::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* fontFamilyChooserS::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 TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"fontFamilyChooserS", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_fontFamilyChooserS.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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