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

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

#include "diagrampropertiespage.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqspinbox.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqtextedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a DiagramPropertiesPage as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
DiagramPropertiesPage::DiagramPropertiesPage( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "DiagramPropertiesPage" );
    DiagramPropertiesPageLayout = new TQVBoxLayout( this, 11, 6, "DiagramPropertiesPageLayout"); 

    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 );

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

    TextLabel1 = new TQLabel( GroupBox1, "TextLabel1" );
    Layout4->addWidget( TextLabel1 );

    diagramName = new TQLineEdit( GroupBox1, "diagramName" );
    Layout4->addWidget( diagramName );
    GroupBox1Layout->addLayout( Layout4 );

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

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

    TextLabel4 = new TQLabel( GroupBox1, "TextLabel4" );
    layout6->addWidget( TextLabel4 );

    zoom = new TQSpinBox( GroupBox1, "zoom" );
    zoom->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, zoom->sizePolicy().hasHeightForWidth() ) );
    zoom->setMaxValue( 500 );
    zoom->setMinValue( 10 );
    layout6->addWidget( zoom );

    textLabel1 = new TQLabel( GroupBox1, "textLabel1" );
    layout6->addWidget( textLabel1 );
    layout20->addLayout( layout6 );
    Spacer1 = new TQSpacerItem( 50, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout20->addItem( Spacer1 );

    showOpSigs = new TQCheckBox( GroupBox1, "showOpSigs" );
    layout20->addWidget( showOpSigs );
    GroupBox1Layout->addLayout( layout20 );

    Line1 = new TQFrame( GroupBox1, "Line1" );
    Line1->setFrameShape( TQFrame::HLine );
    Line1->setFrameShadow( TQFrame::Sunken );
    Line1->setFrameShape( TQFrame::HLine );
    GroupBox1Layout->addWidget( Line1 );

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

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

    showGrid = new TQCheckBox( GroupBox1, "showGrid" );
    layout6_2->addWidget( showGrid );

    snapToGrid = new TQCheckBox( GroupBox1, "snapToGrid" );
    layout6_2->addWidget( snapToGrid );

    snapComponentSizeToGrid = new TQCheckBox( GroupBox1, "snapComponentSizeToGrid" );
    layout6_2->addWidget( snapComponentSizeToGrid );
    layout7->addLayout( layout6_2 );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout7->addItem( Spacer2 );
    GroupBox1Layout->addLayout( layout7 );

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

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

    TextLabel2 = new TQLabel( GroupBox1, "TextLabel2" );
    Layout1->addWidget( TextLabel2 );

    TextLabelX = new TQLabel( GroupBox1, "TextLabelX" );
    Layout1->addWidget( TextLabelX );

    gridSpaceX = new TQSpinBox( GroupBox1, "gridSpaceX" );
    gridSpaceX->setMaxValue( 100 );
    gridSpaceX->setMinValue( 5 );
    Layout1->addWidget( gridSpaceX );

    TextLabel3 = new TQLabel( GroupBox1, "TextLabel3" );
    Layout1->addWidget( TextLabel3 );

    gridSpaceY = new TQSpinBox( GroupBox1, "gridSpaceY" );
    gridSpaceY->setMaxValue( 100 );
    gridSpaceY->setMinValue( 5 );
    Layout1->addWidget( gridSpaceY );
    layout8->addLayout( Layout1 );
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout8->addItem( Spacer3 );
    GroupBox1Layout->addLayout( layout8 );

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

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

    TextLabe15 = new TQLabel( GroupBox1, "TextLabe15" );
    Layout1_2->addWidget( TextLabe15 );

    lineWidth = new TQSpinBox( GroupBox1, "lineWidth" );
    lineWidth->setMaxValue( 10 );
    lineWidth->setMinValue( 0 );
    Layout1_2->addWidget( lineWidth );
    layout10->addLayout( Layout1_2 );
    Spacer4 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout10->addItem( Spacer4 );
    GroupBox1Layout->addLayout( layout10 );
    DiagramPropertiesPageLayout->addWidget( GroupBox1 );

    GroupBox2 = new TQGroupBox( this, "GroupBox2" );
    GroupBox2->setColumnLayout(0, TQt::Vertical );
    GroupBox2->layout()->setSpacing( 6 );
    GroupBox2->layout()->setMargin( 11 );
    GroupBox2Layout = new TQGridLayout( GroupBox2->layout() );
    GroupBox2Layout->setAlignment( TQt::AlignTop );

    documentation = new TQTextEdit( GroupBox2, "documentation" );

    GroupBox2Layout->addWidget( documentation, 0, 0 );
    DiagramPropertiesPageLayout->addWidget( GroupBox2 );
    languageChange();
    resize( TQSize(388, 388).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DiagramPropertiesPage::languageChange()
{
    GroupBox1->setTitle( tr2i18n( "Diagram Properties" ) );
    TextLabel1->setText( tr2i18n( "Name:" ) );
    TextLabel4->setText( tr2i18n( "Zoom:" ) );
    textLabel1->setText( tr2i18n( "%" ) );
    showOpSigs->setText( tr2i18n( "Show operation signature" ) );
    showGrid->setText( tr2i18n( "Show &grid" ) );
    snapToGrid->setText( tr2i18n( "Snap &to grid" ) );
    snapComponentSizeToGrid->setText( tr2i18n( "Snap component size" ) );
    TQWhatsThis::add( snapComponentSizeToGrid, tr2i18n( "Snap the size of the components to be a multiple of the grid spacing.\n"
"If 'Snap to Grid' is enabled a component will always be aligned with the grid on all 4 sides." ) );
    TextLabel2->setText( tr2i18n( "Grid spacing:  " ) );
    TextLabelX->setText( tr2i18n( "X" ) );
    TextLabel3->setText( tr2i18n( "Y" ) );
    TextLabe15->setText( tr2i18n( "Line width:  " ) );
    GroupBox2->setTitle( tr2i18n( "Documentation" ) );
}

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

TQMetaObject *DiagramPropertiesPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_DiagramPropertiesPage( "DiagramPropertiesPage", &DiagramPropertiesPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* DiagramPropertiesPage::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(
	"DiagramPropertiesPage", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_DiagramPropertiesPage.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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