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

#include "gotolinedialog.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "../interfaces/editorinterface.h"
#include "gotolinedialog.ui.h"

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

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

    GotoLineDialogLayout->addWidget( TextLabel1, 0, 0 );

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

    GotoLineDialogLayout->addWidget( spinLine, 0, 1 );

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Spacer2 );

    PushButton2 = new TQPushButton( this, "PushButton2" );
    PushButton2->setDefault( true );
    Layout1->addWidget( PushButton2 );

    PushButton1 = new TQPushButton( this, "PushButton1" );
    Layout1->addWidget( PushButton1 );

    GotoLineDialogLayout->addMultiCellLayout( Layout1, 2, 2, 0, 1 );
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GotoLineDialogLayout->addItem( Spacer3, 1, 1 );
    languageChange();
    resize( TQSize(243, 85).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( PushButton1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( PushButton2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( gotoLine() ) );

    // buddies
    TextLabel1->setBuddy( spinLine );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GotoLineDialog::languageChange()
{
    setCaption( tr( "Goto Line" ) );
    TextLabel1->setText( tr( "&Line:" ) );
    PushButton2->setText( tr( "&Goto" ) );
    PushButton1->setText( tr( "&Close" ) );
}

