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

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

#include "pluginselectdialogbase.h"

#include <ntqvariant.h>
#include <kurllabel.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    plugin_list = new TQListView( groupBox1, "plugin_list" );
    groupBox1Layout->addWidget( plugin_list );

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

    textLabel3 = new TQLabel( groupBox1, "textLabel3" );
    layout8->addWidget( textLabel3 );

    saveAsDefault_button = new TQPushButton( groupBox1, "saveAsDefault_button" );
    layout8->addWidget( saveAsDefault_button );
    groupBox1Layout->addLayout( layout8 );
    PluginSelectDialogBaseLayout->addWidget( groupBox1 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQVBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    plugin_description_label = new TQLabel( groupBox2, "plugin_description_label" );
    plugin_description_label->setMinimumSize( TQSize( 0, 40 ) );
    plugin_description_label->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    groupBox2Layout->addWidget( plugin_description_label );

    urllabel = new KURLLabel( groupBox2, "urllabel" );
    groupBox2Layout->addWidget( urllabel );
    PluginSelectDialogBaseLayout->addWidget( groupBox2 );

    layout1 = new TQHBoxLayout( 0, 0, 6, "layout1"); 
    spacer1 = new TQSpacerItem( 191, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer1 );

    ok_button = new TQPushButton( this, "ok_button" );
    layout1->addWidget( ok_button );

    cancel_button = new TQPushButton( this, "cancel_button" );
    layout1->addWidget( cancel_button );
    PluginSelectDialogBaseLayout->addLayout( layout1 );
    languageChange();
    resize( TQSize(587, 644).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( cancel_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( ok_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( saveAsDefault_button, TQ_SIGNAL( clicked() ), this, TQ_SLOT( saveAsDefault() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void PluginSelectDialogBase::languageChange()
{
    setCaption( tr2i18n( "Plugin Selection" ) );
    groupBox1->setTitle( tr2i18n( "Plugins:" ) );
    textLabel3->setText( tr2i18n( "Make this the default for this profile:" ) );
    saveAsDefault_button->setText( tr2i18n( "Save &as Default" ) );
    TQToolTip::add( saveAsDefault_button, TQString::null );
    groupBox2->setTitle( tr2i18n( "Description:" ) );
    plugin_description_label->setText( TQString::null );
    urllabel->setText( TQString::null );
    ok_button->setText( tr2i18n( "O&K" ) );
    cancel_button->setText( tr2i18n( "&Cancel" ) );
}

void PluginSelectDialogBase::saveAsDefault()
{
    tqWarning( "PluginSelectDialogBase::saveAsDefault(): Not implemented yet" );
}

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

TQMetaObject *PluginSelectDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_PluginSelectDialogBase( "PluginSelectDialogBase", &PluginSelectDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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