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

#include "helpdialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqheader.h>
#include <ntqlistview.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlistbox.h>
#include <ntqframe.h>
#include <ntqprogressbar.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    tabWidget = new TQTabWidget( this, "tabWidget" );

    contentPage = new TQWidget( tabWidget, "contentPage" );
    contentPageLayout = new TQVBoxLayout( contentPage, 5, 6, "contentPageLayout"); 

    listContents = new TQListView( contentPage, "listContents" );
    listContents->addColumn( tr( "Column 1" ) );
    listContents->setRootIsDecorated( true );
    contentPageLayout->addWidget( listContents );
    tabWidget->insertTab( contentPage, TQString::fromLatin1("") );

    Widget8 = new TQWidget( tabWidget, "Widget8" );
    Widget8Layout = new TQVBoxLayout( Widget8, 5, 6, "Widget8Layout"); 

    TextLabel1 = new TQLabel( Widget8, "TextLabel1" );
    Widget8Layout->addWidget( TextLabel1 );

    editIndex = new TQLineEdit( Widget8, "editIndex" );
    Widget8Layout->addWidget( editIndex );

    listIndex = new TQListBox( Widget8, "listIndex" );
    Widget8Layout->addWidget( listIndex );
    tabWidget->insertTab( Widget8, TQString::fromLatin1("") );

    Widget9 = new TQWidget( tabWidget, "Widget9" );
    Widget9Layout = new TQVBoxLayout( Widget9, 5, 6, "Widget9Layout"); 

    listBookmarks = new TQListView( Widget9, "listBookmarks" );
    listBookmarks->addColumn( tr( "Column 1" ) );
    Widget9Layout->addWidget( listBookmarks );

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

    buttonAdd = new TQPushButton( Widget9, "buttonAdd" );
    Layout3->addWidget( buttonAdd );

    buttonRemove = new TQPushButton( Widget9, "buttonRemove" );
    Layout3->addWidget( buttonRemove );
    Widget9Layout->addLayout( Layout3 );
    tabWidget->insertTab( Widget9, TQString::fromLatin1("") );

    searchTab = new TQWidget( tabWidget, "searchTab" );
    searchTabLayout = new TQGridLayout( searchTab, 1, 1, 5, 6, "searchTabLayout"); 
    Spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    searchTabLayout->addItem( Spacer3, 3, 0 );

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

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

    termsEdit = new TQLineEdit( searchTab, "termsEdit" );

    searchTabLayout->addWidget( termsEdit, 1, 0 );

    resultBox = new TQListBox( searchTab, "resultBox" );

    searchTabLayout->addWidget( resultBox, 5, 0 );

    TextLabel2 = new TQLabel( searchTab, "TextLabel2" );

    searchTabLayout->addWidget( TextLabel2, 4, 0 );

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

    helpButton = new TQPushButton( searchTab, "helpButton" );
    Layout2->addWidget( helpButton );
    Spacer2 = new TQSpacerItem( 61, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout2->addItem( Spacer2 );

    searchButton = new TQPushButton( searchTab, "searchButton" );
    Layout2->addWidget( searchButton );

    searchTabLayout->addLayout( Layout2, 2, 0 );
    tabWidget->insertTab( searchTab, TQString::fromLatin1("") );
    HelpDialogBaseLayout->addWidget( tabWidget );

    framePrepare = new TQFrame( this, "framePrepare" );
    framePrepare->setFrameShape( TQFrame::StyledPanel );
    framePrepare->setFrameShadow( TQFrame::Raised );
    framePrepareLayout = new TQHBoxLayout( framePrepare, 3, 6, "framePrepareLayout"); 

    labelPrepare = new TQLabel( framePrepare, "labelPrepare" );
    framePrepareLayout->addWidget( labelPrepare );

    progressPrepare = new TQProgressBar( framePrepare, "progressPrepare" );
    framePrepareLayout->addWidget( progressPrepare );
    HelpDialogBaseLayout->addWidget( framePrepare );
    languageChange();
    resize( TQSize(268, 448).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonAdd, TQ_SIGNAL( clicked() ), this, TQ_SLOT( addBookmark() ) );
    connect( buttonRemove, TQ_SIGNAL( clicked() ), this, TQ_SLOT( removeBookmark() ) );
    connect( termsEdit, TQ_SIGNAL( returnPressed() ), searchButton, TQ_SLOT( animateClick() ) );
    connect( helpButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( showSearchHelp() ) );
    connect( searchButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( startSearch() ) );
    connect( resultBox, TQ_SIGNAL( returnPressed(TQListBoxItem*) ), this, TQ_SLOT( showResultPage(TQListBoxItem*) ) );
    connect( resultBox, TQ_SIGNAL( mouseButtonClicked(int, TQListBoxItem*, const TQPoint &) ), this, TQ_SLOT( showResultPage(int, TQListBoxItem*, const TQPoint & ) ) );

    // tab order
    setTabOrder( tabWidget, listContents );
    setTabOrder( listContents, editIndex );
    setTabOrder( editIndex, listIndex );
    setTabOrder( listIndex, listBookmarks );
    setTabOrder( listBookmarks, buttonAdd );
    setTabOrder( buttonAdd, buttonRemove );
    setTabOrder( buttonRemove, termsEdit );
    setTabOrder( termsEdit, searchButton );
    setTabOrder( searchButton, helpButton );
    setTabOrder( helpButton, resultBox );

    // buddies
    TextLabel1->setBuddy( editIndex );
    TextLabel1_2->setBuddy( termsEdit );
    TextLabel2->setBuddy( resultBox );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void HelpDialogBase::languageChange()
{
    setCaption( tr( "Help" ) );
    TQWhatsThis::add( this, tr( "<b>Help</b><p>Choose the topic you want help on from the contents list, or search the index for keywords.</p>" ) );
    TQWhatsThis::add( tabWidget, tr( "Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search." ) );
    listContents->header()->setLabel( 0, tr( "Column 1" ) );
    TQWhatsThis::add( listContents, tr( "<b>Help topics organized by category.</b><p>Double-click an item to see the topics in that category. To view a topic, just double-click it.</p>" ) );
    tabWidget->changeTab( contentPage, tr( "Con&tents" ) );
    TextLabel1->setText( tr( "&Look For:" ) );
    TQToolTip::add( editIndex, tr( "Enter keyword" ) );
    TQWhatsThis::add( editIndex, tr( "<b>Enter a keyword.</b><p>The list will select an item that matches the entered string best.</p>" ) );
    TQWhatsThis::add( listIndex, tr( "<b>List of available help topics.</b><p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.</p>" ) );
    tabWidget->changeTab( Widget8, tr( "&Index" ) );
    listBookmarks->header()->setLabel( 0, tr( "Column 1" ) );
    TQWhatsThis::add( listBookmarks, tr( "Displays the list of bookmarks." ) );
    buttonAdd->setText( tr( "&New" ) );
    TQToolTip::add( buttonAdd, tr( "Add new bookmark" ) );
    TQWhatsThis::add( buttonAdd, tr( "Add the currently displayed page as a new bookmark." ) );
    buttonRemove->setText( tr( "&Delete" ) );
    TQToolTip::add( buttonRemove, tr( "Delete bookmark" ) );
    TQWhatsThis::add( buttonRemove, tr( "Delete the selected bookmark." ) );
    tabWidget->changeTab( Widget9, tr( "&Bookmarks" ) );
    TextLabel1_2->setText( tr( "Searching f&or:" ) );
    TQToolTip::add( termsEdit, tr( "Enter searchword(s)." ) );
    TQWhatsThis::add( termsEdit, tr( "<b>Enter search word(s).</b><p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.</p>" ) );
    TQWhatsThis::add( resultBox, tr( "<b>Found documents</b><p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.</p>" ) );
    TextLabel2->setText( tr( "Found &Documents:" ) );
    helpButton->setText( tr( "He&lp" ) );
    TQToolTip::add( helpButton, tr( "Display the help page." ) );
    TQWhatsThis::add( helpButton, tr( "Display the help page for the full text search." ) );
    searchButton->setText( tr( "&Search" ) );
    TQToolTip::add( searchButton, tr( "Start searching." ) );
    TQWhatsThis::add( searchButton, tr( "Pressing this button starts the search." ) );
    tabWidget->changeTab( searchTab, tr( "&Search" ) );
    labelPrepare->setText( tr( "Preparing..." ) );
}

void HelpDialogBase::init()
{
}

void HelpDialogBase::destroy()
{
}

void HelpDialogBase::addBookmark()
{
    tqWarning( "HelpDialogBase::addBookmark(): Not implemented yet" );
}

void HelpDialogBase::currentBookmarkChanged(TQListViewItem*)
{
    tqWarning( "HelpDialogBase::currentBookmarkChanged(TQListViewItem*): Not implemented yet" );
}

void HelpDialogBase::currentIndexChanged(TQListBoxItem*)
{
    tqWarning( "HelpDialogBase::currentIndexChanged(TQListBoxItem*): Not implemented yet" );
}

void HelpDialogBase::currentTabChanged(const TQString&)
{
    tqWarning( "HelpDialogBase::currentTabChanged(const TQString&): Not implemented yet" );
}

void HelpDialogBase::loadIndexFile()
{
    tqWarning( "HelpDialogBase::loadIndexFile(): Not implemented yet" );
}

void HelpDialogBase::currentContentsChanged(TQListViewItem*)
{
    tqWarning( "HelpDialogBase::currentContentsChanged(TQListViewItem*): Not implemented yet" );
}

void HelpDialogBase::removeBookmark()
{
    tqWarning( "HelpDialogBase::removeBookmark(): Not implemented yet" );
}

void HelpDialogBase::searchInIndex(const TQString&)
{
    tqWarning( "HelpDialogBase::searchInIndex(const TQString&): Not implemented yet" );
}

void HelpDialogBase::showTopic()
{
    tqWarning( "HelpDialogBase::showTopic(): Not implemented yet" );
}

void HelpDialogBase::showTopic(int,TQListBoxItem*,const TQPoint&)
{
    tqWarning( "HelpDialogBase::showTopic(int,TQListBoxItem*,const TQPoint&): Not implemented yet" );
}

void HelpDialogBase::showSearchHelp()
{
    tqWarning( "HelpDialogBase::showSearchHelp(): Not implemented yet" );
}

void HelpDialogBase::startSearch()
{
    tqWarning( "HelpDialogBase::startSearch(): Not implemented yet" );
}

void HelpDialogBase::showResultPage(TQListBoxItem*)
{
    tqWarning( "HelpDialogBase::showResultPage(TQListBoxItem*): Not implemented yet" );
}

void HelpDialogBase::showResultPage(int,TQListBoxItem*,const TQPoint&)
{
    tqWarning( "HelpDialogBase::showResultPage(int,TQListBoxItem*,const TQPoint&): Not implemented yet" );
}

void HelpDialogBase::showResultPage(int,TQListViewItem*,const TQPoint&)
{
    tqWarning( "HelpDialogBase::showResultPage(int,TQListViewItem*,const TQPoint&): Not implemented yet" );
}

