diff options
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); |