kpropertiesmimetypebase.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './kpropertiesmimetypebase.ui'
00005 **
00006 ** Created: Mon Jul 16 17:44:55 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "kpropertiesmimetypebase.h"
00013 
00014 #include <qvariant.h>
00015 #include <klistview.h>
00016 #include <qlabel.h>
00017 #include <qheader.h>
00018 #include <qlayout.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021 
00022 /*
00023  *  Constructs a KPropertiesMimetypeBase as a child of 'parent', with the
00024  *  name 'name' and widget flags set to 'f'.
00025  */
00026 KPropertiesMimetypeBase::KPropertiesMimetypeBase( QWidget* parent, const char* name, WFlags fl )
00027     : QWidget( parent, name, fl )
00028 {
00029     if ( !name )
00030     setName( "widget2" );
00031     widget2Layout = new QVBoxLayout( this, 0, 6, "widget2Layout"); 
00032 
00033     textLabel1 = new QLabel( this, "textLabel1" );
00034     widget2Layout->addWidget( textLabel1 );
00035 
00036     listView = new KListView( this, "listView" );
00037     listView->addColumn( tr2i18n( "Mimetype" ) );
00038     listView->addColumn( tr2i18n( "Description" ) );
00039     widget2Layout->addWidget( listView );
00040     languageChange();
00041     resize( QSize(265, 213).expandedTo(minimumSizeHint()) );
00042     clearWState( WState_Polished );
00043 
00044     // buddies
00045     textLabel1->setBuddy( listView );
00046 }
00047 
00048 /*
00049  *  Destroys the object and frees any allocated resources
00050  */
00051 KPropertiesMimetypeBase::~KPropertiesMimetypeBase()
00052 {
00053     // no need to delete child widgets, Qt does it all for us
00054 }
00055 
00056 /*
00057  *  Sets the strings of the subwidgets using the current
00058  *  language.
00059  */
00060 void KPropertiesMimetypeBase::languageChange()
00061 {
00062     textLabel1->setText( tr2i18n( "Select one or more file types to add:" ) );
00063     listView->header()->setLabel( 0, tr2i18n( "Mimetype" ) );
00064     listView->header()->setLabel( 1, tr2i18n( "Description" ) );
00065     QWhatsThis::add( listView, tr2i18n( "<qt><p>Select one or more types of file that your application can handle here. This list is organized by <u>mimetypes</u>.</p>\n"
00066 "<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>" ) );
00067 }
00068 
00069 #include "kpropertiesmimetypebase.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys