Commit 809af9ba authored by Alexander Semke's avatar Alexander Semke
Browse files

Added an empty definition of interruptEvaluation() to WorksheetEntry. Most of...

Added an empty definition of interruptEvaluation() to WorksheetEntry. Most of the derived entry classes don't need to override it.
parent a46910b3
Pipeline #63009 passed with stage
in 23 minutes and 51 seconds
......@@ -257,10 +257,6 @@ QString HierarchyEntry::toPlain(const QString& commandSep, const QString& commen
}
void HierarchyEntry::interruptEvaluation()
{
}
bool HierarchyEntry::evaluate(EvaluationOption evalOp)
{
emit hierarhyEntryNameChange(text(), hierarchyText(), ((int)m_depth)-1);
......
......@@ -66,8 +66,6 @@ class HierarchyEntry : public WorksheetEntry
QJsonValue toJupyterJson() override;
QString toPlain(const QString& commandSep, const QString& commentStartingSeq, const QString& commentEndingSeq) override;
void interruptEvaluation() override;
void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
int searchText(const QString& text, const QString& pattern,
......
......@@ -177,11 +177,6 @@ QString HorizontalRuleEntry::toPlain(const QString&, const QString&, const QStri
return QString();
}
void HorizontalRuleEntry::interruptEvaluation()
{
return;
}
void HorizontalRuleEntry::layOutForWidth(qreal entry_zone_x, qreal w, bool force)
{
Q_UNUSED(force);
......
......@@ -32,7 +32,6 @@ class HorizontalRuleEntry : public WorksheetEntry
QDomElement toXml(QDomDocument&, KZip*) override;
QJsonValue toJupyterJson() override;
QString toPlain(const QString&, const QString&, const QString&) override;
void interruptEvaluation() override;
void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
void populateMenu(QMenu* menu, QPointF pos) override;
......
......@@ -236,10 +236,6 @@ QString ImageEntry::latexSizeString(const ImageSize& imgSize)
return QLatin1String("[") + sizeString + QLatin1String("]");
}
void ImageEntry::interruptEvaluation()
{
}
bool ImageEntry::evaluate(EvaluationOption evalOp)
{
evaluateNext(evalOp);
......
......@@ -39,8 +39,6 @@ class ImageEntry : public WorksheetEntry
QSizeF imageSize(const ImageSize& imgSize);
void interruptEvaluation() override;
void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
public Q_SLOTS:
......
......@@ -321,11 +321,6 @@ QString LatexEntry::toPlain(const QString& commandSep, const QString& commentSta
return commentStartingSeq + text.replace(QLatin1String("\n"), QLatin1String("\n") + commentStartingSeq) + QLatin1String("\n");
}
void LatexEntry::interruptEvaluation()
{
}
bool LatexEntry::evaluate(EvaluationOption evalOp)
{
bool success = false;
......
......@@ -38,8 +38,6 @@ class LatexEntry : public WorksheetEntry
QJsonValue toJupyterJson() override;
QString toPlain(const QString& commandSep, const QString& commentStartingSeq, const QString& commentEndingSeq) override;
void interruptEvaluation() override;
void layOutForWidth(qreal w, qreal entry_zone_x, bool force = false) override;
int searchText(const QString& text, const QString& pattern,
......
......@@ -357,10 +357,6 @@ QString MarkdownEntry::toPlain(const QString& commandSep, const QString& comment
return commentStartingSeq + text.replace(QLatin1String("\n"), QLatin1String("\n") + commentStartingSeq) + QLatin1String("\n");
}
void MarkdownEntry::interruptEvaluation()
{
}
bool MarkdownEntry::evaluate(EvaluationOption evalOp)
{
if(!rendered)
......
......@@ -44,8 +44,6 @@ class MarkdownEntry : public WorksheetEntry
QString plainText() const;
void interruptEvaluation() override;
void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
WorksheetCursor search(const QString& pattern, unsigned flags,
......
......@@ -108,11 +108,6 @@ QString PageBreakEntry::toPlain(const QString& commandSep, const QString& commen
return commentStartingSeq + QLatin1String("page break") + commentEndingSeq;
}
void PageBreakEntry::interruptEvaluation()
{
return;
}
void PageBreakEntry::layOutForWidth(qreal entry_zone_x, qreal w, bool force)
{
if (size().width() == w && m_msgItem->pos().x() == entry_zone_x && !force)
......
......@@ -31,8 +31,6 @@ class PageBreakEntry : public WorksheetEntry
QJsonValue toJupyterJson() override;
QString toPlain(const QString& commandSep, const QString& commentStartingSeq, const QString& commentEndingSeq) override;
void interruptEvaluation() override;
void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
//void paint(QPainter* painter, const QStyleOptionGraphicsItem * option,
......
......@@ -65,11 +65,6 @@ QString PlaceHolderEntry::toPlain(const QString&, const QString&, const QString&
return QString();
}
void PlaceHolderEntry::interruptEvaluation()
{
return;
}
void PlaceHolderEntry::layOutForWidth(qreal entry_zone_x, qreal w, bool force)
{
Q_UNUSED(entry_zone_x);
......
......@@ -25,8 +25,6 @@ class PlaceHolderEntry : public WorksheetEntry
QDomElement toXml(QDomDocument&, KZip*) override;
QJsonValue toJupyterJson() override;
QString toPlain(const QString&, const QString&, const QString&) override;
void interruptEvaluation() override;
void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
public Q_SLOTS:
......
......@@ -323,10 +323,6 @@ QString TextEntry::toPlain(const QString& commandSep, const QString& commentStar
}
void TextEntry::interruptEvaluation()
{
}
bool TextEntry::evaluate(EvaluationOption evalOp)
{
int i = 0;
......
......@@ -50,8 +50,6 @@ class TextEntry : public WorksheetEntry
QJsonValue toJupyterJson() override;
QString toPlain(const QString& commandSep, const QString& commentStartingSeq, const QString& commentEndingSeq) override;
void interruptEvaluation() override;
void layOutForWidth(qreal entry_zone_x, qreal w, bool force = false) override;
int searchText(const QString& text, const QString& pattern,
......
......@@ -68,7 +68,7 @@ class WorksheetEntry : public QGraphicsObject
virtual QJsonValue toJupyterJson()=0;
virtual QString toPlain(const QString& commandSep, const QString& commentStartingSeq, const QString& commentEndingSeq)=0;
virtual void interruptEvaluation()=0;
virtual void interruptEvaluation() {};
virtual void showCompletion();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment