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

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

#include "umlrolepropertiesbase.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqtextedit.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a UMLRolePropertiesBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
UMLRolePropertiesBase::UMLRolePropertiesBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "UMLRolePropertiesBase" );

    TQWidget* privateLayoutWidget = new TQWidget( this, "layout6" );
    privateLayoutWidget->setGeometry( TQRect( 10, 10, 400, 520 ) );
    layout6 = new TQGridLayout( privateLayoutWidget, 1, 1, 11, 6, "layout6"); 

    propsGroupBox = new TQGroupBox( privateLayoutWidget, "propsGroupBox" );

    TQWidget* privateLayoutWidget_2 = new TQWidget( propsGroupBox, "layout5" );
    privateLayoutWidget_2->setGeometry( TQRect( 10, 30, 360, 70 ) );
    layout5 = new TQGridLayout( privateLayoutWidget_2, 1, 1, 11, 6, "layout5"); 

    roleNameLabel = new TQLabel( privateLayoutWidget_2, "roleNameLabel" );

    layout5->addWidget( roleNameLabel, 0, 0 );

    m_pMultiLE = new TQLineEdit( privateLayoutWidget_2, "m_pMultiLE" );

    layout5->addWidget( m_pMultiLE, 1, 1 );

    m_pRoleLE = new TQLineEdit( privateLayoutWidget_2, "m_pRoleLE" );

    layout5->addWidget( m_pRoleLE, 0, 1 );

    textLabel2 = new TQLabel( privateLayoutWidget_2, "textLabel2" );

    layout5->addWidget( textLabel2, 1, 0 );

    layout6->addWidget( propsGroupBox, 0, 0 );

    docGroupBox = new TQGroupBox( privateLayoutWidget, "docGroupBox" );
    docGroupBox->setColumnLayout(0, TQt::Vertical );
    docGroupBox->layout()->setSpacing( 6 );
    docGroupBox->layout()->setMargin( 11 );
    docGroupBoxLayout = new TQGridLayout( docGroupBox->layout() );
    docGroupBoxLayout->setAlignment( TQt::AlignTop );

    m_pDocTE = new TQTextEdit( docGroupBox, "m_pDocTE" );

    docGroupBoxLayout->addWidget( m_pDocTE, 0, 0 );

    layout6->addWidget( docGroupBox, 3, 0 );

    changeabilityButtonGroup = new TQButtonGroup( privateLayoutWidget, "changeabilityButtonGroup" );
    changeabilityButtonGroup->setColumnLayout(0, TQt::Vertical );
    changeabilityButtonGroup->layout()->setSpacing( 6 );
    changeabilityButtonGroup->layout()->setMargin( 11 );
    changeabilityButtonGroupLayout = new TQGridLayout( changeabilityButtonGroup->layout() );
    changeabilityButtonGroupLayout->setAlignment( TQt::AlignTop );

    layout2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout2"); 

    m_pAddOnlyRB = new TQRadioButton( changeabilityButtonGroup, "m_pAddOnlyRB" );

    layout2->addWidget( m_pAddOnlyRB, 0, 2 );

    m_pFrozenRB = new TQRadioButton( changeabilityButtonGroup, "m_pFrozenRB" );

    layout2->addWidget( m_pFrozenRB, 0, 1 );

    m_pChangeableRB = new TQRadioButton( changeabilityButtonGroup, "m_pChangeableRB" );
    m_pChangeableRB->setChecked( true );

    layout2->addWidget( m_pChangeableRB, 0, 0 );

    changeabilityButtonGroupLayout->addLayout( layout2, 0, 0 );

    layout6->addWidget( changeabilityButtonGroup, 2, 0 );

    visibilityButtonGroup = new TQButtonGroup( privateLayoutWidget, "visibilityButtonGroup" );
    visibilityButtonGroup->setColumnLayout(0, TQt::Vertical );
    visibilityButtonGroup->layout()->setSpacing( 6 );
    visibilityButtonGroup->layout()->setMargin( 11 );
    visibilityButtonGroupLayout = new TQGridLayout( visibilityButtonGroup->layout() );
    visibilityButtonGroupLayout->setAlignment( TQt::AlignTop );

    m_pPublicRB = new TQRadioButton( visibilityButtonGroup, "m_pPublicRB" );
    m_pPublicRB->setChecked( true );

    visibilityButtonGroupLayout->addWidget( m_pPublicRB, 0, 0 );

    m_pPrivateRB = new TQRadioButton( visibilityButtonGroup, "m_pPrivateRB" );

    visibilityButtonGroupLayout->addWidget( m_pPrivateRB, 0, 1 );

    m_pProtectedRB = new TQRadioButton( visibilityButtonGroup, "m_pProtectedRB" );

    visibilityButtonGroupLayout->addWidget( m_pProtectedRB, 0, 2 );

    m_pImplementationRB = new TQRadioButton( visibilityButtonGroup, "m_pImplementationRB" );

    visibilityButtonGroupLayout->addWidget( m_pImplementationRB, 0, 3 );

    layout6->addWidget( visibilityButtonGroup, 1, 0 );
    languageChange();
    resize( TQSize(572, 545).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void UMLRolePropertiesBase::languageChange()
{
    propsGroupBox->setTitle( tr2i18n( "Role Properties" ) );
    roleNameLabel->setText( tr2i18n( "Rolename:" ) );
    textLabel2->setText( tr2i18n( "Multiplicity:" ) );
    docGroupBox->setTitle( tr2i18n( "Documentation" ) );
    changeabilityButtonGroup->setTitle( tr2i18n( "Role Changeability" ) );
    m_pAddOnlyRB->setText( tr2i18n( "Add only" ) );
    m_pFrozenRB->setText( tr2i18n( "Frozen" ) );
    m_pChangeableRB->setText( tr2i18n( "Changeable" ) );
    visibilityButtonGroup->setTitle( tr2i18n( "Role Visibility" ) );
    m_pPublicRB->setText( tr2i18n( "Public" ) );
    m_pPrivateRB->setText( tr2i18n( "Private" ) );
    m_pProtectedRB->setText( tr2i18n( "Protected" ) );
    m_pImplementationRB->setText( tr2i18n( "Implementation" ) );
}

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

TQMetaObject *UMLRolePropertiesBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_UMLRolePropertiesBase( "UMLRolePropertiesBase", &UMLRolePropertiesBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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