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

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

#include "kprintDialogPage_DJVUconversionoptions_basewidget.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a kprintDialogPage_DJVUconversionoptions_basewidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
kprintDialogPage_DJVUconversionoptions_basewidget::kprintDialogPage_DJVUconversionoptions_basewidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "kprintDialogPage_DJVUconversionoptions_basewidget" );
    kprintDialogPage_DJVUconversionoptions_basewidgetLayout = new TQGridLayout( this, 1, 1, 0, 6, "kprintDialogPage_DJVUconversionoptions_basewidgetLayout"); 

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

    kprintDialogPage_DJVUconversionoptions_basewidgetLayout->addWidget( textLabel1, 0, 0 );

    textLabel2 = new TQLabel( this, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );

    kprintDialogPage_DJVUconversionoptions_basewidgetLayout->addWidget( textLabel2, 1, 0 );

    psLevel = new TQComboBox( false, this, "psLevel" );
    psLevel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, psLevel->sizePolicy().hasHeightForWidth() ) );

    kprintDialogPage_DJVUconversionoptions_basewidgetLayout->addWidget( psLevel, 0, 1 );

    renderMode = new TQComboBox( false, this, "renderMode" );
    renderMode->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, renderMode->sizePolicy().hasHeightForWidth() ) );

    kprintDialogPage_DJVUconversionoptions_basewidgetLayout->addWidget( renderMode, 1, 1 );
    spacer1 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    kprintDialogPage_DJVUconversionoptions_basewidgetLayout->addItem( spacer1, 2, 1 );
    languageChange();
    resize( TQSize(548, 126).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void kprintDialogPage_DJVUconversionoptions_basewidget::languageChange()
{
    textLabel1->setText( tr2i18n( "PostScript language level:" ) );
    textLabel2->setText( tr2i18n( "Render mode:" ) );
    psLevel->clear();
    psLevel->insertItem( tr2i18n( "Level 1 (almost obsolete)" ) );
    psLevel->insertItem( tr2i18n( "Level 2 (default)" ) );
    psLevel->insertItem( tr2i18n( "Level 3 (might print faster)" ) );
    TQWhatsThis::add( psLevel, tr2i18n( "<p>With this dialog you can choose the PostScript language level used by KViewShell. The choice of a language level can dramatically affect printing speed, but has no impact on the quality of the printout.</p>\n"
"<p><b>Level 1:</b> This is the most conservative option, because PostScript Level 1 files can be printed on all printers. The files produced are, however, extremely long, and printing can be very slow.</p>\n"
"<p><b>Level 2:</b> Level 2 PostScript files are much smaller and print much faster than Level 1 files. Level 2 files are supported by almost all printers.</p>\n"
"<p><b>Level 3:</b> Level 3 PostScript files are much smaller and print even faster than Level 2 files. However, Level 3 files are supported only by some modern printers. If Level 3 works for you, this is the best option.</p>" ) );
    renderMode->clear();
    renderMode->insertItem( tr2i18n( "Print Full Page (default)" ) );
    renderMode->insertItem( tr2i18n( "Black & White" ) );
    renderMode->insertItem( tr2i18n( "Foreground Only" ) );
    renderMode->insertItem( tr2i18n( "Background Only" ) );
    TQWhatsThis::add( renderMode, tr2i18n( "<p>Good DJVU files are separated into foreground and background images. The foreground mostly contains the text. With the render mode you can decide what part of your page will be printed.</p>\n"
"<p><b>Print Full Page:</b> The full page, including foreground and background will be printed, either in color or in grayscale.</p>\n"
"<p><b>Black & White:</b> Foreground and background are printed, but only in black-and-white. If this option is chosen, the files generated will print much faster, but quality will not be as good.</p>\n"
"<p><b>Foreground Only:</b> This option is useful if the background of the page is disturbing and affects the readability of the text.</p>\n"
"<p><b>Background Only:</b> Print only the background of the page.</p>" ) );
}

/****************************************************************************
** kprintDialogPage_DJVUconversionoptions_basewidget meta object code from reading C++ file 'kprintDialogPage_DJVUconversionoptions_basewidget.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 "kprintDialogPage_DJVUconversionoptions_basewidget.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 *kprintDialogPage_DJVUconversionoptions_basewidget::className() const
{
    return "kprintDialogPage_DJVUconversionoptions_basewidget";
}

TQMetaObject *kprintDialogPage_DJVUconversionoptions_basewidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_kprintDialogPage_DJVUconversionoptions_basewidget( "kprintDialogPage_DJVUconversionoptions_basewidget", &kprintDialogPage_DJVUconversionoptions_basewidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* kprintDialogPage_DJVUconversionoptions_basewidget::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(
	"kprintDialogPage_DJVUconversionoptions_basewidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_kprintDialogPage_DJVUconversionoptions_basewidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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