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

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

#include "sq_helpwidget.h"

#include <ntqvariant.h>
#include <tqtooltip.h>
#include <ntqpushbutton.h>
#include <ntqwidgetstack.h>
#include <ntqwidget.h>
#include <ntqlabel.h>
#include <ntqbuttongroup.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "sq_config.h"
#include "sq_helpwidget.ui.h"

/*
 *  Constructs a SQ_HelpWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
SQ_HelpWidget::SQ_HelpWidget( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "SQ_HelpWidget" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setSizeGripEnabled( false );
    SQ_HelpWidgetLayout = new TQGridLayout( this, 1, 1, 11, 0, "SQ_HelpWidgetLayout"); 

    widgetStack1 = new TQWidgetStack( this, "widgetStack1" );

    WStackPage = new TQWidget( widgetStack1, "WStackPage" );
    WStackPageLayout = new TQGridLayout( WStackPage, 1, 1, 11, 6, "WStackPageLayout"); 

    textLabel2 = new TQLabel( WStackPage, "textLabel2" );
    textLabel2->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );

    WStackPageLayout->addWidget( textLabel2, 0, 0 );
    widgetStack1->addWidget( WStackPage, 0 );

    WStackPage_2 = new TQWidget( widgetStack1, "WStackPage_2" );
    WStackPageLayout_2 = new TQGridLayout( WStackPage_2, 1, 1, 11, 6, "WStackPageLayout_2"); 

    textLabel3 = new TQLabel( WStackPage_2, "textLabel3" );
    textLabel3->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );

    WStackPageLayout_2->addWidget( textLabel3, 0, 0 );
    widgetStack1->addWidget( WStackPage_2, 1 );

    WStackPage_3 = new TQWidget( widgetStack1, "WStackPage_3" );
    WStackPageLayout_3 = new TQGridLayout( WStackPage_3, 1, 1, 11, 6, "WStackPageLayout_3"); 

    textLabel4 = new TQLabel( WStackPage_3, "textLabel4" );
    textLabel4->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );

    WStackPageLayout_3->addWidget( textLabel4, 0, 0 );
    widgetStack1->addWidget( WStackPage_3, 2 );

    WStackPage_4 = new TQWidget( widgetStack1, "WStackPage_4" );
    WStackPageLayout_4 = new TQGridLayout( WStackPage_4, 1, 1, 11, 6, "WStackPageLayout_4"); 

    textLabel6 = new TQLabel( WStackPage_4, "textLabel6" );
    textLabel6->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );

    WStackPageLayout_4->addWidget( textLabel6, 0, 0 );
    widgetStack1->addWidget( WStackPage_4, 3 );

    WStackPage_5 = new TQWidget( widgetStack1, "WStackPage_5" );
    WStackPageLayout_5 = new TQGridLayout( WStackPage_5, 1, 1, 0, 6, "WStackPageLayout_5"); 

    textLabel5 = new TQLabel( WStackPage_5, "textLabel5" );
    textLabel5->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop ) );

    WStackPageLayout_5->addWidget( textLabel5, 0, 0 );
    widgetStack1->addWidget( WStackPage_5, 4 );

    SQ_HelpWidgetLayout->addWidget( widgetStack1, 1, 0 );

    buttonGroup = new TQButtonGroup( this, "buttonGroup" );
    buttonGroup->setExclusive( true );
    buttonGroup->setColumnLayout(0, TQt::Vertical );
    buttonGroup->layout()->setSpacing( 0 );
    buttonGroup->layout()->setMargin( 0 );
    buttonGroupLayout = new TQGridLayout( buttonGroup->layout() );
    buttonGroupLayout->setAlignment( TQt::AlignTop );

    pushButton3 = new TQPushButton( buttonGroup, "pushButton3" );
    pushButton3->setFocusPolicy( TQPushButton::NoFocus );
    pushButton3->setToggleButton( true );
    pushButton3->setOn( true );
    pushButton3->setFlat( true );
    buttonGroup->insert( pushButton3, 0 );

    buttonGroupLayout->addWidget( pushButton3, 0, 0 );

    pushButton3_2 = new TQPushButton( buttonGroup, "pushButton3_2" );
    pushButton3_2->setFocusPolicy( TQPushButton::NoFocus );
    pushButton3_2->setToggleButton( true );
    pushButton3_2->setFlat( true );
    buttonGroup->insert( pushButton3_2, 1 );

    buttonGroupLayout->addWidget( pushButton3_2, 0, 1 );

    pushButton3_3 = new TQPushButton( buttonGroup, "pushButton3_3" );
    pushButton3_3->setFocusPolicy( TQPushButton::NoFocus );
    pushButton3_3->setToggleButton( true );
    pushButton3_3->setFlat( true );
    buttonGroup->insert( pushButton3_3, 2 );

    buttonGroupLayout->addWidget( pushButton3_3, 0, 2 );

    pushButton3_5 = new TQPushButton( buttonGroup, "pushButton3_5" );
    pushButton3_5->setFocusPolicy( TQPushButton::NoFocus );
    pushButton3_5->setToggleButton( true );
    pushButton3_5->setFlat( true );
    buttonGroup->insert( pushButton3_5, 4 );

    buttonGroupLayout->addWidget( pushButton3_5, 0, 4 );

    pushButton3_4 = new TQPushButton( buttonGroup, "pushButton3_4" );
    pushButton3_4->setFocusPolicy( TQPushButton::NoFocus );
    pushButton3_4->setToggleButton( true );
    pushButton3_4->setFlat( true );
    buttonGroup->insert( pushButton3_4, 3 );

    buttonGroupLayout->addWidget( pushButton3_4, 0, 3 );

    SQ_HelpWidgetLayout->addWidget( buttonGroup, 0, 0 );
    spacer1 = new TQSpacerItem( 16, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    SQ_HelpWidgetLayout->addItem( spacer1, 2, 0 );
    languageChange();
    resize( TQSize(512, 430).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonGroup, TQ_SIGNAL( clicked(int) ), widgetStack1, TQ_SLOT( raiseWidget(int) ) );

    // tab order
    setTabOrder( pushButton3, pushButton3_2 );
    setTabOrder( pushButton3_2, pushButton3_3 );
    setTabOrder( pushButton3_3, pushButton3_5 );
    setTabOrder( pushButton3_5, pushButton3_4 );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SQ_HelpWidget::languageChange()
{
    setCaption( tr2i18n( "Hotkeys" ) );
    textLabel2->setText( tr2i18n( "<p align=center><table><tr><td><b><p align=right>Esc,X,Return</p></b></td><td>close</td></tr><tr><td><b><p align=right>Middle click, F</p></b></td><td>fullscreen</td></tr><tr><td><b><p align=right>Z</p></b></td><td>show 'Zoom' menu</td></tr><tr><td><b><p align=right>/</p></b></td><td>show this help</td></tr><tr><td><b><p align=right>Right click, M, ContextMenu</p></b></td><td>show context menu</td></tr><tr><td><b><p align=right>N</p></b></td><td>toggle filter</td></tr><tr><td><b><p align=right>Shift + Left button</p></b></td><td>select a region</td></tr><tr><td><b><p align=right>Shift + Left</p></b></td><td>previous tab</td></tr><tr><td><b><p align=right>Shift + Right</p></b></td><td>next tab</td></tr><tr><td><b><p align=right>W</p></b></td><td>close tab</td></tr></table></p>" ) );
    textLabel3->setText( tr2i18n( "<p align=center><table><tr><td><b><p align=right>Space, Page Down</p></b></td><td>next image</td></tr><tr><td><b><p align=right>Backspace, Page Up</p></b></td><td>previous image</td></tr><tr><td><b><p align=right>Home</p></b></td><td>first image</td></tr><tr><td><b><p align=right>End</p></b></td><td>last image</td></tr></table></p>" ) );
    textLabel4->setText( tr2i18n( "<p align=center><table><tr><td><b><p align=right>Left, Right, Up, Down</p></b></td><td>move the image</td></tr><tr><td><b><p align=right>Ctrl + Left</p></b></td><td>rotate left</td></tr><tr><td><b><p align=right>Ctrl + Right</p></b></td><td>rotate right</td></tr><tr><td><b><p align=right>Ctrl + Up/Down</p></b></td><td>rotate for 180 degrees up/down</td></tr><tr><td><b><p align=right>Alt + Left/Right</p></b></td><td>rotate for 1 degree left/right</td></tr></table</p>" ) );
    textLabel6->setText( tr2i18n( "<p align=center><table><tr><td><b><p align=right>+/-</p></b></td><td>zoom Nx</td></tr><tr><td><b><p align=right>Ctrl + +/-</p></b></td><td>zoom 2x/0.5x</td></tr><tr><td><b><p align=right>Scroll</p></b></td><td>load next/prev file OR zoom+/zoom-</td></tr><tr><td><b><p align=right>Shift + Scroll</p></b></td><td>zoom+/zoom-</td></tr><tr><td><b><p align=right>Ctrl + Scroll</p></b></td><td>zoom+ 2x/zoom- 2x</td></tr><tr><td><b><p align=right>1..9</p></b></td><td>zoom 1..9x</td></tr><tr><td><b><p align=right>0</p></b></td><td>zoom 10x</td></tr><tr><td><b><p align=right>comma</p></b></td><td>fit width</td></tr><tr><td><b><p align=right>period</p></b></td><td>fit height</td></tr><tr><td><b><p align=right>*</p></b></td><td>fit image</td></tr></table</p>" ) );
    textLabel5->setText( tr2i18n( "<p align=center><table><tr><td><p align=right><b>S</b></p></td><td>save as</td></tr><tr><td><p align=right><b>V</b></p></td><td>flip vertically</td></tr><tr><td><p align=right><b>H</b></p></td><td>flip horizontally</td></tr><tr><td><p align=right><b>R</b></p></td><td>reset</td></tr><tr><td><p align=right><b>P</b></p></td><td>image properties</td></tr><tr><td><p align=right><b>C</b></p></td><td>codec settings</td></tr><tr><td><p align=right><b>L</b></p></td><td>ignore zoom if image is smaller than window</td></tr><tr><td><p align=right><b>I</b></p></td><td>menu with images</td></tr><tr><td><p align=right><b>A</b></p></td><td>stop/start animation</td></tr><tr><td><p align=right><b>B</b></p></td><td>toggle drawing background for transparent images</td></tr><tr><td><p align=right><b>K</b></p></td><td>toggle drawing tickmarks</td></tr><tr><td><p align=right><b>E</b></p></td><td>show menu with external tools</td></tr><tr><td><p align=right><b>Y</b></p></td><td>crop</td></tr><tr><td><p align=right><b>F1</b></p></td><td>first image in multi-paged image</td></tr><tr><td><p align=right><b>F2</b></p></td><td>previous</td></tr><tr><td><p align=right><b>F3</b></p></td><td>next</td></tr><tr><td><p align=right><b>F4</b></p></td><td>last</td></tr></table></p>" ) );
    buttonGroup->setTitle( TQString::null );
    pushButton3->setText( tr2i18n( "General" ) );
    pushButton3_2->setText( tr2i18n( "Filing" ) );
    pushButton3_3->setText( tr2i18n( "Moving" ) );
    pushButton3_5->setText( tr2i18n( "Current image" ) );
    pushButton3_4->setText( tr2i18n( "Zoom" ) );
}

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

TQMetaObject *SQ_HelpWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_SQ_HelpWidget( "SQ_HelpWidget", &SQ_HelpWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* SQ_HelpWidget::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"SQ_HelpWidget", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_SQ_HelpWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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