kpropertiesmimetypebase.cpp00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "kpropertiesmimetypebase.h"
00012
00013 #include <qvariant.h>
00014 #include <klistview.h>
00015 #include <qlabel.h>
00016 #include <qheader.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020
00021
00022
00023
00024
00025 KPropertiesMimetypeBase::KPropertiesMimetypeBase( QWidget* parent, const char* name, WFlags fl )
00026 : QWidget( parent, name, fl )
00027 {
00028 if ( !name )
00029 setName( "widget2" );
00030 widget2Layout = new QVBoxLayout( this, 0, 6, "widget2Layout");
00031
00032 textLabel1 = new QLabel( this, "textLabel1" );
00033 widget2Layout->addWidget( textLabel1 );
00034
00035 listView = new KListView( this, "listView" );
00036 listView->addColumn( tr2i18n( "Mimetype" ) );
00037 listView->addColumn( tr2i18n( "Description" ) );
00038 widget2Layout->addWidget( listView );
00039 languageChange();
00040 resize( QSize(265, 213).expandedTo(minimumSizeHint()) );
00041 clearWState( WState_Polished );
00042
00043
00044 textLabel1->setBuddy( listView );
00045 }
00046
00047
00048
00049
00050 KPropertiesMimetypeBase::~KPropertiesMimetypeBase()
00051 {
00052
00053 }
00054
00055
00056
00057
00058
00059 void KPropertiesMimetypeBase::languageChange()
00060 {
00061 textLabel1->setText( tr2i18n( "Select one or more file types to add:" ) );
00062 listView->header()->setLabel( 0, tr2i18n( "Mimetype" ) );
00063 listView->header()->setLabel( 1, tr2i18n( "Description" ) );
00064 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"
00065 "<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>" ) );
00066 }
00067
00068 #include "kpropertiesmimetypebase.moc"
|