#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './downloaderrordialogbase.ui'
**
** Created: 木  7月 19 22:29:33 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.5   edited Aug 31 12:13 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "downloaderrordialogbase.h"

#include <qvariant.h>
#include <qframe.h>
#include <qlabel.h>
#include <kpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include "kpushbutton.h"

/*
 *  Constructs a DownloadErrorDialogBase 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.
 */
DownloadErrorDialogBase::DownloadErrorDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "DownloadErrorDialogBase" );
    setMinimumSize( QSize( 340, 120 ) );
    setMaximumSize( QSize( 340, 120 ) );
    setBaseSize( QSize( 340, 120 ) );

    frame11 = new QFrame( this, "frame11" );
    frame11->setGeometry( QRect( 10, 10, 320, 60 ) );
    frame11->setFrameShape( QFrame::StyledPanel );
    frame11->setFrameShadow( QFrame::Sunken );

    m_DetailLabel1 = new QLabel( frame11, "m_DetailLabel1" );
    m_DetailLabel1->setGeometry( QRect( 10, 10, 300, 20 ) );
    m_DetailLabel1->setAlignment( int( QLabel::AlignCenter ) );

    m_DetailLabel2 = new QLabel( frame11, "m_DetailLabel2" );
    m_DetailLabel2->setGeometry( QRect( 10, 30, 300, 20 ) );
    m_DetailLabel2->setAlignment( int( QLabel::AlignCenter ) );

    m_RetryButton = new KPushButton( this, "m_RetryButton" );
    m_RetryButton->setGeometry( QRect( 80, 80, 100, 30 ) );

    m_CancelButton = new KPushButton( this, "m_CancelButton" );
    m_CancelButton->setGeometry( QRect( 190, 80, 100, 30 ) );
    languageChange();
    resize( QSize(340, 120).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_CancelButton, SIGNAL( clicked() ), this, SLOT( slotCancelClicked() ) );
    connect( m_RetryButton, SIGNAL( clicked() ), this, SLOT( slotRetryClicked() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void DownloadErrorDialogBase::languageChange()
{
    setCaption( tr2i18n( "File Download Error" ) );
    m_DetailLabel1->setText( tr2i18n( "Total 0KB (0KB/s)" ) );
    m_DetailLabel2->setText( tr2i18n( "95 sec  0 files" ) );
    m_RetryButton->setText( tr2i18n( "Retr&y" ) );
    m_RetryButton->setAccel( QKeySequence( tr2i18n( "Alt+Y" ) ) );
    m_CancelButton->setText( tr2i18n( "Cancel" ) );
}

void DownloadErrorDialogBase::slotCancelClicked()
{
    qWarning( "DownloadErrorDialogBase::slotCancelClicked(): Not implemented yet" );
}

void DownloadErrorDialogBase::slotRetryClicked()
{
    qWarning( "DownloadErrorDialogBase::slotRetryClicked(): Not implemented yet" );
}

#include "downloaderrordialogbase.moc"
