#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdelibs3/kdelibs3-3.5.10-11.i686/src/kdelibs-3.5.10/kio/kfile/kpropertiesdesktopbase.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "kpropertiesdesktopbase.h"

#include <qvariant.h>
#include <klineedit.h>
#include <kurlrequester.h>
#include <klistview.h>
#include <qlabel.h>
#include <qheader.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a KPropertiesDesktopBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KPropertiesDesktopBase::KPropertiesDesktopBase( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "KPropertiesDesktopBase" );
    KPropertiesDesktopBaseLayout = new QGridLayout( this, 1, 1, 0, 6, "KPropertiesDesktopBaseLayout"); 
    spacer6 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Minimum );
    KPropertiesDesktopBaseLayout->addMultiCell( spacer6, 5, 5, 3, 4 );

    textLabel7 = new QLabel( this, "textLabel7" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( textLabel7, 6, 6, 0, 6 );

    filetypeList = new KListView( this, "filetypeList" );
    filetypeList->addColumn( tr2i18n( "Mimetype" ) );
    filetypeList->addColumn( tr2i18n( "Description" ) );
    filetypeList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 1, filetypeList->sizePolicy().hasHeightForWidth() ) );
    filetypeList->setFullWidth( TRUE );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( filetypeList, 7, 7, 0, 6 );

    nameLabel = new QLabel( this, "nameLabel" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( nameLabel, 0, 0, 0, 1 );

    nameEdit = new KLineEdit( this, "nameEdit" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( nameEdit, 0, 0, 2, 6 );

    textLabel2 = new QLabel( this, "textLabel2" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( textLabel2, 1, 1, 0, 1 );

    genNameEdit = new KLineEdit( this, "genNameEdit" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( genNameEdit, 1, 1, 2, 6 );

    textLabel3 = new QLabel( this, "textLabel3" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( textLabel3, 2, 2, 0, 1 );

    commentEdit = new KLineEdit( this, "commentEdit" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( commentEdit, 2, 2, 2, 6 );

    textLabel4 = new QLabel( this, "textLabel4" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( textLabel4, 3, 3, 0, 1 );

    commandEdit = new KLineEdit( this, "commandEdit" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( commandEdit, 3, 3, 2, 5 );

    browseButton = new QPushButton( this, "browseButton" );

    KPropertiesDesktopBaseLayout->addWidget( browseButton, 3, 6 );

    textLabel5 = new QLabel( this, "textLabel5" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( textLabel5, 4, 4, 0, 1 );

    pathEdit = new KURLRequester( this, "pathEdit" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( pathEdit, 4, 4, 2, 6 );

    addFiletypeButton = new QPushButton( this, "addFiletypeButton" );

    KPropertiesDesktopBaseLayout->addWidget( addFiletypeButton, 8, 0 );
    spacer31_2 = new QSpacerItem( 53, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
    KPropertiesDesktopBaseLayout->addMultiCell( spacer31_2, 8, 8, 1, 2 );

    delFiletypeButton = new QPushButton( this, "delFiletypeButton" );

    KPropertiesDesktopBaseLayout->addWidget( delFiletypeButton, 8, 3 );
    spacer31_3 = new QSpacerItem( 53, 20, QSizePolicy::MinimumExpanding, QSizePolicy::Minimum );
    KPropertiesDesktopBaseLayout->addItem( spacer31_3, 8, 4 );

    advancedButton = new QPushButton( this, "advancedButton" );

    KPropertiesDesktopBaseLayout->addMultiCellWidget( advancedButton, 8, 8, 5, 6 );
    languageChange();
    resize( QSize(449, 304).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel7->setBuddy( filetypeList );
    nameLabel->setBuddy( nameEdit );
    textLabel2->setBuddy( genNameEdit );
    textLabel3->setBuddy( commentEdit );
    textLabel4->setBuddy( commandEdit );
    textLabel5->setBuddy( pathEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KPropertiesDesktopBase::languageChange()
{
    textLabel7->setText( tr2i18n( "&Supported file types:" ) );
    QWhatsThis::add( textLabel7, tr2i18n( "<qt><p>This list should show the types of file that your application can handle. This list is organized by <u>mimetypes</u>.</p>\n"
"<p>MIME, Multipurpose Internet (e)Mail Extension, is a standard protocol for identifying the type of data based on filename extensions and correspondent <u>mimetypes</u>. Example: the \"bmp\" part that comes after the dot in flower.bmp indicates that it is a specific kind of image, <u>image/x-bmp</u>. To know which application should open each type of file, the system should be informed about the abilities of each application to handle these extensions and mimetypes.</p>\n"
"<p>If you want to associate this application with one or more mimetypes that are not in this list, click on the button <b>Add</b> below. If there are one or more filetypes that this application cannot handle, you may want to remove them from the list clicking on the button <b>Remove</b> below.</p></qt>" ) );
    filetypeList->header()->setLabel( 0, tr2i18n( "Mimetype" ) );
    filetypeList->header()->setLabel( 1, tr2i18n( "Description" ) );
    QWhatsThis::add( filetypeList, tr2i18n( "<qt><p>This list should show the types of file that your application can handle. This list is organized by <u>mimetypes</u>.</p>\n"
"<p>MIME, Multipurpose Internet (e)Mail Extension, is a standard protocol for identifying the type of data based on filename extensions and correspondent <u>mimetypes</u>. Example: the \"bmp\" part that comes after the dot in flower.bmp indicates that it is a specific kind of image, <u>image/x-bmp</u>. To know which application should open each type of file, the system should be informed about the abilities of each application to handle these extensions and mimetypes.</p>\n"
"<p>If you want to associate this application with one or more mimetypes that are not in this list, click on the button <b>Add</b> below. If there are one or more filetypes that this application cannot handle, you may want to remove them from the list clicking on the button <b>Remove</b> below.</p></qt>" ) );
    nameLabel->setText( tr2i18n( "&Name:" ) );
    QWhatsThis::add( nameLabel, tr2i18n( "Type the name you want to give to this application here. This application will appear under this name in the applications menu and in the panel." ) );
    QWhatsThis::add( nameEdit, tr2i18n( "Type the name you want to give to this application here. This application will appear under this name in the applications menu and in the panel." ) );
    textLabel2->setText( tr2i18n( "&Description:" ) );
    QWhatsThis::add( textLabel2, tr2i18n( "Type the description of this application, based on its use, here. Examples: a dial up application (KPPP) would be \"Dial up tool\"." ) );
    QWhatsThis::add( genNameEdit, tr2i18n( "Type the description of this application, based on its use, here. Examples: a dial up application (KPPP) would be \"Dial up tool\"." ) );
    textLabel3->setText( tr2i18n( "Comm&ent:" ) );
    QWhatsThis::add( textLabel3, tr2i18n( "Type any comment you think is useful here." ) );
    QWhatsThis::add( commentEdit, tr2i18n( "Type any comment you think is useful here." ) );
    textLabel4->setText( tr2i18n( "Co&mmand:" ) );
    QWhatsThis::add( textLabel4, tr2i18n( "Type the command to start this application here.\n"
"\n"
"Following the command, you can have several place holders which will be replaced with the actual values when the actual program is run:\n"
"%f - a single file name\n"
"%F - a list of files; use for applications that can open several local files at once\n"
"%u - a single URL\n"
"%U - a list of URLs\n"
"%d - the directory of the file to open\n"
"%D - a list of directories\n"
"%i - the icon\n"
"%m - the mini-icon\n"
"%c - the caption" ) );
    QWhatsThis::add( commandEdit, tr2i18n( "Type the command to start this application here.\n"
"\n"
"Following the command, you can have several place holders which will be replaced with the actual values when the actual program is run:\n"
"%f - a single file name\n"
"%F - a list of files; use for applications that can open several local files at once\n"
"%u - a single URL\n"
"%U - a list of URLs\n"
"%d - the directory of the file to open\n"
"%D - a list of directories\n"
"%i - the icon\n"
"%m - the mini-icon\n"
"%c - the caption" ) );
    browseButton->setText( tr2i18n( "&Browse..." ) );
    QWhatsThis::add( browseButton, tr2i18n( "Click here to browse your file system in order to find the desired executable." ) );
    textLabel5->setText( tr2i18n( "&Work path:" ) );
    QWhatsThis::add( textLabel5, tr2i18n( "Sets the working directory for your application." ) );
    QWhatsThis::add( pathEdit, tr2i18n( "Sets the working directory for your application." ) );
    addFiletypeButton->setText( tr2i18n( "Add..." ) );
    QWhatsThis::add( addFiletypeButton, tr2i18n( "Click on this button if you want to add a type of file (mimetype) that your application can handle." ) );
    delFiletypeButton->setText( tr2i18n( "Remove" ) );
    QWhatsThis::add( delFiletypeButton, tr2i18n( "If you want to remove a type of file (mimetype) that your application cannot handle, select the mimetype in the list above and click on this button." ) );
    advancedButton->setText( tr2i18n( "Ad&vanced Options" ) );
    QWhatsThis::add( advancedButton, tr2i18n( "Click here to modify the way this application will run, launch feedback, DCOP options or to run it as a different user." ) );
}

#include "kpropertiesdesktopbase.moc"
