summaryrefslogtreecommitdiff
path: root/noncore/net/linphone/mainwindow.cpp
Side-by-side diff
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 @@
+#include <qlayout.h>
+#include <qpe/resource.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"), QIconSet( Resource::loadPixmap("SettingsIcon") ), 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();
+}