Networksettings API API Documentation

addconnection.cpp

00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'addconnection.ui'
00003 **
00004 ** Created: Sun Jan 11 16:01:04 2004
00005 **      by:  The User Interface Compiler (uic)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 #include "addconnection.h"
00010 
00011 #include <qheader.h>
00012 #include <qlabel.h>
00013 #include <qlistview.h>
00014 #include <qpushbutton.h>
00015 #include <qlayout.h>
00016 #include <qvariant.h>
00017 #include <qtooltip.h>
00018 #include <qwhatsthis.h>
00019 
00020 /* 
00021  *  Constructs a AddConnection which is a child of 'parent', with the 
00022  *  name 'name' and widget flags set to 'f' 
00023  *
00024  *  The dialog will by default be modeless, unless you set 'modal' to
00025  *  TRUE to construct a modal dialog.
00026  */
00027 AddConnection::AddConnection( QWidget* parent,  const char* name, bool modal, WFlags fl )
00028     : QDialog( parent, name, modal, fl )
00029 {
00030     if ( !name )
00031     setName( "AddConnection" );
00032     resize( 229, 268 ); 
00033     setCaption( tr( "Add Network Connection" ) );
00034     AddConnectionLayout = new QGridLayout( this ); 
00035     AddConnectionLayout->setSpacing( 6 );
00036     AddConnectionLayout->setMargin( 11 );
00037 
00038     cancelButton = new QPushButton( this, "cancelButton" );
00039     cancelButton->setText( tr( "&Cancel" ) );
00040 
00041     AddConnectionLayout->addWidget( cancelButton, 3, 1 );
00042 
00043     addButton = new QPushButton( this, "addButton" );
00044     addButton->setText( tr( "&Add" ) );
00045 
00046     AddConnectionLayout->addWidget( addButton, 3, 0 );
00047 
00048     registeredServicesList = new QListView( this, "registeredServicesList" );
00049     registeredServicesList->addColumn( tr( "Services" ) );
00050     registeredServicesList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)3, registeredServicesList->sizePolicy().hasHeightForWidth() ) );
00051     registeredServicesList->setMinimumSize( QSize( 0, 75 ) );
00052 
00053     AddConnectionLayout->addMultiCellWidget( registeredServicesList, 0, 0, 0, 1 );
00054     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00055     AddConnectionLayout->addItem( spacer, 2, 1 );
00056 
00057     help = new QLabel( this, "help" );
00058     help->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, help->sizePolicy().hasHeightForWidth() ) );
00059     help->setText( tr( "" ) );
00060     help->setAlignment( int( QLabel::WordBreak | QLabel::AlignTop | QLabel::AlignLeft ) );
00061 
00062     AddConnectionLayout->addMultiCellWidget( help, 1, 1, 0, 1 );
00063 
00064     // signals and slots connections
00065     connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
00066     connect( addButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
00067 
00068     // tab order
00069     setTabOrder( registeredServicesList, addButton );
00070     setTabOrder( addButton, cancelButton );
00071 }
00072 
00073 /*  
00074  *  Destroys the object and frees any allocated resources
00075  */
00076 AddConnection::~AddConnection()
00077 {
00078     // no need to delete child widgets, Qt does it all for us
00079 }
00080 
KDE Logo
This file is part of the documentation for OPIE Version 1.0.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:26:44 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001