summaryrefslogtreecommitdiff
path: root/noncore/net/linphone/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/net/linphone/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/linphone/mainwindow.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/noncore/net/linphone/mainwindow.cpp b/noncore/net/linphone/mainwindow.cpp
new file mode 100644
index 0000000..1bd9987
--- a/dev/null
+++ b/noncore/net/linphone/mainwindow.cpp
@@ -0,0 +1,37 @@
1#include <qlayout.h>
2#include <qpe/resource.h>
3#include <qpe/qpeapplication.h>
4
5#include "mainwindow.h"
6#include "linphoneconfig.h"
7
8MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
9: QMainWindow( parent, name, flags ) {
10
11 setCaption( tr( "Sip Phone" ) );
12 setToolBarsMovable( false );
13
14 toolBar = new QToolBar( this );
15 toolBar->setHorizontalStretchable( true );
16 menuBar = new QMenuBar( toolBar );
17 prefMenu = new QPopupMenu( menuBar );
18 menuBar->insertItem( tr( "Connection" ), prefMenu );
19
20 settings = new QAction( tr("Settings"), QIconSet( Resource::loadPixmap("SettingsIcon") ), 0, 0, this);
21 settings->addTo( prefMenu );
22 connect( settings, SIGNAL( activated() ),
23 SLOT( slotSettings() ) );
24
25 mainWidget = new QLinphoneMainWidget( this, "qlinphone", WStyle_ContextHelp );
26 setCentralWidget( mainWidget );
27}
28
29
30MainWindow::~MainWindow() {}
31
32void MainWindow::slotSettings() {
33 LinPhoneConfig settings( this, 0, true, WStyle_ContextHelp );
34 QPEApplication::execDialog( &settings );
35 // FIXME - only in OK case
36 mainWidget->createLinphoneCore();
37}