summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2018-10-01 16:19:21 +0200
committerAleks Kissinger <aleks0@gmail.com>2018-10-01 16:19:21 +0200
commite7a10091b64ddeb1d3e21e3f36abbf412021c815 (patch)
treefffe201f56a3c294cf34e4e11304317becca4504 /src/gui
parentf448114bc7eaa9b99780c108d5172f649c626a88 (diff)
fixed many warnings
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/edgeitem.cpp4
-rw-r--r--src/gui/mainwindow.ui4
-rw-r--r--src/gui/stylepalette.cpp7
-rw-r--r--src/gui/stylepalette.h4
-rw-r--r--src/gui/tikzscene.cpp2
-rw-r--r--src/gui/undocommands.cpp2
-rw-r--r--src/gui/undocommands.h2
7 files changed, 14 insertions, 11 deletions
diff --git a/src/gui/edgeitem.cpp b/src/gui/edgeitem.cpp
index 146b4e0..2f5b15c 100644
--- a/src/gui/edgeitem.cpp
+++ b/src/gui/edgeitem.cpp
@@ -102,6 +102,8 @@ void EdgeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidge
painter->drawPath(pth);
break;
}
+ case EdgeStyle::NoTip:
+ break;
}
//QPen outline = QPen(Qt::red);
@@ -126,6 +128,8 @@ void EdgeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidge
painter->drawPath(pth);
break;
}
+ case EdgeStyle::NoTip:
+ break;
}
if (isSelected()) {
diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui
index cae5735..8eff5ee 100644
--- a/src/gui/mainwindow.ui
+++ b/src/gui/mainwindow.ui
@@ -62,8 +62,8 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier New'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.SF NS Text'; font-size:13pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
- <property name="tabStopWidth">
- <number>20</number>
+ <property name="tabStopDistance">
+ <double>20.000000000000000</double>
</property>
</widget>
</widget>
diff --git a/src/gui/stylepalette.cpp b/src/gui/stylepalette.cpp
index 447e7a4..7423f29 100644
--- a/src/gui/stylepalette.cpp
+++ b/src/gui/stylepalette.cpp
@@ -89,7 +89,8 @@ void StylePalette::changeNodeStyle(int increment)
if (row < 0) row += _nodeModel->rowCount();
}
- QModelIndex i1 = ui->styleListView->rootIndex().child(row, 0);
+ //QModelIndex i1 = ui->styleListView->rootIndex().child(row, 0);
+ QModelIndex i1 = _nodeModel->index(row,0);
ui->styleListView->selectionModel()->select(i1, QItemSelectionModel::ClearAndSelect);
ui->styleListView->scrollTo(i1);
}
@@ -126,12 +127,12 @@ QString StylePalette::activeEdgeStyleName()
}
}
-void StylePalette::nodeStyleDoubleClicked(const QModelIndex &index)
+void StylePalette::nodeStyleDoubleClicked(const QModelIndex &)
{
tikzit->activeWindow()->tikzScene()->applyActiveStyleToNodes();
}
-void StylePalette::edgeStyleDoubleClicked(const QModelIndex &index)
+void StylePalette::edgeStyleDoubleClicked(const QModelIndex &)
{
qDebug() << "got double click";
tikzit->activeWindow()->tikzScene()->applyActiveStyleToEdges();
diff --git a/src/gui/stylepalette.h b/src/gui/stylepalette.h
index 5943e52..fc4e253 100644
--- a/src/gui/stylepalette.h
+++ b/src/gui/stylepalette.h
@@ -41,8 +41,8 @@ public:
public slots:
- void nodeStyleDoubleClicked(const QModelIndex &index);
- void edgeStyleDoubleClicked(const QModelIndex &index);
+ void nodeStyleDoubleClicked(const QModelIndex &);
+ void edgeStyleDoubleClicked(const QModelIndex &);
void on_buttonOpenTikzstyles_clicked();
void on_buttonEditTikzstyles_clicked();
void on_buttonRefreshTikzstyles_clicked();
diff --git a/src/gui/tikzscene.cpp b/src/gui/tikzscene.cpp
index b9afe4a..b2c5fd7 100644
--- a/src/gui/tikzscene.cpp
+++ b/src/gui/tikzscene.cpp
@@ -669,7 +669,7 @@ void TikzScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
if (ok) {
QMap<Node*,QString> oldLabels;
oldLabels.insert(ni->node(), ni->node()->label());
- ChangeLabelCommand *cmd = new ChangeLabelCommand(this, graph(), oldLabels, newLabel);
+ ChangeLabelCommand *cmd = new ChangeLabelCommand(this, oldLabels, newLabel);
_tikzDocument->undoStack()->push(cmd);
}
break;
diff --git a/src/gui/undocommands.cpp b/src/gui/undocommands.cpp
index 50b81a4..f713582 100644
--- a/src/gui/undocommands.cpp
+++ b/src/gui/undocommands.cpp
@@ -395,7 +395,7 @@ void PasteCommand::redo()
GraphUpdateCommand::redo();
}
-ChangeLabelCommand::ChangeLabelCommand(TikzScene *scene, Graph *graph, QMap<Node *, QString> oldLabels, QString newLabel, QUndoCommand *parent) :
+ChangeLabelCommand::ChangeLabelCommand(TikzScene *scene, QMap<Node *, QString> oldLabels, QString newLabel, QUndoCommand *parent) :
GraphUpdateCommand(scene, parent), _oldLabels(oldLabels), _newLabel(newLabel)
{
}
diff --git a/src/gui/undocommands.h b/src/gui/undocommands.h
index 1836892..dc60549 100644
--- a/src/gui/undocommands.h
+++ b/src/gui/undocommands.h
@@ -165,14 +165,12 @@ class ChangeLabelCommand : public GraphUpdateCommand
{
public:
explicit ChangeLabelCommand(TikzScene *scene,
- Graph *graph,
QMap<Node*,QString> oldLabels,
QString newLabel,
QUndoCommand *parent = 0);
void undo() override;
void redo() override;
private:
- Graph *_graph;
QMap<Node*,QString> _oldLabels;
QString _newLabel;
};