1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include <qlayout.h>
#include <opie2/oresource.h>
#include <qpe/qpeapplication.h>
#include "mainwindow.h"
#include "linphoneconfig.h"
MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
: QMainWindow( parent, name, flags ) {
setCaption( tr( "Sip Phone" ) );
setToolBarsMovable( false );
toolBar = new QToolBar( this );
toolBar->setHorizontalStretchable( true );
menuBar = new QMenuBar( toolBar );
prefMenu = new QPopupMenu( menuBar );
menuBar->insertItem( tr( "Connection" ), prefMenu );
settings = new QAction( tr("Settings"), Opie::Core::OResource::loadPixmap("SettingsIcon", Opie::Core::OResource::SmallIcon) ), 0, 0, this);
settings->addTo( prefMenu );
connect( settings, SIGNAL( activated() ),
SLOT( slotSettings() ) );
mainWidget = new QLinphoneMainWidget( this, "qlinphone", WStyle_ContextHelp );
setCentralWidget( mainWidget );
}
MainWindow::~MainWindow() {}
void MainWindow::slotSettings() {
LinPhoneConfig settings( this, 0, true, WStyle_ContextHelp );
QPEApplication::execDialog( &settings );
// FIXME - only in OK case
mainWidget->createLinphoneCore();
}
|