diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2017-02-28 14:46:39 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2017-02-28 14:46:39 +0100 |
commit | cb322a3acee9debf40c48ad1e3fb4458b0f51b7f (patch) | |
tree | 2cd3dc1060885152f0c706e0cf52bff0d8181d1e /tikzit/src/gui | |
parent | e1756ba69dd626073e22fd0a4f4c5fda42c88829 (diff) |
generic nodes
Diffstat (limited to 'tikzit/src/gui')
-rw-r--r-- | tikzit/src/gui/edgeitem.cpp | 89 | ||||
-rw-r--r-- | tikzit/src/gui/edgeitem.h | 28 | ||||
-rw-r--r-- | tikzit/src/gui/mainwindow.cpp | 57 | ||||
-rw-r--r-- | tikzit/src/gui/mainwindow.h | 11 | ||||
-rw-r--r-- | tikzit/src/gui/mainwindow.ui | 55 | ||||
-rw-r--r-- | tikzit/src/gui/nodeitem.cpp | 82 | ||||
-rw-r--r-- | tikzit/src/gui/nodeitem.h | 9 | ||||
-rw-r--r-- | tikzit/src/gui/propertypalette.cpp | 1 | ||||
-rw-r--r-- | tikzit/src/gui/tikzscene.cpp | 64 | ||||
-rw-r--r-- | tikzit/src/gui/tikzscene.h | 10 | ||||
-rw-r--r-- | tikzit/src/gui/tikzview.cpp | 65 | ||||
-rw-r--r-- | tikzit/src/gui/tikzview.h | 5 | ||||
-rw-r--r-- | tikzit/src/gui/toolpalette.cpp | 1 |
13 files changed, 349 insertions, 128 deletions
diff --git a/tikzit/src/gui/edgeitem.cpp b/tikzit/src/gui/edgeitem.cpp new file mode 100644 index 0000000..f45493d --- /dev/null +++ b/tikzit/src/gui/edgeitem.cpp @@ -0,0 +1,89 @@ +#include "tikzit.h" +#include "edgeitem.h" + +#include <QPainterPath> +#include <QPen> + +EdgeItem::EdgeItem(Edge *edge) +{ + _edge = edge; + setFlag(QGraphicsItem::ItemIsSelectable); + + QPen pen(Qt::black); + pen.setWidth(2); + setPen(pen); + _cp1Item = new QGraphicsEllipseItem(this); + _cp1Item->setParentItem(this); + _cp2Item = new QGraphicsEllipseItem(this); + _cp2Item->setParentItem(this); + syncPos(); +} + +void EdgeItem::syncPos() +{ + _edge->setAttributesFromData(); + _edge->updateControls(); + QPainterPath path; + + path.moveTo (toScreen(_edge->tail())); + path.cubicTo(toScreen(_edge->cp1()), + toScreen(_edge->cp2()), + toScreen(_edge->head())); + setPath(path); + + float r = GLOBAL_SCALEF * 0.05; + //painter->drawEllipse(toScreen(_edge->cp1()), r, r); + //painter->drawEllipse(toScreen(_edge->cp2()), r, r); +} + +void EdgeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + //QGraphicsPathItem::paint(painter, option, widget); + painter->setPen(pen()); + painter->setBrush(Qt::NoBrush); + painter->drawPath(path()); + + + + if (isSelected()) { + QColor draw; + QColor draw1; + QColor fill; + + if (_edge->basicBendMode()) { + draw = Qt::blue; + draw1 = QColor(100,100,255,100); + fill = QColor(200,200,255,50); + } else { + draw = Qt::darkGreen; + draw1 = QColor(0, 150, 0, 50); + fill = QColor(200,255,200,150); + } + + painter->setPen(QPen(draw1)); + + float r = GLOBAL_SCALEF * _edge->cpDist(); + painter->drawEllipse(toScreen(_edge->source()->point()), r, r); + painter->drawEllipse(toScreen(_edge->target()->point()), r, r); + + painter->setPen(QPen(draw)); + painter->setBrush(QBrush(fill)); + + painter->drawLine(toScreen(_edge->tail()), toScreen(_edge->cp1())); + painter->drawLine(toScreen(_edge->head()), toScreen(_edge->cp2())); + + r = GLOBAL_SCALEF * 0.05; + painter->drawEllipse(toScreen(_edge->cp1()), r, r); + painter->drawEllipse(toScreen(_edge->cp2()), r, r); + + painter->setPen(QPen(Qt::black)); + painter->setBrush(QBrush(QColor(255,255,255,200))); + painter->drawEllipse(toScreen(_edge->mid()), r, r); + } +} + +QRectF EdgeItem::boundingRect() const +{ + float r = GLOBAL_SCALEF * (_edge->cpDist() + 0.2); + return QGraphicsPathItem::boundingRect().adjusted(-r,-r,r,r); +} diff --git a/tikzit/src/gui/edgeitem.h b/tikzit/src/gui/edgeitem.h new file mode 100644 index 0000000..935138b --- /dev/null +++ b/tikzit/src/gui/edgeitem.h @@ -0,0 +1,28 @@ +#ifndef EDGEITEM_H +#define EDGEITEM_H + +#include "edge.h" + +#include <QObject> +#include <QGraphicsPathItem> +#include <QPainter> +#include <QStyleOptionGraphicsItem> +#include <QWidget> +#include <QGraphicsEllipseItem> + +class EdgeItem : public QGraphicsPathItem +{ +public: + EdgeItem(Edge *edge); + void syncPos(); + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, + QWidget *widget); + QRectF boundingRect() const; + +private: + Edge *_edge; + QGraphicsEllipseItem *_cp1Item; + QGraphicsEllipseItem *_cp2Item; +}; + +#endif // EDGEITEM_H diff --git a/tikzit/src/gui/mainwindow.cpp b/tikzit/src/gui/mainwindow.cpp index f7357ec..7d7ab04 100644 --- a/tikzit/src/gui/mainwindow.cpp +++ b/tikzit/src/gui/mainwindow.cpp @@ -1,6 +1,8 @@ #include "mainwindow.h" #include "ui_mainwindow.h" #include "tikzgraphassembler.h" +#include "toolpalette.h" +#include "tikzit.h" #include <QDebug> #include <QFile> @@ -15,12 +17,13 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { + _windowId = _numWindows; _numWindows++; ui->setupUi(this); - setAttribute(Qt::WA_DeleteOnClose); + setAttribute(Qt::WA_DeleteOnClose, true); _graph = new Graph(this); - tikzScene = new TikzScene(_graph, this); - ui->tikzView->setScene(tikzScene); + _tikzScene = new TikzScene(_graph, this); + ui->tikzView->setScene(_tikzScene); _fileName = ""; _pristine = true; @@ -33,7 +36,7 @@ MainWindow::MainWindow(QWidget *parent) : MainWindow::~MainWindow() { - //qDebug() << "~MainWindow"; + tikzit->removeWindow(this); } void MainWindow::open(QString fileName) @@ -45,6 +48,8 @@ void MainWindow::open(QString fileName) QSettings settings("tikzit", "tikzit"); settings.setValue("previous-file-path", fi.absolutePath()); + setWindowTitle("TiKZiT - " + fi.fileName()); + if (!file.open(QIODevice::ReadOnly)) { QMessageBox::critical(this, tr("Error"), tr("Could not open file")); @@ -61,9 +66,11 @@ void MainWindow::open(QString fileName) TikzGraphAssembler ass(newGraph); if (ass.parse(tikz)) { statusBar()->showMessage("TiKZ parsed successfully", 2000); - tikzScene->setGraph(newGraph); delete _graph; _graph = newGraph; + foreach (Node *n, _graph->nodes()) n->attachStyle(); + foreach (Edge *e, _graph->edges()) e->updateControls(); + _tikzScene->setGraph(_graph); } else { statusBar()->showMessage("Cannot read TiKZ source"); delete newGraph; @@ -77,24 +84,32 @@ void MainWindow::closeEvent(QCloseEvent *event) QMainWindow::closeEvent(event); } -void MainWindow::on_actionOpen_triggered() +void MainWindow::changeEvent(QEvent *event) { - QSettings settings("tikzit", "tikzit"); - QString fileName = QFileDialog::getOpenFileName( - this, - tr("Open File"), - settings.value("previous-file-path").toString(), - tr("TiKZ Files (*.tikz)")); - - if (!fileName.isEmpty()) { - if (_pristine) { - open(fileName); - } else { - MainWindow *w = new MainWindow(); - w->show(); - w->open(fileName); - } + if (event->type() == QEvent::ActivationChange && isActiveWindow()) { + tikzit->setActiveWindow(this); } + QMainWindow::changeEvent(event); +} + +TikzScene *MainWindow::tikzScene() const +{ + return _tikzScene; +} + +int MainWindow::windowId() const +{ + return _windowId; +} + +TikzView *MainWindow::tikzView() const +{ + return ui->tikzView; +} + +bool MainWindow::pristine() const +{ + return _pristine; } diff --git a/tikzit/src/gui/mainwindow.h b/tikzit/src/gui/mainwindow.h index f48fd64..2e52cd5 100644 --- a/tikzit/src/gui/mainwindow.h +++ b/tikzit/src/gui/mainwindow.h @@ -2,6 +2,7 @@ #define MAINWINDOW_H #include "tikzscene.h" +#include "tikzview.h" #include "graph.h" #include <QMainWindow> @@ -20,18 +21,22 @@ public: ~MainWindow(); void open(QString fileName); + bool pristine() const; + int windowId() const; + TikzView *tikzView() const; + TikzScene *tikzScene() const; protected: void closeEvent(QCloseEvent *event); + void changeEvent(QEvent *event); private: - TikzScene *tikzScene; + TikzScene *_tikzScene; Ui::MainWindow *ui; Graph *_graph; QString _fileName; bool _pristine; + int _windowId; static int _numWindows; -public slots: - void on_actionOpen_triggered(); }; #endif // MAINWINDOW_H diff --git a/tikzit/src/gui/mainwindow.ui b/tikzit/src/gui/mainwindow.ui index a2655e6..8c7e8ae 100644 --- a/tikzit/src/gui/mainwindow.ui +++ b/tikzit/src/gui/mainwindow.ui @@ -11,7 +11,7 @@ </rect> </property> <property name="windowTitle"> - <string>TikZiT</string> + <string>TikZiT - untitled</string> </property> <widget class="QWidget" name="centralWidget"> <layout class="QVBoxLayout" name="verticalLayout"> @@ -58,59 +58,6 @@ p, li { white-space: pre-wrap; } </item> </layout> </widget> - <widget class="QMenuBar" name="menuBar"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>476</width> - <height>22</height> - </rect> - </property> - <widget class="QMenu" name="menuFile"> - <property name="title"> - <string>File</string> - </property> - <addaction name="actionNew"/> - <addaction name="actionOpen"/> - <addaction name="separator"/> - <addaction name="actionClose"/> - <addaction name="actionSave"/> - <addaction name="actionSave_As"/> - </widget> - <widget class="QMenu" name="menuEdit"> - <property name="title"> - <string>Edit</string> - </property> - <addaction name="actionUndo"/> - <addaction name="actionRedo"/> - <addaction name="separator"/> - <addaction name="actionCut"/> - <addaction name="actionCopy"/> - <addaction name="actionPase"/> - <addaction name="actionDelete"/> - <addaction name="separator"/> - <addaction name="actionSelect_All"/> - <addaction name="actionDeselect_All"/> - </widget> - <widget class="QMenu" name="menuTikz"> - <property name="title"> - <string>Tikz</string> - </property> - <addaction name="actionParse"/> - </widget> - <widget class="QMenu" name="menuView"> - <property name="title"> - <string>View</string> - </property> - <addaction name="actionZoom_In"/> - <addaction name="actionZoom_Out"/> - </widget> - <addaction name="menuFile"/> - <addaction name="menuEdit"/> - <addaction name="menuView"/> - <addaction name="menuTikz"/> - </widget> <widget class="QStatusBar" name="statusBar"/> <action name="actionNew"> <property name="text"> diff --git a/tikzit/src/gui/nodeitem.cpp b/tikzit/src/gui/nodeitem.cpp index e817d98..d91bfd6 100644 --- a/tikzit/src/gui/nodeitem.cpp +++ b/tikzit/src/gui/nodeitem.cpp @@ -1,17 +1,93 @@ +#include "tikzit.h" #include "nodeitem.h" #include <QPen> #include <QBrush> +#include <QDebug> +#include <QFont> +#include <QFontMetrics> +#include <QPainterPathStroker> NodeItem::NodeItem(Node *node) { _node = node; - setPen(QPen(Qt::black)); - setBrush(QBrush(Qt::white)); + setFlag(QGraphicsItem::ItemIsSelectable); + setFlag(QGraphicsItem::ItemIsMovable); syncPos(); } void NodeItem::syncPos() { - setRect(80*_node->point().x() - 8, -80*_node->point().y() - 8, 16, 16); + setPos(toScreen(_node->point())); +} + + +void NodeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +{ + if (_node->style().isNone()) { + QColor c(180,180,200); + painter->setPen(QPen(c)); + painter->setBrush(QBrush(c)); + painter->drawEllipse(QPointF(0,0), 1,1); + + QPen pen(QColor(180,180,220)); + QVector<qreal> p; + p << 2.0 << 2.0; + pen.setDashPattern(p); + painter->setPen(pen); + painter->setBrush(Qt::NoBrush); + painter->drawPath(shape()); + } else { + QPen pen(_node->style().strokeColor); + pen.setWidth(_node->style().strokeThickness); + painter->setPen(pen); + painter->setBrush(QBrush(_node->style().fillColor)); + painter->drawPath(shape()); + } + + if (_node->label() != "") { + QString label = _node->label(); + QFont f("Monaco", 9); + QFontMetrics fm(f); + int w = fm.width(label) + 4; + int h = fm.height() + 2; + + QRectF rect = fm.boundingRect(label); + rect.adjust(-2,-2,2,2); + rect.moveCenter(QPointF(0,0)); + QPen pen(QColor(200,0,0,120)); + QVector<qreal> d; + d << 2.0 << 2.0; + pen.setDashPattern(d); + painter->setPen(pen); + painter->setBrush(QBrush(QColor(255,255,100,120))); + painter->drawRect(rect); + + painter->setPen(QPen(Qt::black)); + painter->setFont(f); + painter->drawText(rect, Qt::AlignCenter, _node->label()); + } + + if (isSelected()) { + QPainterPath sh = shape(); + QPainterPathStroker stroker; + stroker.setWidth(4); + QPainterPath outline = (stroker.createStroke(sh) + sh).simplified(); + painter->setPen(Qt::NoPen); + painter->setBrush(QBrush(QColor(150,200,255,100))); + painter->drawPath(outline); + } + +} + +QPainterPath NodeItem::shape() const +{ + QPainterPath path; + path.addEllipse(QPointF(0,0), GLOBAL_SCALEF * 0.1, GLOBAL_SCALEF * 0.1); + return path; +} + +QRectF NodeItem::boundingRect() const +{ + return shape().boundingRect().adjusted(-4,-4,4,4); } diff --git a/tikzit/src/gui/nodeitem.h b/tikzit/src/gui/nodeitem.h index 60b2c05..867d8a3 100644 --- a/tikzit/src/gui/nodeitem.h +++ b/tikzit/src/gui/nodeitem.h @@ -4,13 +4,18 @@ #include "node.h" #include <QObject> -#include <QGraphicsEllipseItem> +#include <QGraphicsItem> +#include <QPainterPath> +#include <QRectF> -class NodeItem : public QGraphicsEllipseItem +class NodeItem : public QGraphicsItem { public: NodeItem(Node *node); void syncPos(); + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); + QPainterPath shape() const; + QRectF boundingRect() const; private: Node *_node; }; diff --git a/tikzit/src/gui/propertypalette.cpp b/tikzit/src/gui/propertypalette.cpp index ea0e90e..ea906a7 100644 --- a/tikzit/src/gui/propertypalette.cpp +++ b/tikzit/src/gui/propertypalette.cpp @@ -23,7 +23,6 @@ PropertyPalette::PropertyPalette(QWidget *parent) : d->setProperty("key 2", "value 2"); QModelIndex i = d->index(0,0); - qDebug() << "data: " << i.data(); ui->treeView->setModel(d); QSettings settings("tikzit", "tikzit"); diff --git a/tikzit/src/gui/tikzscene.cpp b/tikzit/src/gui/tikzscene.cpp index 11d5a72..cf7cde5 100644 --- a/tikzit/src/gui/tikzscene.cpp +++ b/tikzit/src/gui/tikzscene.cpp @@ -1,7 +1,10 @@ +#include "tikzit.h" #include "tikzscene.h" #include <QPen> #include <QBrush> +#include <QDebug> + TikzScene::TikzScene(Graph *graph, QObject *parent) : QGraphicsScene(parent), _graph(graph) @@ -28,8 +31,17 @@ void TikzScene::graphReplaced() } nodeItems.clear(); - QPen blackPen(Qt::black); - QBrush redBrush(Qt::red); + foreach (EdgeItem *ei, edgeItems) { + removeItem(ei); + delete ei; + } + edgeItems.clear(); + + foreach (Edge *e, _graph->edges()) { + EdgeItem *ei = new EdgeItem(e); + edgeItems << ei; + addItem(ei); + } foreach (Node *n, _graph->nodes()) { NodeItem *ni = new NodeItem(n); @@ -38,45 +50,19 @@ void TikzScene::graphReplaced() } } -void TikzScene::drawBackground(QPainter *painter, const QRectF &rect) +void TikzScene::mousePressEvent(QGraphicsSceneMouseEvent *event) { - // draw the grid - int step = 10; + // TODO: check if we grabbed a control point - QPen pen; - pen.setWidth(2); - pen.setCosmetic(true); - pen.setColor(QColor(245,245,255)); - - painter->setPen(pen); - for (int x = step; x < rect.right(); x += step) { - if (x % (step * 8) != 0) { - painter->drawLine(x, rect.top(), x, rect.bottom()); - painter->drawLine(-x, rect.top(), -x, rect.bottom()); - } - } - - for (int y = step; y < rect.bottom(); y += step) { - if (y % (step * 8) != 0) { - painter->drawLine(rect.left(), y, rect.right(), y); - painter->drawLine(rect.left(), -y, rect.right(), -y); - } - } - - pen.setColor(QColor(240,240,245)); - painter->setPen(pen); - for (int x = step*8; x < rect.right(); x += step*8) { - painter->drawLine(x, rect.top(), x, rect.bottom()); - painter->drawLine(-x, rect.top(), -x, rect.bottom()); - } + QGraphicsScene::mousePressEvent(event); +} - for (int y = step*8; y < rect.bottom(); y += step*8) { - painter->drawLine(rect.left(), y, rect.right(), y); - painter->drawLine(rect.left(), -y, rect.right(), -y); - } +void TikzScene::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + QGraphicsScene::mouseMoveEvent(event); +} - pen.setColor(QColor(230,230,240)); - painter->setPen(pen); - painter->drawLine(rect.left(), 0, rect.right(), 0); - painter->drawLine(0, rect.top(), 0, rect.bottom()); +void TikzScene::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + QGraphicsScene::mouseReleaseEvent(event); } diff --git a/tikzit/src/gui/tikzscene.h b/tikzit/src/gui/tikzscene.h index c7039e6..2c77389 100644 --- a/tikzit/src/gui/tikzscene.h +++ b/tikzit/src/gui/tikzscene.h @@ -3,6 +3,7 @@ #include "graph.h" #include "nodeitem.h" +#include "edgeitem.h" #include <QWidget> #include <QGraphicsScene> @@ -10,6 +11,7 @@ #include <QRectF> #include <QVector> #include <QGraphicsEllipseItem> +#include <QGraphicsSceneMouseEvent> class TikzScene : public QGraphicsScene { @@ -20,13 +22,15 @@ public: void setGraph(Graph *graph); public slots: void graphReplaced(); - +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); private: Graph *_graph; QVector<NodeItem*> nodeItems; + QVector<EdgeItem*> edgeItems; -protected: - void drawBackground(QPainter *painter, const QRectF &rect); }; #endif // TIKZSCENE_H diff --git a/tikzit/src/gui/tikzview.cpp b/tikzit/src/gui/tikzview.cpp index d2a769c..a83c9ec 100644 --- a/tikzit/src/gui/tikzview.cpp +++ b/tikzit/src/gui/tikzview.cpp @@ -1,20 +1,83 @@ #include "tikzview.h" +#include "tikzit.h" #include <QDebug> TikzView::TikzView(QWidget *parent) : QGraphicsView(parent) { setRenderHint(QPainter::Antialiasing); - qDebug() << "TikzView()"; + setDragMode(QGraphicsView::RubberBandDrag); + _scale = 1.0f; } void TikzView::zoomIn() { + _scale *= 1.6f; scale(1.6,1.6); } void TikzView::zoomOut() { + _scale *= 0.625f; scale(0.625,0.625); } +void TikzView::drawBackground(QPainter *painter, const QRectF &rect) +{ + // draw the grid + int step = GLOBAL_SCALE / 8; + + QPen pen1; + pen1.setWidth(1); + pen1.setCosmetic(true); + pen1.setColor(QColor(230,230,230)); + + QPen pen2 = pen1; + pen2.setColor(QColor(200,200,200)); + + QPen pen3 = pen1; + pen3.setColor(QColor(160,160,160)); + + painter->setPen(pen1); + + if (_scale > 0.2f) { + for (int x = -step; x > rect.left(); x -= step) { + if (x % (step * 8) != 0) painter->drawLine(x, rect.top(), x, rect.bottom()); + } + + for (int x = step; x < rect.right(); x += step) { + if (x % (step * 8) != 0) painter->drawLine(x, rect.top(), x, rect.bottom()); + } + + for (int y = -step; y > rect.top(); y -= step) { + if (y % (step * 8) != 0) painter->drawLine(rect.left(), y, rect.right(), y); + } + + for (int y = step; y < rect.bottom(); y += step) { + if (y % (step * 8) != 0) painter->drawLine(rect.left(), y, rect.right(), y); + } + } + + painter->setPen(pen2); + + for (int x = -step*8; x > rect.left(); x -= step*8) { + painter->drawLine(x, rect.top(), x, rect.bottom()); + } + + for (int x = step*8; x < rect.right(); x += step*8) { + painter->drawLine(x, rect.top(), x, rect.bottom()); + } + + for (int y = -step*8; y > rect.top(); y -= step*8) { + painter->drawLine(rect.left(), y, rect.right(), y); + } + + for (int y = step*8; y < rect.bottom(); y += step*8) { + painter->drawLine(rect.left(), y, rect.right(), y); + } + + painter->setPen(pen3); + painter->drawLine(rect.left(), 0, rect.right(), 0); + painter->drawLine(0, rect.top(), 0, rect.bottom()); +} + diff --git a/tikzit/src/gui/tikzview.h b/tikzit/src/gui/tikzview.h index 032b9c4..b16e0df 100644 --- a/tikzit/src/gui/tikzview.h +++ b/tikzit/src/gui/tikzview.h @@ -8,6 +8,7 @@ #include <QGraphicsItem> #include <QStyleOptionGraphicsItem> #include <QRectF> +#include <QMouseEvent> class TikzView : public QGraphicsView { @@ -17,6 +18,10 @@ public: public slots: void zoomIn(); void zoomOut(); +protected: + void drawBackground(QPainter *painter, const QRectF &rect); +private: + float _scale; }; #endif // TIKZVIEW_H diff --git a/tikzit/src/gui/toolpalette.cpp b/tikzit/src/gui/toolpalette.cpp index 61b6cbf..3ee2106 100644 --- a/tikzit/src/gui/toolpalette.cpp +++ b/tikzit/src/gui/toolpalette.cpp @@ -9,7 +9,6 @@ ToolPalette::ToolPalette(QWidget *parent) : QToolBar(parent) { setWindowFlags(Qt::Window - | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::WindowDoesNotAcceptFocus); setOrientation(Qt::Vertical); |