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

#include "topicchooser.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    label = new TQLabel( this, "label" );
    TopicChooserBaseLayout->addWidget( label );

    listbox = new TQListBox( this, "listbox" );
    TopicChooserBaseLayout->addWidget( listbox );

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

    buttonDisplay = new TQPushButton( this, "buttonDisplay" );
    buttonDisplay->setAutoDefault( true );
    buttonDisplay->setDefault( true );
    Layout16->addWidget( buttonDisplay );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout16->addWidget( buttonCancel );
    TopicChooserBaseLayout->addLayout( Layout16 );
    languageChange();
    resize( TQSize(391, 223).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonDisplay, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( listbox, TQ_SIGNAL( doubleClicked(TQListBoxItem*) ), this, TQ_SLOT( accept() ) );
    connect( listbox, TQ_SIGNAL( returnPressed(TQListBoxItem*) ), this, TQ_SLOT( accept() ) );

    // buddies
    label->setBuddy( listbox );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TopicChooserBase::languageChange()
{
    setCaption( tr( "Choose Topic" ) );
    TQWhatsThis::add( this, tr( "Select a topic from the list and click the <b>Display</b>-button to open the online help." ) );
    label->setText( tr( "&Topics" ) );
    TQWhatsThis::add( listbox, tr( "Displays a list of available help topics for the keyword." ) );
    buttonDisplay->setText( tr( "&Display" ) );
    TQWhatsThis::add( buttonDisplay, tr( "Open the topic selected in the list." ) );
    buttonCancel->setText( tr( "&Close" ) );
    TQWhatsThis::add( buttonCancel, tr( "Close the Dialog." ) );
}

void TopicChooserBase::init()
{
}

void TopicChooserBase::destroy()
{
}

