00001 #include <klocale.h>
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "rundialog.h"
00012
00013 #include <qvariant.h>
00014 #include <kmimemagic.h>
00015 #include <kservice.h>
00016 #include <krun.h>
00017 #include <kurl.h>
00018 #include <qpushbutton.h>
00019 #include <qlabel.h>
00020 #include <qlistbox.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 #include <qimage.h>
00025 #include <qpixmap.h>
00026
00027 #include "liturl.h"
00028 #include "./rundialog.ui.h"
00029
00030
00031
00032
00033
00034
00035
00036 RunDialog::RunDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
00037 : QDialog( parent, name, modal, fl )
00038 {
00039 if ( !name )
00040 setName( "RunDialog" );
00041 setSizeGripEnabled( TRUE );
00042 RunDialogLayout = new QVBoxLayout( this, 11, 6, "RunDialogLayout");
00043
00044 layout8 = new QVBoxLayout( 0, 0, 6, "layout8");
00045
00046 textLabel1 = new QLabel( this, "textLabel1" );
00047 layout8->addWidget( textLabel1 );
00048
00049 servicelist = new QListBox( this, "servicelist" );
00050 layout8->addWidget( servicelist );
00051
00052 Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
00053
00054 buttonHelp = new QPushButton( this, "buttonHelp" );
00055 buttonHelp->setAutoDefault( TRUE );
00056 Layout1->addWidget( buttonHelp );
00057 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00058 Layout1->addItem( spacer );
00059
00060 buttonOk = new QPushButton( this, "buttonOk" );
00061 buttonOk->setAutoDefault( TRUE );
00062 buttonOk->setDefault( TRUE );
00063 Layout1->addWidget( buttonOk );
00064 layout8->addLayout( Layout1 );
00065 RunDialogLayout->addLayout( layout8 );
00066 languageChange();
00067 resize( QSize(547, 596).expandedTo(minimumSizeHint()) );
00068 clearWState( WState_Polished );
00069
00070
00071 connect( servicelist, SIGNAL( doubleClicked(QListBoxItem*) ), this, SLOT( slotSelected(QListBoxItem*) ) );
00072 init();
00073 }
00074
00075
00076
00077
00078 RunDialog::~RunDialog()
00079 {
00080
00081 }
00082
00083
00084
00085
00086
00087 void RunDialog::languageChange()
00088 {
00089 setCaption( tr2i18n( "MyDialog" ) );
00090 textLabel1->setText( tr2i18n( "Double-click to open in application." ) );
00091 buttonHelp->setText( tr2i18n( "&Help" ) );
00092 buttonHelp->setAccel( QKeySequence( tr2i18n( "F1" ) ) );
00093 buttonOk->setText( tr2i18n( "Close" ) );
00094 buttonOk->setAccel( QKeySequence( QString::null ) );
00095 }
00096
00097 #include "rundialog.moc"