/****************************************************************************
** Form implementation generated from reading ui file 'toresultcontentfilterui.ui'
**
** Created: Tue Sep 18 08:21:23 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "toresultcontentfilterui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "tohighlightedtext.h"
#include "toresultcols.h"

/*
 *  Constructs a toResultContentFilterUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
toResultContentFilterUI::toResultContentFilterUI( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "toResultContentFilterUI" );
    toResultContentFilterUILayout = new QGridLayout( this, 1, 1, 11, 6, "toResultContentFilterUILayout"); 

    PushButton1 = new QPushButton( this, "PushButton1" );
    PushButton1->setDefault( TRUE );

    toResultContentFilterUILayout->addWidget( PushButton1, 4, 1 );

    PushButton3 = new QPushButton( this, "PushButton3" );

    toResultContentFilterUILayout->addWidget( PushButton3, 4, 2 );

    Order = new QLineEdit( this, "Order" );

    toResultContentFilterUILayout->addWidget( Order, 3, 0 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) );

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

    Criteria = new toHighlightedText( this, "Criteria" );
    Criteria->setFocusPolicy( toHighlightedText::StrongFocus );

    toResultContentFilterUILayout->addWidget( Criteria, 1, 0 );

    TextLabel1_2 = new QLabel( this, "TextLabel1_2" );
    TextLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel1_2->sizePolicy().hasHeightForWidth() ) );

    toResultContentFilterUILayout->addWidget( TextLabel1_2, 2, 0 );

    TextLabel2 = new QLabel( this, "TextLabel2" );
    TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );

    toResultContentFilterUILayout->addMultiCellWidget( TextLabel2, 0, 0, 1, 3 );

    Columns = new toResultCols( this, "Columns" );

    toResultContentFilterUILayout->addMultiCellWidget( Columns, 1, 3, 1, 3 );
    Spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    toResultContentFilterUILayout->addItem( Spacer1, 4, 3 );

    AllTables = new QCheckBox( this, "AllTables" );

    toResultContentFilterUILayout->addWidget( AllTables, 4, 0 );
    languageChange();
    resize( QSize(750, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( PushButton3, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( Criteria, Order );
    setTabOrder( Order, PushButton1 );
    setTabOrder( PushButton1, PushButton3 );

    // buddies
    TextLabel1->setBuddy( Criteria );
    TextLabel1_2->setBuddy( Order );
    TextLabel2->setBuddy( Columns );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void toResultContentFilterUI::languageChange()
{
    setCaption( tr( "Content editor filter settings" ) );
    PushButton1->setText( tr( "Ok" ) );
    PushButton3->setText( tr( "Cancel" ) );
    TextLabel1->setText( tr( "Selection &criteria" ) );
    QToolTip::add( TextLabel1, tr( "Selection criteria to use getting items to edit. Same as after where in a select clause." ) );
    TextLabel1_2->setText( tr( "Sort &order. Separate columns with comma." ) );
    QToolTip::add( TextLabel1_2, tr( "The sort order to use when retreiving data from the database." ) );
    TextLabel2->setText( tr( "Table &columns" ) );
    QToolTip::add( TextLabel2, tr( "Available column names in table." ) );
    AllTables->setText( tr( "Use for all tables" ) );
}

