diff options
author | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-07 07:58:10 (GMT) |
---|---|---|
committer | Mateusz Piekos <mateuszpiekos@gmail.com> | 2012-08-07 07:58:10 (GMT) |
commit | 4239fd83f1774cbcae15a501a4aa8d9fa4925181 (patch) | |
tree | 5225821c1f38d1bfcd6ec825cf940aac0b3eb06e /Swift/QtUI | |
parent | 7ee66e0a35a49f71bc93f8dd6eed77efd8f4e1c1 (diff) | |
download | swift-contrib-4239fd83f1774cbcae15a501a4aa8d9fa4925181.zip swift-contrib-4239fd83f1774cbcae15a501a4aa8d9fa4925181.tar.bz2 |
Added icon and title to whiteboard windows
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp | 11 | ||||
-rw-r--r-- | Swift/QtUI/Whiteboard/QtWhiteboardWindow.h | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp index ddbbd5c..eb22904 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.cpp @@ -21,10 +21,12 @@ #include <Swift/QtUI/Whiteboard/WhiteboardElementDrawingVisitor.h> #include <QMessageBox> -//using namespace std; namespace Swift { QtWhiteboardWindow::QtWhiteboardWindow(WhiteboardSession::ref whiteboardSession) : QWidget() { +#ifndef Q_WS_MAC + setWindowIcon(QIcon(":/logo-icon-16.png")); +#endif layout = new QVBoxLayout(this); hLayout = new QHBoxLayout; sidebarLayout = new QVBoxLayout; @@ -32,9 +34,6 @@ namespace Swift { scene = new QGraphicsScene(this); scene->setSceneRect(0, 0, 400, 400); - //BspTreeIndex is buggy, there are problems after removing items - //from scene - //scene->setItemIndexMethod(QGraphicsScene::NoIndex); graphicsView = new GView(scene, this); graphicsView->setMode(GView::Line); @@ -229,6 +228,10 @@ namespace Swift { QWidget::activateWindow(); } + void QtWhiteboardWindow::setName(const std::string& name) { + setWindowTitle(P2QSTRING(name)); + } + void QtWhiteboardWindow::handleLastItemChanged(QGraphicsItem* item, int pos, GView::Type type) { WhiteboardElement::ref el; QGraphicsLineItem* lineItem = qgraphicsitem_cast<QGraphicsLineItem*>(item); diff --git a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h index 903487a..1462981 100644 --- a/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h +++ b/Swift/QtUI/Whiteboard/QtWhiteboardWindow.h @@ -35,6 +35,7 @@ namespace Swift { void show(); void setSession(WhiteboardSession::ref session); void activateWindow(); + void setName(const std::string& name); private slots: void changeLineWidth(int i); |