KDevelop API Documentation

environmentvariableswidgetbase.cpp

Go to the documentation of this file.
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './environmentvariableswidgetbase.ui'
00005 **
00006 ** Created: Tue Mar 22 23:44:18 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "environmentvariableswidgetbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qheader.h>
00017 #include <qlistview.h>
00018 #include <qpushbutton.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a EnvironmentVariablesWidgetBase as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  */
00027 EnvironmentVariablesWidgetBase::EnvironmentVariablesWidgetBase( QWidget* parent, const char* name, WFlags fl )
00028     : QWidget( parent, name, fl )
00029 {
00030     if ( !name )
00031     setName( "EnvironmentVariablesWidgetBase" );
00032     EnvironmentVariablesWidgetBaseLayout = new QGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "EnvironmentVariablesWidgetBaseLayout"); 
00033 
00034     listview = new QListView( this, "listview" );
00035     listview->addColumn( tr2i18n( "Name" ) );
00036     listview->addColumn( tr2i18n( "Value" ) );
00037     listview->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, listview->sizePolicy().hasHeightForWidth() ) );
00038     listview->setShowSortIndicator( TRUE );
00039     listview->setResizeMode( QListView::AllColumns );
00040 
00041     EnvironmentVariablesWidgetBaseLayout->addMultiCellWidget( listview, 0, 3, 0, 0 );
00042 
00043     removevar_button = new QPushButton( this, "removevar_button" );
00044     removevar_button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, removevar_button->sizePolicy().hasHeightForWidth() ) );
00045 
00046     EnvironmentVariablesWidgetBaseLayout->addWidget( removevar_button, 2, 1 );
00047     Spacer12 = new QSpacerItem( 20, 410, QSizePolicy::Minimum, QSizePolicy::Expanding );
00048     EnvironmentVariablesWidgetBaseLayout->addItem( Spacer12, 3, 1 );
00049 
00050     editvar_button = new QPushButton( this, "editvar_button" );
00051     editvar_button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, editvar_button->sizePolicy().hasHeightForWidth() ) );
00052 
00053     EnvironmentVariablesWidgetBaseLayout->addWidget( editvar_button, 1, 1 );
00054 
00055     addvar_button = new QPushButton( this, "addvar_button" );
00056     addvar_button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, addvar_button->sizePolicy().hasHeightForWidth() ) );
00057 
00058     EnvironmentVariablesWidgetBaseLayout->addWidget( addvar_button, 0, 1 );
00059     languageChange();
00060     resize( QSize(566, 399).expandedTo(minimumSizeHint()) );
00061     clearWState( WState_Polished );
00062 
00063     // signals and slots connections
00064     connect( addvar_button, SIGNAL( clicked() ), this, SLOT( addVarClicked() ) );
00065     connect( removevar_button, SIGNAL( clicked() ), this, SLOT( removeVarClicked() ) );
00066     connect( editvar_button, SIGNAL( clicked() ), this, SLOT( editVarClicked() ) );
00067 
00068     // tab order
00069     setTabOrder( listview, addvar_button );
00070     setTabOrder( addvar_button, removevar_button );
00071 }
00072 
00073 /*
00074  *  Destroys the object and frees any allocated resources
00075  */
00076 EnvironmentVariablesWidgetBase::~EnvironmentVariablesWidgetBase()
00077 {
00078     // no need to delete child widgets, Qt does it all for us
00079 }
00080 
00081 /*
00082  *  Sets the strings of the subwidgets using the current
00083  *  language.
00084  */
00085 void EnvironmentVariablesWidgetBase::languageChange()
00086 {
00087     setCaption( tr2i18n( "Environment Variables" ) );
00088     listview->header()->setLabel( 0, tr2i18n( "Name" ) );
00089     listview->header()->setLabel( 1, tr2i18n( "Value" ) );
00090     removevar_button->setText( tr2i18n( "&Remove" ) );
00091     editvar_button->setText( tr2i18n( "&Edit" ) );
00092     addvar_button->setText( tr2i18n( "A&dd / Copy" ) );
00093 }
00094 
00095 void EnvironmentVariablesWidgetBase::addVarClicked()
00096 {
00097     qWarning( "EnvironmentVariablesWidgetBase::addVarClicked(): Not implemented yet" );
00098 }
00099 
00100 void EnvironmentVariablesWidgetBase::removeVarClicked()
00101 {
00102     qWarning( "EnvironmentVariablesWidgetBase::removeVarClicked(): Not implemented yet" );
00103 }
00104 
00105 void EnvironmentVariablesWidgetBase::editVarClicked()
00106 {
00107     qWarning( "EnvironmentVariablesWidgetBase::editVarClicked(): Not implemented yet" );
00108 }
00109 
00110 #include "environmentvariableswidgetbase.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 Wed Mar 23 00:03:52 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003