Networksettings API API Documentation

mainwindow.cpp

00001 /****************************************************************************
00002 ** Form implementation generated from reading ui file 'mainwindow.ui'
00003 **
00004 ** Created: Sun Jan 11 16:00:59 2004
00005 **      by:  The User Interface Compiler (uic)
00006 **
00007 ** WARNING! All changes made in this file will be lost!
00008 ****************************************************************************/
00009 #include "mainwindow.h"
00010 
00011 #include <qframe.h>
00012 #include <qheader.h>
00013 #include <qlabel.h>
00014 #include <qlineedit.h>
00015 #include <qlistbox.h>
00016 #include <qlistview.h>
00017 #include <qpushbutton.h>
00018 #include <qtabwidget.h>
00019 #include <qlayout.h>
00020 #include <qvariant.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 
00024 /* 
00025  *  Constructs a MainWindow which is a child of 'parent', with the 
00026  *  name 'name' and widget flags set to 'f' 
00027  */
00028 MainWindow::MainWindow( QWidget* parent,  const char* name, WFlags fl )
00029     : QWidget( parent, name, fl )
00030 {
00031     if ( !name )
00032     setName( "MainWindow" );
00033     resize( 240, 289 ); 
00034     setCaption( tr( "Network Settings" ) );
00035     MainWindowLayout = new QVBoxLayout( this ); 
00036     MainWindowLayout->setSpacing( 6 );
00037     MainWindowLayout->setMargin( 0 );
00038 
00039     tabWidget = new QTabWidget( this, "tabWidget" );
00040     tabWidget->setEnabled( TRUE );
00041 
00042     Widget3 = new QWidget( tabWidget, "Widget3" );
00043     Widget3Layout = new QVBoxLayout( Widget3 ); 
00044     Widget3Layout->setSpacing( 6 );
00045     Widget3Layout->setMargin( 0 );
00046 
00047     connectionList = new QListView( Widget3, "connectionList" );
00048     connectionList->addColumn( tr( "s" ) );
00049     connectionList->addColumn( tr( "t" ) );
00050     connectionList->addColumn( tr( "Name" ) );
00051     connectionList->addColumn( tr( "in" ) );
00052     connectionList->addColumn( tr( "IP" ) );
00053     connectionList->setAllColumnsShowFocus( TRUE );
00054     QWhatsThis::add(  connectionList, tr( "A list of network settings to be choosen from" ) );
00055     Widget3Layout->addWidget( connectionList );
00056 
00057     Layout2 = new QGridLayout; 
00058     Layout2->setSpacing( 6 );
00059     Layout2->setMargin( 5 );
00060 
00061     addConnectionButton = new QPushButton( Widget3, "addConnectionButton" );
00062     addConnectionButton->setText( tr( "&Add" ) );
00063     QWhatsThis::add(  addConnectionButton, tr( "Add a new interface to the list." ) );
00064 
00065     Layout2->addWidget( addConnectionButton, 1, 0 );
00066 
00067     informationConnectionButton = new QPushButton( Widget3, "informationConnectionButton" );
00068     informationConnectionButton->setText( tr( "&Start/Stop" ) );
00069     QWhatsThis::add(  informationConnectionButton, tr( "Start and Stop the current interface, gives additional information about the interface." ) );
00070 
00071     Layout2->addWidget( informationConnectionButton, 0, 0 );
00072 
00073     configureConnectionButton = new QPushButton( Widget3, "configureConnectionButton" );
00074     configureConnectionButton->setText( tr( "&Configure" ) );
00075     QWhatsThis::add(  configureConnectionButton, tr( "Configure the current interface" ) );
00076 
00077     Layout2->addWidget( configureConnectionButton, 0, 1 );
00078 
00079     removeConnectionButton = new QPushButton( Widget3, "removeConnectionButton" );
00080     removeConnectionButton->setText( tr( "&Remove" ) );
00081     QWhatsThis::add(  removeConnectionButton, tr( "Remove the current interface from the list." ) );
00082 
00083     Layout2->addWidget( removeConnectionButton, 1, 1 );
00084     Widget3Layout->addLayout( Layout2 );
00085     tabWidget->insertTab( Widget3, tr( "Connections" ) );
00086 
00087     tab = new QWidget( tabWidget, "tab" );
00088     tabLayout = new QGridLayout( tab ); 
00089     tabLayout->setSpacing( 6 );
00090     tabLayout->setMargin( 11 );
00091     QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00092     tabLayout->addItem( spacer, 7, 2 );
00093 
00094     currentProfileLabel = new QLabel( tab, "currentProfileLabel" );
00095     currentProfileLabel->setFrameShape( QLabel::Panel );
00096     currentProfileLabel->setFrameShadow( QLabel::Sunken );
00097     currentProfileLabel->setText( tr( "All" ) );
00098 
00099     tabLayout->addWidget( currentProfileLabel, 0, 1 );
00100 
00101     setCurrentProfileButton = new QPushButton( tab, "setCurrentProfileButton" );
00102     setCurrentProfileButton->setText( tr( "&Set Current" ) );
00103 
00104     tabLayout->addWidget( setCurrentProfileButton, 3, 2 );
00105 
00106     Line6 = new QFrame( tab, "Line6" );
00107     Line6->setFrameStyle( QFrame::HLine | QFrame::Sunken );
00108 
00109     tabLayout->addMultiCellWidget( Line6, 5, 5, 0, 2 );
00110 
00111     Line1 = new QFrame( tab, "Line1" );
00112     Line1->setFrameStyle( QFrame::HLine | QFrame::Sunken );
00113 
00114     tabLayout->addMultiCellWidget( Line1, 1, 1, 0, 2 );
00115 
00116     TextLabel1 = new QLabel( tab, "TextLabel1" );
00117     TextLabel1->setText( tr( "Current Profile" ) );
00118 
00119     tabLayout->addWidget( TextLabel1, 0, 0 );
00120 
00121     removeProfileButton = new QPushButton( tab, "removeProfileButton" );
00122     removeProfileButton->setText( tr( "&Remove" ) );
00123 
00124     tabLayout->addWidget( removeProfileButton, 4, 2 );
00125 
00126     profilesList = new QListBox( tab, "profilesList" );
00127 
00128     tabLayout->addMultiCellWidget( profilesList, 3, 4, 0, 1 );
00129     QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00130     tabLayout->addItem( spacer_2, 0, 2 );
00131 
00132     TextLabel1_2 = new QLabel( tab, "TextLabel1_2" );
00133     TextLabel1_2->setText( tr( "Profiles" ) );
00134 
00135     tabLayout->addWidget( TextLabel1_2, 2, 0 );
00136 
00137     Layout6 = new QHBoxLayout; 
00138     Layout6->setSpacing( 6 );
00139     Layout6->setMargin( 0 );
00140 
00141     TextLabel1_3 = new QLabel( tab, "TextLabel1_3" );
00142     TextLabel1_3->setText( tr( "New Profile" ) );
00143     Layout6->addWidget( TextLabel1_3 );
00144 
00145     newProfile = new QLineEdit( tab, "newProfile" );
00146     Layout6->addWidget( newProfile );
00147 
00148     newProfileButton = new QPushButton( tab, "newProfileButton" );
00149     newProfileButton->setEnabled( FALSE );
00150     newProfileButton->setText( tr( "&Add" ) );
00151     Layout6->addWidget( newProfileButton );
00152 
00153     tabLayout->addMultiCellLayout( Layout6, 6, 6, 0, 2 );
00154     tabWidget->insertTab( tab, tr( "Profiles" ) );
00155     MainWindowLayout->addWidget( tabWidget );
00156 
00157     // tab order
00158     setTabOrder( tabWidget, connectionList );
00159     setTabOrder( connectionList, informationConnectionButton );
00160     setTabOrder( informationConnectionButton, configureConnectionButton );
00161     setTabOrder( configureConnectionButton, addConnectionButton );
00162     setTabOrder( addConnectionButton, removeConnectionButton );
00163     setTabOrder( removeConnectionButton, profilesList );
00164     setTabOrder( profilesList, setCurrentProfileButton );
00165     setTabOrder( setCurrentProfileButton, removeProfileButton );
00166     setTabOrder( removeProfileButton, newProfile );
00167     setTabOrder( newProfile, newProfileButton );
00168 }
00169 
00170 /*  
00171  *  Destroys the object and frees any allocated resources
00172  */
00173 MainWindow::~MainWindow()
00174 {
00175     // no need to delete child widgets, Qt does it all for us
00176 }
00177 
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