X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2FUserInterface%2FWindowManager.cpp;fp=src%2FUserInterface%2FWindowManager.cpp;h=aa90587529ed0534b7a4f079a6dda8d32b5ff796;hb=6a31f3484996e9b7e719954c3a64a56d3fa586aa;hp=af006f10d4330c76c1875dc69dfc4339a3d3ae5f;hpb=59b4a9d85f3cd02e90c8efcecc66f9150f8a61f8;p=qtmeetings diff --git a/src/UserInterface/WindowManager.cpp b/src/UserInterface/WindowManager.cpp index af006f1..aa90587 100644 --- a/src/UserInterface/WindowManager.cpp +++ b/src/UserInterface/WindowManager.cpp @@ -2,17 +2,26 @@ #include #include +#include #include "ViewBase.h" #include "PopUpMessageBox.h" #include WindowManager::WindowManager( QWidget *aParent ) : - QWidget( aParent ), + QMainWindow( aParent ), iApplicationName( tr( "Qt Meetings" ) ), iCurrentView( 0 ) { this->setWindowTitle( iApplicationName ); + settingsAction = new QAction(tr("&Settings"), this); + closeAction = new QAction(tr("&Close"), this); + connect(settingsAction, SIGNAL(triggered()), this, SIGNAL(showSettingsClicked())); + connect(closeAction, SIGNAL(triggered()), this, SIGNAL(closeClicked())); + editMenu = menuBar()->addMenu(tr("&Edit")); + editMenu->addAction(settingsAction); + menuBar()->addMenu(editMenu); + menuBar()->addAction(closeAction); } WindowManager::~WindowManager() @@ -44,8 +53,12 @@ void WindowManager::showView( ViewBase *view ) iCurrentView = view; connect( iCurrentView, SIGNAL( eventDetected() ), this, SLOT( viewEventDetected() ) ); connect( this, SIGNAL( viewResized(const QSize &, const QSize &) ), iCurrentView, SLOT( viewResized( const QSize &, const QSize & ) ) ); - view->resize( this->size() ); - + if (((QWidget*)view) != this) + { + this->adjustSize(); + } + view->resize(this->size()); + //view->adjustSize(); view->show(); // Disconnect old connections and hide the view