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

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

#include "kgallerydialogbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqframe.h>
#include <ntqsplitter.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    textLabel1_2->setAlignment( int( TQLabel::AlignVCenter ) );
    layout4->addWidget( textLabel1_2 );

    lineName = new TQLineEdit( this, "lineName" );
    layout4->addWidget( lineName );
    layout13->addLayout( layout4 );

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

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

    lineAddress = new TQLineEdit( this, "lineAddress" );
    layout3->addWidget( lineAddress );
    layout13->addLayout( layout3 );

    layout12 = new TQVBoxLayout( 0, 0, 6, "layout12"); 
    spacer4 = new TQSpacerItem( 20, 10, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    layout12->addItem( spacer4 );

    buttonAdd = new TQPushButton( this, "buttonAdd" );
    buttonAdd->setMinimumSize( TQSize( 100, 0 ) );
    layout12->addWidget( buttonAdd );
    layout13->addLayout( layout12 );
    KGalleryDialogBaseLayout->addLayout( layout13 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );
    KGalleryDialogBaseLayout->addWidget( line1 );

    _split = new TQSplitter( this, "_split" );
    _split->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, _split->sizePolicy().hasHeightForWidth() ) );
    _split->setOrientation( TQSplitter::Horizontal );

    listServers = new TQListView( _split, "listServers" );
    listServers->addColumn( tr2i18n( "Servers" ) );
    listServers->addColumn( tr2i18n( "Address" ) );
    listServers->header()->setClickEnabled( false, listServers->header()->count() - 1 );
    listServers->setAllColumnsShowFocus( true );
    listServers->setShowSortIndicator( true );

    listDocuments = new TQListView( _split, "listDocuments" );
    listDocuments->addColumn( tr2i18n( "Description" ) );
    listDocuments->addColumn( tr2i18n( "Language" ) );
    listDocuments->addColumn( tr2i18n( "Category" ) );
    listDocuments->addColumn( tr2i18n( "Type" ) );
    listDocuments->addColumn( tr2i18n( "Author" ) );
    listDocuments->addColumn( tr2i18n( "Address" ) );
    listDocuments->setAllColumnsShowFocus( true );
    listDocuments->setShowSortIndicator( true );
    KGalleryDialogBaseLayout->addWidget( _split );

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

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setMinimumSize( TQSize( 100, 0 ) );
    layout2->addWidget( buttonHelp );
    spacer2 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout2->addItem( spacer2 );

    buttonOpen = new TQPushButton( this, "buttonOpen" );
    buttonOpen->setMinimumSize( TQSize( 100, 0 ) );
    buttonOpen->setDefault( true );
    layout2->addWidget( buttonOpen );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setMinimumSize( TQSize( 100, 0 ) );
    layout2->addWidget( buttonCancel );
    KGalleryDialogBaseLayout->addLayout( layout2 );
    languageChange();
    resize( TQSize(657, 400).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotButtonAdd() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( buttonOpen, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( listServers, TQ_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQ_SLOT( slotServerSelected(TQListViewItem*) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KGalleryDialogBase::languageChange()
{
    setCaption( tr2i18n( "Gallery" ) );
    textLabel1_2->setText( tr2i18n( "Name:" ) );
    textLabel2->setText( tr2i18n( "Address:" ) );
    buttonAdd->setText( tr2i18n( "&Add Server" ) );
    listServers->header()->setLabel( 0, tr2i18n( "Servers" ) );
    listServers->header()->setLabel( 1, tr2i18n( "Address" ) );
    listDocuments->header()->setLabel( 0, tr2i18n( "Description" ) );
    listDocuments->header()->setLabel( 1, tr2i18n( "Language" ) );
    listDocuments->header()->setLabel( 2, tr2i18n( "Category" ) );
    listDocuments->header()->setLabel( 3, tr2i18n( "Type" ) );
    listDocuments->header()->setLabel( 4, tr2i18n( "Author" ) );
    listDocuments->header()->setLabel( 5, tr2i18n( "Address" ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonOpen->setText( tr2i18n( "&Open" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

void KGalleryDialogBase::slotButtonAdd()
{
    tqWarning( "KGalleryDialogBase::slotButtonAdd(): Not implemented yet" );
}

void KGalleryDialogBase::slotServerSelected(TQListViewItem*)
{
    tqWarning( "KGalleryDialogBase::slotServerSelected(TQListViewItem*): Not implemented yet" );
}

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

TQMetaObject *KGalleryDialogBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KGalleryDialogBase( "KGalleryDialogBase", &KGalleryDialogBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KGalleryDialogBase::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 = {"slotButtonAdd", 0, 0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_ptr, "TQListViewItem", TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"slotServerSelected", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "slotButtonAdd()", &slot_0, TQMetaData::Public },
	{ "slotServerSelected(TQListViewItem*)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KGalleryDialogBase", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KGalleryDialogBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KGalleryDialogBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotButtonAdd(); break;
    case 1: slotServerSelected((TQListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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