KDevelop API Documentation

addglobaldlg.cpp

Go to the documentation of this file.
00001 #include <klocale.h>
00002 /****************************************************************************
00003 ** Form implementation generated from reading ui file './addglobaldlg.ui'
00004 **
00005 ** Created: Сбт Лют 8 20:51:03 2003
00006 **      by: The User Interface Compiler ($Id: addglobaldlg.cpp,v 1.4 2004/04/14 21:31:17 binner Exp $)
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "addglobaldlg.h"
00012 
00013 #include <qvariant.h>
00014 #include <qheader.h>
00015 #include <qlistview.h>
00016 #include <qpushbutton.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020 
00021 /* 
00022  *  Constructs a AddGlobalDlg as a child of 'parent', with the 
00023  *  name 'name' and widget flags set to 'f'.
00024  *
00025  *  The dialog will by default be modeless, unless you set 'modal' to
00026  *  TRUE to construct a modal dialog.
00027  */
00028 AddGlobalDlg::AddGlobalDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
00029     : QDialog( parent, name, modal, fl )
00030 
00031 {
00032     if ( !name )
00033     setName( "AddGlobalDlg" );
00034     setSizeGripEnabled( TRUE );
00035     AddGlobalDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "AddGlobalDlgLayout"); 
00036 
00037     Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 
00038 
00039     buttonHelp = new KPushButton( this, "buttonHelp" );
00040     buttonHelp->setAutoDefault( TRUE );
00041     Layout1->addWidget( buttonHelp );
00042     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00043     Layout1->addItem( spacer );
00044 
00045     buttonOk = new KPushButton( this, "buttonOk" );
00046     buttonOk->setAutoDefault( TRUE );
00047     buttonOk->setDefault( TRUE );
00048     Layout1->addWidget( buttonOk );
00049 
00050     buttonCancel = new KPushButton( this, "buttonCancel" );
00051     buttonCancel->setAutoDefault( TRUE );
00052     Layout1->addWidget( buttonCancel );
00053 
00054     AddGlobalDlgLayout->addLayout( Layout1, 1, 0 );
00055 
00056     fcglobal_view = new QListView( this, "fcglobal_view" );
00057     fcglobal_view->addColumn( tr2i18n( "Type Extension" ) );
00058     fcglobal_view->addColumn( tr2i18n( "Type Name" ) );
00059     fcglobal_view->addColumn( tr2i18n( "Template Location" ) );
00060     fcglobal_view->addColumn( tr2i18n( "Icon" ) );
00061     fcglobal_view->addColumn( tr2i18n( "Description" ) );
00062     fcglobal_view->setResizePolicy( QListView::AutoOne );
00063     fcglobal_view->setAllColumnsShowFocus( TRUE );
00064     fcglobal_view->setRootIsDecorated( TRUE );
00065     fcglobal_view->setResizeMode( QListView::AllColumns );
00066 
00067     AddGlobalDlgLayout->addWidget( fcglobal_view, 0, 0 );
00068     languageChange();
00069     resize( QSize(511, 282).expandedTo(minimumSizeHint()) );
00070 
00071     // signals and slots connections
00072     connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00073     connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00074 }
00075 
00076 /*
00077  *  Destroys the object and frees any allocated resources
00078  */
00079 AddGlobalDlg::~AddGlobalDlg()
00080 {
00081     // no need to delete child widgets, Qt does it all for us
00082 }
00083 
00084 /*
00085  *  Sets the strings of the subwidgets using the current
00086  *  language.
00087  */
00088 void AddGlobalDlg::languageChange()
00089 {
00090     setCaption( tr2i18n( "Select Global File Types" ) );
00091     buttonHelp->setGuiItem( KStdGuiItem::help() );
00092     buttonHelp->setAccel( QKeySequence( tr2i18n( "F1" ) ) );
00093     buttonOk->setGuiItem( KStdGuiItem::ok() );
00094     buttonOk->setAccel( QKeySequence( QString::null ) );
00095     buttonCancel->setGuiItem( KStdGuiItem::cancel() );
00096     buttonCancel->setAccel( QKeySequence( QString::null ) );
00097     fcglobal_view->header()->setLabel( 0, tr2i18n( "Type extension:" ) );
00098     fcglobal_view->header()->setLabel( 1, tr2i18n( "Type name:" ) );
00099     fcglobal_view->header()->setLabel( 2, tr2i18n( "Template location:" ) );
00100     fcglobal_view->header()->setLabel( 3, tr2i18n( "Icon:" ) );
00101     fcglobal_view->header()->setLabel( 4, tr2i18n( "Description:" ) );
00102 }
00103 
00104 #include "addglobaldlg.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:40 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003