#include <kdialog.h>
#include <tdelocale.h>

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

#include "historyviewer.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <kprogress.h>
#include <tdelistview.h>
#include <tdelistviewsearchline.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqsplitter.h>
#include <ntqframe.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a HistoryViewer as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
HistoryViewer::HistoryViewer( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "HistoryViewer" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 300, 200 ) );
    HistoryViewerLayout = new TQGridLayout( this, 1, 1, 0, 6, "HistoryViewerLayout"); 

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

    statusLabel = new TQLabel( this, "statusLabel" );
    statusLabel->setMaximumSize( TQSize( 32767, 20 ) );
    layout3->addWidget( statusLabel );

    searchProgress = new KProgress( this, "searchProgress" );
    layout3->addWidget( searchProgress );

    HistoryViewerLayout->addLayout( layout3, 3, 0 );

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

    searchErase = new TQPushButton( this, "searchErase" );
    layout8->addWidget( searchErase );

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout8->addWidget( textLabel2 );

    searchLine = new KLineEdit( this, "searchLine" );
    layout8->addWidget( searchLine );

    searchButton = new TQPushButton( this, "searchButton" );
    searchButton->setEnabled( false );
    searchButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, searchButton->sizePolicy().hasHeightForWidth() ) );
    searchButton->setMinimumSize( TQSize( 70, 0 ) );
    searchButton->setMaximumSize( TQSize( 150, 32767 ) );
    layout8->addWidget( searchButton );

    HistoryViewerLayout->addLayout( layout8, 2, 0 );

    splitter2 = new TQSplitter( this, "splitter2" );
    splitter2->setOrientation( TQSplitter::Horizontal );

    TQWidget* privateLayoutWidget = new TQWidget( splitter2, "layout5" );
    layout5 = new TQVBoxLayout( privateLayoutWidget, 0, 6, "layout5"); 

    dateSearchLine = new TDEListViewSearchLine( privateLayoutWidget, "dateSearchLine" );
    dateSearchLine->setEnabled( true );
    dateSearchLine->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, dateSearchLine->sizePolicy().hasHeightForWidth() ) );
    dateSearchLine->setMinimumSize( TQSize( 140, 0 ) );
    dateSearchLine->setMaximumSize( TQSize( 32767, 32767 ) );
    layout5->addWidget( dateSearchLine );

    dateListView = new TDEListView( privateLayoutWidget, "dateListView" );
    dateListView->addColumn( tr2i18n( "Date" ) );
    dateListView->addColumn( tr2i18n( "Contact" ) );
    dateListView->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, dateListView->sizePolicy().hasHeightForWidth() ) );
    dateListView->setMinimumSize( TQSize( 0, 0 ) );
    dateListView->setMaximumSize( TQSize( 32767, 32767 ) );
    dateListView->setRootIsDecorated( false );
    layout5->addWidget( dateListView );

    htmlFrame = new TQFrame( splitter2, "htmlFrame" );
    htmlFrame->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 10, 0, htmlFrame->sizePolicy().hasHeightForWidth() ) );
    htmlFrame->setMinimumSize( TQSize( 0, 0 ) );
    htmlFrame->setFrameShape( TQFrame::WinPanel );
    htmlFrame->setFrameShadow( TQFrame::Sunken );

    HistoryViewerLayout->addWidget( splitter2, 1, 0 );

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

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    layout11->addWidget( textLabel1 );

    contactComboBox = new KComboBox( false, this, "contactComboBox" );
    contactComboBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, contactComboBox->sizePolicy().hasHeightForWidth() ) );
    layout11->addWidget( contactComboBox );

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    layout11->addWidget( textLabel1_2 );

    messageFilterBox = new TQComboBox( false, this, "messageFilterBox" );
    messageFilterBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, messageFilterBox->sizePolicy().hasHeightForWidth() ) );
    messageFilterBox->setMinimumSize( TQSize( 200, 0 ) );
    layout11->addWidget( messageFilterBox );

    HistoryViewerLayout->addLayout( layout11, 0, 0 );
    languageChange();
    resize( TQSize(682, 634).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void HistoryViewer::languageChange()
{
    statusLabel->setText( tr2i18n( "Ready" ) );
    searchErase->setText( TQString::null );
    textLabel2->setText( tr2i18n( "Search:" ) );
    searchButton->setText( tr2i18n( "Se&arch" ) );
    dateListView->header()->setLabel( 0, tr2i18n( "Date" ) );
    dateListView->header()->setLabel( 1, tr2i18n( "Contact" ) );
    textLabel1->setText( tr2i18n( "Contact:" ) );
    textLabel1_2->setText( tr2i18n( "Message Filter:" ) );
    messageFilterBox->clear();
    messageFilterBox->insertItem( tr2i18n( "All messages" ) );
    messageFilterBox->insertItem( tr2i18n( "Only incoming" ) );
    messageFilterBox->insertItem( tr2i18n( "Only outgoing" ) );
}

/****************************************************************************
** HistoryViewer meta object code from reading C++ file 'historyviewer.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "historyviewer.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *HistoryViewer::className() const
{
    return "HistoryViewer";
}

TQMetaObject *HistoryViewer::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_HistoryViewer( "HistoryViewer", &HistoryViewer::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString HistoryViewer::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "HistoryViewer", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString HistoryViewer::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "HistoryViewer", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* HistoryViewer::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"HistoryViewer", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_HistoryViewer.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* HistoryViewer::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "HistoryViewer" ) )
	return this;
    return TQWidget::tqt_cast( clname );
}

bool HistoryViewer::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool HistoryViewer::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool HistoryViewer::tqt_property( int id, int f, TQVariant* v)
{
    return TQWidget::tqt_property( id, f, v);
}

bool HistoryViewer::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
