File indexing completed on 2024-05-26 11:22:23

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2015 Alexander Rieder <alexanderrieder@gmail.com>
0004 */
0005 
0006 #ifndef _WORKSHEET_ACCESS_INTERFACE_H
0007 #define _WORKSHEET_ACCESS_INTERFACE_H
0008 
0009 #include "cantor_export.h"
0010 
0011 #include<QObject>
0012 
0013 
0014 namespace Cantor
0015 {
0016     class Session;
0017 
0018 class CANTOR_EXPORT WorksheetAccessInterface : public QObject
0019 {
0020   Q_OBJECT
0021   public:
0022     static QLatin1String Name;
0023     explicit WorksheetAccessInterface(QObject* parent);
0024     ~WorksheetAccessInterface() override = default;
0025   public:
0026     virtual QByteArray saveWorksheetToByteArray() = 0;
0027     virtual void loadWorksheetFromByteArray(QByteArray* data) = 0;
0028 
0029     virtual Session* session() = 0;
0030   public Q_SLOTS:
0031       virtual void evaluate() = 0;
0032       virtual void interrupt() = 0;
0033 
0034   Q_SIGNALS:
0035       void modified();
0036 };
0037 
0038 }
0039 
0040 #endif
0041 
0042 
0043 
0044