parts/tools/addtooldlg.cpp
Go to the documentation of this file.00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "addtooldlg.h"
00013
00014
#include <qvariant.h>
00015
#include <kdialog.h>
00016
#include <qlabel.h>
00017
#include <qcheckbox.h>
00018
#include <qframe.h>
00019
#include <qlineedit.h>
00020
#include <qpushbutton.h>
00021
#include <kurlrequester.h>
00022
#include <qlayout.h>
00023
#include <qtooltip.h>
00024
#include <qwhatsthis.h>
00025
#include "kapplicationtree.h"
00026
#include "./addtooldlg.ui.h"
00027
00028
00029
00030
00031
00032
00033
00034
00035 AddToolDialog::AddToolDialog(
QWidget* parent,
const char* name,
bool modal, WFlags fl )
00036 :
QDialog( parent, name, modal, fl )
00037 {
00038
if ( !name )
00039 setName(
"add_tool_dialog" );
00040
add_tool_dialogLayout =
new QGridLayout(
this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(),
"add_tool_dialogLayout");
00041
00042
cmdlineLabel_2 =
new QLabel(
this,
"cmdlineLabel_2" );
00043
00044
add_tool_dialogLayout->addWidget(
cmdlineLabel_2, 3, 0 );
00045
00046
capturedBox =
new QCheckBox(
this,
"capturedBox" );
00047
00048
add_tool_dialogLayout->addMultiCellWidget(
capturedBox, 4, 4, 0, 1 );
00049
00050
cmdlineLabel =
new QLabel(
this,
"cmdlineLabel" );
00051
00052
add_tool_dialogLayout->addWidget(
cmdlineLabel, 2, 0 );
00053
00054
Line1 =
new QFrame(
this,
"Line1" );
00055
Line1->setFrameShape( QFrame::HLine );
00056
Line1->setFrameShadow( QFrame::Sunken );
00057
Line1->setFrameShape( QFrame::HLine );
00058
00059
add_tool_dialogLayout->addMultiCellWidget(
Line1, 5, 5, 0, 1 );
00060
00061
menutextLabel =
new QLabel(
this,
"menutextLabel" );
00062
00063
add_tool_dialogLayout->addWidget(
menutextLabel, 1, 0 );
00064
00065
paramEdit =
new QLineEdit(
this,
"paramEdit" );
00066
00067
add_tool_dialogLayout->addWidget(
paramEdit, 3, 1 );
00068
00069
menutextEdit =
new QLineEdit(
this,
"menutextEdit" );
00070
00071
add_tool_dialogLayout->addWidget(
menutextEdit, 1, 1 );
00072
00073
Layout2 =
new QHBoxLayout( 0, 0, KDialog::spacingHint(),
"Layout2");
00074
Spacer4 =
new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00075
Layout2->addItem(
Spacer4 );
00076
00077
okButton =
new QPushButton(
this,
"okButton" );
00078
okButton->setDefault( TRUE );
00079
Layout2->addWidget(
okButton );
00080
00081
cancelButton =
new QPushButton(
this,
"cancelButton" );
00082
Layout2->addWidget(
cancelButton );
00083
00084
add_tool_dialogLayout->addMultiCellLayout(
Layout2, 6, 6, 0, 1 );
00085
00086
execEdit =
new KURLRequester(
this,
"execEdit" );
00087
00088
add_tool_dialogLayout->addWidget(
execEdit, 2, 1 );
00089
00090
tree =
new KDevApplicationTree(
this,
"tree" );
00091
tree->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0,
tree->sizePolicy().hasHeightForWidth() ) );
00092
tree->setFocusPolicy( KDevApplicationTree::StrongFocus );
00093
00094
add_tool_dialogLayout->addMultiCellWidget(
tree, 0, 0, 0, 1 );
00095
languageChange();
00096 resize(
QSize(314, 514).expandedTo(minimumSizeHint()) );
00097 clearWState( WState_Polished );
00098
00099
00100 connect(
okButton, SIGNAL( clicked() ),
this, SLOT( accept() ) );
00101 connect(
cancelButton, SIGNAL( clicked() ),
this, SLOT( reject() ) );
00102
00103
00104 setTabOrder(
tree,
menutextEdit );
00105 setTabOrder(
menutextEdit,
execEdit );
00106 setTabOrder(
execEdit,
paramEdit );
00107 setTabOrder(
paramEdit,
capturedBox );
00108 setTabOrder(
capturedBox,
okButton );
00109 setTabOrder(
okButton,
cancelButton );
00110
00111
00112
cmdlineLabel_2->setBuddy(
paramEdit );
00113
cmdlineLabel->setBuddy(
execEdit );
00114
menutextLabel->setBuddy(
menutextEdit );
00115
init();
00116 }
00117
00118
00119
00120
00121 AddToolDialog::~AddToolDialog()
00122 {
00123
00124 }
00125
00126
00127
00128
00129
00130 void AddToolDialog::languageChange()
00131 {
00132 setCaption( tr2i18n(
"Add Tool" ) );
00133
cmdlineLabel_2->setText( tr2i18n(
"&Parameters:" ) );
00134
capturedBox->setText( tr2i18n(
"C&apture output" ) );
00135
cmdlineLabel->setText( tr2i18n(
"&Executable:" ) );
00136
menutextLabel->setText( tr2i18n(
"&Menu text:" ) );
00137
okButton->setText( tr2i18n(
"&OK" ) );
00138
cancelButton->setText( tr2i18n(
"&Cancel" ) );
00139 }
00140
00141
#include "addtooldlg.moc"
This file is part of the documentation for KDevelop Version 3.0.4.