Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mainwindow.cpp

Go to the documentation of this file.
00001 #include <qlayout.h>
00002 #include <opie2/oresource.h>
00003 #include <qpe/qpeapplication.h>
00004 
00005 #include "mainwindow.h"
00006 #include "linphoneconfig.h"
00007 
00008 MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
00009 : QMainWindow( parent, name, flags ) {
00010 
00011     setCaption( tr( "Sip Phone" ) );
00012     setToolBarsMovable( false );
00013 
00014     toolBar = new QToolBar( this );
00015     toolBar->setHorizontalStretchable( true );
00016     menuBar = new QMenuBar( toolBar );
00017     prefMenu = new QPopupMenu( menuBar );
00018     menuBar->insertItem( tr( "Connection" ), prefMenu );
00019 
00020     settings = new QAction( tr("Settings"), Opie::Core::OResource::loadPixmap("SettingsIcon", Opie::Core::OResource::SmallIcon) ), 0, 0, this);
00021     settings->addTo( prefMenu );
00022     connect( settings, SIGNAL( activated() ),
00023              SLOT( slotSettings() ) );
00024 
00025     mainWidget = new  QLinphoneMainWidget( this, "qlinphone", WStyle_ContextHelp );
00026     setCentralWidget( mainWidget );
00027 }
00028 
00029 
00030 MainWindow::~MainWindow() {}
00031 
00032 void MainWindow::slotSettings() {
00033     LinPhoneConfig settings( this,  0, true,  WStyle_ContextHelp );
00034     QPEApplication::execDialog( &settings );
00035     // FIXME - only in OK case
00036     mainWidget->createLinphoneCore();
00037 }

Generated on Sat Nov 5 16:15:52 2005 for OPIE by  doxygen 1.4.2