diff options
Diffstat (limited to 'Swift/QtUI/ScreenSharing/QtRemoteScreenWindow.cpp')
-rw-r--r-- | Swift/QtUI/ScreenSharing/QtRemoteScreenWindow.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Swift/QtUI/ScreenSharing/QtRemoteScreenWindow.cpp b/Swift/QtUI/ScreenSharing/QtRemoteScreenWindow.cpp new file mode 100644 index 0000000..e6cd291 --- /dev/null +++ b/Swift/QtUI/ScreenSharing/QtRemoteScreenWindow.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2012 Yoann Blein + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. + */ + +#include "QtRemoteScreenWindow.h" +#include "RemoteScreenViewerWidget.h" + +#include <QToolBar> + +#include <Swiften/ScreenSharing/IncomingScreenSharing.h> + +namespace Swift { + +QtRemoteScreenWindow::QtRemoteScreenWindow(boost::shared_ptr<IncomingScreenSharing> incScreenSharing, QWidget *parent) + : QMainWindow(parent), RemoteScreenWindow(incScreenSharing) +{ + setCentralWidget(new RemoteScreenViewerWidget(iss)); + + controlToolBar = addToolBar(tr("Control")); + closeAction = controlToolBar->addAction(QIcon::fromTheme("window-close"), tr("&Terminate session"), this, SLOT(handleCloseTriggered())); +} + +QtRemoteScreenWindow::~QtRemoteScreenWindow() +{ +} + +void QtRemoteScreenWindow::handleCloseTriggered() +{ + iss->stop(); +} + +} |