#include <kdialog.h>
#include <tdelocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './searchresultsform.ui'
**
** Created: Sa Mai 10 13:52:35 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "searchresultsform.h"

#include <tqvariant.h>
#include <tqpushbutton.h>
#include <tqsplitter.h>
#include <tqframe.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "cmoduleresultview.h"
#include "csearchresultview.h"

/*
 *  Constructs a SearchResultsForm as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
SearchResultsForm::SearchResultsForm( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "SearchResultsForm" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 300, 220 ) );
    setBaseSize( TQSize( 440, 290 ) );
    SearchResultsFormLayout = new TQVBoxLayout( this, 0, 3, "SearchResultsFormLayout"); 

    displaySplitter = new TQSplitter( this, "displaySplitter" );
    displaySplitter->setMinimumSize( TQSize( 134, 44 ) );
    displaySplitter->setOrientation( TQSplitter::Horizontal );

    TQWidget* privateLayoutWidget = new TQWidget( displaySplitter, "rightSideBox" );
    rightSideBox = new TQVBoxLayout( privateLayoutWidget, 0, 6, "rightSideBox"); 

    resultSplitter = new TQSplitter( privateLayoutWidget, "resultSplitter" );
    resultSplitter->setOrientation( TQSplitter::Vertical );

    m_moduleListBox = new Search::Result::CModuleResultView( resultSplitter, "m_moduleListBox" );

    m_resultListBox = new Search::Result::CSearchResultView( resultSplitter, "m_resultListBox" );
    rightSideBox->addWidget( resultSplitter );

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

    m_analyseButton = new TQPushButton( privateLayoutWidget, "m_analyseButton" );
    buttonLayout->addWidget( m_analyseButton );
    buttonSpacer = new TQSpacerItem( 10, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonLayout->addItem( buttonSpacer );
    rightSideBox->addLayout( buttonLayout );

    m_displayFrame = new TQFrame( displaySplitter, "m_displayFrame" );
    m_displayFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_displayFrame->sizePolicy().hasHeightForWidth() ) );
    m_displayFrame->setFrameShape( TQFrame::NoFrame );
    m_displayFrame->setFrameShadow( TQFrame::Plain );
    SearchResultsFormLayout->addWidget( displaySplitter );
    languageChange();
    resize( TQSize(300, 220).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SearchResultsForm::languageChange()
{
    setCaption( tr2i18n( "SearchResults" ) );
    m_analyseButton->setText( tr2i18n( "Analyze search" ) );
}

#include "searchresultsform.moc"
