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

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

#include "help.h"

#include <ntqvariant.h>
#include <ktextedit.h>
#include <ntqpushbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a HelpDialog 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.
 */
HelpDialog::HelpDialog( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "HelpDialog" );
    HelpDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "HelpDialogLayout"); 

    kTextEdit2 = new KTextEdit( this, "kTextEdit2" );
    kTextEdit2->setFrameShape( KTextEdit::LineEditPanel );
    kTextEdit2->setFrameShadow( KTextEdit::Sunken );
    kTextEdit2->setMargin( 0 );
    kTextEdit2->setReadOnly( true );
    kTextEdit2->setUndoRedoEnabled( false );

    HelpDialogLayout->addMultiCellWidget( kTextEdit2, 0, 0, 0, 1 );

    buttonClose = new TQPushButton( this, "buttonClose" );

    HelpDialogLayout->addWidget( buttonClose, 1, 1 );
    spacer4 = new TQSpacerItem( 231, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    HelpDialogLayout->addItem( spacer4, 1, 0 );
    languageChange();
    resize( TQSize(600, 480).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonClose, TQ_SIGNAL( released() ), this, TQ_SLOT( close() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void HelpDialog::languageChange()
{
    setCaption( tr2i18n( "Help" ) );
    kTextEdit2->setText( tr2i18n( "<p align=\"center\"><font size=\"+3\"><b>Menu entry editor</b></font></p>\n"
"<p align=\"center\">----------------------------------------------------------------------------------</p>\n"
"<h3>Introduction</h3>\n"
"\n"
"By default, you will only see the basic settings for the new entry. Clicking \"Show More\" will give you access to some extended settings that can be interesting but mostly useless for you.<br><br>\n"
"<b>Bold options must be entered</b> for a usefull entry, i<i>talic ones are respected by the search feature</i>.\n"
"<br><br>\n"
"<h3>Basic settings</h3>\n"
"\n"
"<b>Name:</b><br>\n"
"This is the visible name of your new entry and can be any string, e.g. \"The Gimp\".<br>\n"
"(Necessary, searchkey)\n"
"<br><br>\n"
"<b>Is a:</b><br>\n"
"Describes the applications genre (generic name), e.g. \"Image manipulation\"<br>\n"
"(Optional, yet not searched - maybe later)\n"
"<br><br>\n"
"<b>Category:</b><br>\n"
"Choose an existing group or add a new one. The hierarchy is represented by seperating slashes (\"/\"), if you want to enter a slash, you must escape it (\"\\/\")<br>\n"
"(Necessary, searchkey)\n"
"<br><br>\n"
"<b>Command:</b><br>\n"
"The command to start the application, e.g. \"gimp-remote\". On *nix systems, is usually not necessary to pass the full path to the executably, but you can do so, if you want to start an executable that is shadowed by the executable in the path dir, e.g. \"/usr/local/gimp-1.3/gimp-remote\"<br>\n"
"(Necessary, not searched)\n"
"<br><br>\n"
"<b>Keywords:</b><br>\n"
"Comma separated list of keywords that refer to this application during search, e.g. \"image manipulation,pixel,photoshop\".<br>\n"
"Please note:<br>\n"
"1. search is <i>not</i> case sensitive<br>\n"
"2. search finds partial matches, so it's <i>not</i> necessary to add e.g. \"image,image manipulation\"<br>\n"
"3. different from the applications name, the keyword list will be translated (if) so if you think like \"'KImage' allready contains 'image', so i don't need it as keyword\" <b>you're wrong!</b><br>\n"
"4. Finding good keywords is not simple, but in general use striking ones! \"editor\" is not a very good keyword, as allmost everything is an editor. (Gimp is a pixel-editor, KHexedit is a hex-editor, KEdit is a text-editor, a config dialog is a config-editor, ...)<br>\n"
"(Optional, searchkey)\n"
"<br><br>\n"
"<b>Description:</b><br>\n"
"This is the longtext description of your application (not a helptext, though ;), e.g. \"A powerfull image manipulator with a UI similar to photoshop. Supports Layers, filters, scripting, blahblahblah...\"\n"
"You can use TQt richtext tags and there's no limit on the size, but keep it usefull ;) let's say something about 200 chars at max.<br>\n"
"(Optional, not searched)" ) );
    buttonClose->setText( tr2i18n( "Close" ) );
}

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

TQMetaObject *HelpDialog::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_HelpDialog( "HelpDialog", &HelpDialog::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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