00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "partexplorerformbase.h"
00013
00014
#include <qvariant.h>
00015
#include <kdialog.h>
00016
#include <qlabel.h>
00017
#include <qlineedit.h>
00018
#include <qtextedit.h>
00019
#include <qlayout.h>
00020
#include <qtooltip.h>
00021
#include <qwhatsthis.h>
00022
00023
00024
00025
00026
00027 PartExplorerFormBase::PartExplorerFormBase(
QWidget* parent,
const char* name, WFlags fl )
00028 :
QWidget( parent, name, fl )
00029 {
00030
if ( !name )
00031 setName(
"PartExplorerFormBase" );
00032 setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
00033
PartExplorerFormBaseLayout =
new QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint(),
"PartExplorerFormBaseLayout");
00034
00035
textLabel1 =
new QLabel(
this,
"textLabel1" );
00036
textLabel1->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0,
textLabel1->sizePolicy().hasHeightForWidth() ) );
00037
PartExplorerFormBaseLayout->addWidget(
textLabel1 );
00038
00039
typeEdit =
new QLineEdit(
this,
"typeEdit" );
00040
typeEdit->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0,
typeEdit->sizePolicy().hasHeightForWidth() ) );
00041
PartExplorerFormBaseLayout->addWidget(
typeEdit );
00042
00043
textLabel1_2 =
new QLabel(
this,
"textLabel1_2" );
00044
textLabel1_2->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0,
textLabel1_2->sizePolicy().hasHeightForWidth() ) );
00045
PartExplorerFormBaseLayout->addWidget(
textLabel1_2 );
00046
00047
costraintsText =
new QTextEdit(
this,
"costraintsText" );
00048
costraintsText->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0,
costraintsText->sizePolicy().hasHeightForWidth() ) );
00049
PartExplorerFormBaseLayout->addWidget(
costraintsText );
00050
00051
resultsLabel =
new QLabel(
this,
"resultsLabel" );
00052
resultsLabel->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0,
resultsLabel->sizePolicy().hasHeightForWidth() ) );
00053
PartExplorerFormBaseLayout->addWidget(
resultsLabel );
00054
languageChange();
00055 resize(
QSize(429, 246).expandedTo(minimumSizeHint()) );
00056 clearWState( WState_Polished );
00057
00058
00059 setTabOrder(
typeEdit,
costraintsText );
00060
00061
00062
textLabel1->setBuddy(
typeEdit );
00063
textLabel1_2->setBuddy(
costraintsText );
00064 }
00065
00066
00067
00068
00069 PartExplorerFormBase::~PartExplorerFormBase()
00070 {
00071
00072 }
00073
00074
00075
00076
00077
00078 void PartExplorerFormBase::languageChange()
00079 {
00080 setCaption( tr2i18n(
"PartExplorer" ) );
00081 QToolTip::add(
this, tr2i18n(
"This is a front-end to KDE's KTrader: search your KDE documentation for more information about KDE services and KTrader" ) );
00082
textLabel1->setText( tr2i18n(
"KDE service &type:" ) );
00083 QToolTip::add(
textLabel1, QString::null );
00084 QToolTip::add(
typeEdit, QString::null );
00085 QWhatsThis::add(
typeEdit, tr2i18n(
"<b>Service type</b><p>Put here the Service type (i.e. <i>KDevelop/Plugin, KParts/ReadWritePart, ...</i>)." ) );
00086
textLabel1_2->setText( tr2i18n(
"&Additional constraints:" ) );
00087 QToolTip::add(
textLabel1_2, QString::null );
00088 QToolTip::add(
costraintsText, QString::null );
00089 QWhatsThis::add(
costraintsText, tr2i18n(
"<b>Constraints</b>Refine your query by writing additional constraints such as <i>([X-KDevelop-Scope]='Global')</i>)." ) );
00090
resultsLabel->setText( tr2i18n(
"&Results" ) );
00091 }
00092
00093
#include "partexplorerformbase.moc"