summaryrefslogtreecommitdiffstats
path: root/bibletime/frontend/searchdialog/searchresultsform.cpp
blob: d4271a4aaf2809969ff90341cf17110f32db74b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#include <kdialog.h>
#include <klocale.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, Qt 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"