addconnection.cpp
00001
00002
00003
00004
00005
00006
00007
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
00022
00023
00024
00025
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
00065 connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
00066 connect( addButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
00067
00068
00069 setTabOrder( registeredServicesList, addButton );
00070 setTabOrder( addButton, cancelButton );
00071 }
00072
00073
00074
00075
00076 AddConnection::~AddConnection()
00077 {
00078
00079 }
00080
This file is part of the documentation for OPIE Version 1.0.