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

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

#include "filepropspagebase.h"

#include <ntqvariant.h>
#include <kdialog.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqmultilineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a FilePropsPageBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
FilePropsPageBase::FilePropsPageBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "Form1" );
    Form1Layout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "Form1Layout"); 

    GroupBox7 = new TQGroupBox( this, "GroupBox7" );
    GroupBox7->setColumnLayout(0, TQt::Vertical );
    GroupBox7->layout()->setSpacing( KDialog::spacingHint() );
    GroupBox7->layout()->setMargin( KDialog::marginHint() );
    GroupBox7Layout = new TQGridLayout( GroupBox7->layout() );
    GroupBox7Layout->setAlignment( TQt::AlignTop );

    TextLabel1_2 = new TQLabel( GroupBox7, "TextLabel1_2" );

    GroupBox7Layout->addWidget( TextLabel1_2, 0, 0 );

    classname_edit = new KLineEdit( GroupBox7, "classname_edit" );

    GroupBox7Layout->addWidget( classname_edit, 1, 0 );

    TextLabel2_2 = new TQLabel( GroupBox7, "TextLabel2_2" );

    GroupBox7Layout->addWidget( TextLabel2_2, 2, 0 );

    baseclass_edit = new KLineEdit( GroupBox7, "baseclass_edit" );

    GroupBox7Layout->addWidget( baseclass_edit, 3, 0 );

    headerfile_edit = new KLineEdit( GroupBox7, "headerfile_edit" );

    GroupBox7Layout->addWidget( headerfile_edit, 1, 1 );

    implfile_label = new TQLabel( GroupBox7, "implfile_label" );

    GroupBox7Layout->addWidget( implfile_label, 2, 1 );

    headerfile_label = new TQLabel( GroupBox7, "headerfile_label" );

    GroupBox7Layout->addWidget( headerfile_label, 0, 1 );

    implfile_edit = new KLineEdit( GroupBox7, "implfile_edit" );

    GroupBox7Layout->addWidget( implfile_edit, 3, 1 );

    Form1Layout->addMultiCellWidget( GroupBox7, 2, 2, 0, 1 );

    TextLabel5 = new TQLabel( this, "TextLabel5" );

    Form1Layout->addWidget( TextLabel5, 0, 0 );

    TextLabel6 = new TQLabel( this, "TextLabel6" );

    Form1Layout->addWidget( TextLabel6, 0, 1 );

    classes_listbox = new TQListBox( this, "classes_listbox" );
    classes_listbox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, classes_listbox->sizePolicy().hasHeightForWidth() ) );

    Form1Layout->addWidget( classes_listbox, 1, 0 );

    desc_textview = new TQMultiLineEdit( this, "desc_textview" );
    desc_textview->setEnabled( true );
    desc_textview->setWordWrap( TQMultiLineEdit::WidgetWidth );
    desc_textview->setReadOnly( true );

    Form1Layout->addWidget( desc_textview, 1, 1 );
    languageChange();
    resize( TQSize(410, 366).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( classname_edit, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( slotClassnameChanged(const TQString&) ) );
    connect( classes_listbox, TQ_SIGNAL( mouseButtonClicked(int,QListBoxItem*,const TQPoint&) ), this, TQ_SLOT( slotSelectionChanged() ) );

    // tab order
    setTabOrder( classes_listbox, classname_edit );
    setTabOrder( classname_edit, headerfile_edit );
    setTabOrder( headerfile_edit, baseclass_edit );
    setTabOrder( baseclass_edit, implfile_edit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void FilePropsPageBase::languageChange()
{
    GroupBox7->setTitle( tr2i18n( "Customize" ) );
    TextLabel1_2->setText( tr2i18n( "Class name:" ) );
    TextLabel2_2->setText( tr2i18n( "Base class:" ) );
    implfile_label->setText( tr2i18n( "Implementation file:" ) );
    headerfile_label->setText( tr2i18n( "Header file:" ) );
    TextLabel5->setText( tr2i18n( "Classes:" ) );
    TextLabel6->setText( tr2i18n( "Description:" ) );
    desc_textview->setText( TQString::null );
}

void FilePropsPageBase::slotSelectionChanged()
{
    tqWarning( "FilePropsPageBase::slotSelectionChanged(): Not implemented yet" );
}

void FilePropsPageBase::slotClassnameChanged(const TQString&)
{
    tqWarning( "FilePropsPageBase::slotClassnameChanged(const TQString&): Not implemented yet" );
}

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

TQMetaObject *FilePropsPageBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_FilePropsPageBase( "FilePropsPageBase", &FilePropsPageBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool FilePropsPageBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: slotSelectionChanged(); break;
    case 1: slotClassnameChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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