File indexing completed on 2024-05-19 15:02:15
0001 /*************************************************************************** 0002 File : CantorWorksheetView.h 0003 Project : LabPlot 0004 Description : View class for CantorWorksheet 0005 -------------------------------------------------------------------- 0006 Copyright : (C) 2015 Garvit Khatri (garvitdelhi@gmail.com) 0007 0008 ***************************************************************************/ 0009 0010 /*************************************************************************** 0011 * * 0012 * This program is free software; you can redistribute it and/or modify * 0013 * it under the terms of the GNU General Public License as published by * 0014 * the Free Software Foundation; either version 2 of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 * This program is distributed in the hope that it will be useful, * 0018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0020 * GNU General Public License for more details. * 0021 * * 0022 * You should have received a copy of the GNU General Public License * 0023 * along with this program; if not, write to the Free Software * 0024 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0025 * Boston, MA 02110-1301 USA * 0026 * * 0027 ***************************************************************************/ 0028 #ifndef CANTORWORKSHEETVIEW_H 0029 #define CANTORWORKSHEETVIEW_H 0030 0031 #include <QWidget> 0032 #include <cantor/session.h> 0033 0034 class QToolBar; 0035 class QMenu; 0036 0037 class CantorWorksheet; 0038 namespace KParts { 0039 class ReadWritePart; 0040 } 0041 0042 class CantorWorksheetView : public QWidget { 0043 Q_OBJECT 0044 0045 public: 0046 explicit CantorWorksheetView(CantorWorksheet*); 0047 ~CantorWorksheetView() override; 0048 0049 public slots: 0050 void createContextMenu(QMenu*); 0051 void fillToolBar(QToolBar*); 0052 0053 private slots: 0054 void triggerCantorAction(QAction*); 0055 0056 private: 0057 CantorWorksheet* m_worksheet; 0058 KParts::ReadWritePart* m_part{nullptr}; 0059 0060 QAction* m_evaluateEntryAction{nullptr}; 0061 QAction* m_insertCommandEntryAction{nullptr}; 0062 QAction* m_insertTextEntryAction{nullptr}; 0063 QAction* m_insertMarkdownEntryAction{nullptr}; 0064 QAction* m_insertLatexEntryAction{nullptr}; 0065 QAction* m_insertPageBreakAction{nullptr}; 0066 QAction* m_removeCurrentEntryAction{nullptr}; 0067 QAction* m_computeEigenvectorsAction{nullptr}; 0068 QAction* m_createMatrixAction{nullptr}; 0069 QAction* m_computeEigenvaluesAction{nullptr}; 0070 QAction* m_invertMatrixAction{nullptr}; 0071 QAction* m_differentiationAction{nullptr}; 0072 QAction* m_integrationAction{nullptr}; 0073 QAction* m_solveEquationsAction{nullptr}; 0074 QAction* m_restartBackendAction{nullptr}; 0075 QAction* m_evaluateWorsheetAction{nullptr}; 0076 QAction* m_zoomIn{nullptr}; 0077 QAction* m_zoomOut{nullptr}; 0078 QAction* m_find{nullptr}; 0079 QAction* m_replace{nullptr}; 0080 QAction* m_syntaxHighlighting{nullptr}; 0081 QAction* m_lineNumbers{nullptr}; 0082 QAction* m_animateWorksheet{nullptr}; 0083 QAction* m_latexTypesetting{nullptr}; 0084 QAction* m_showCompletion{nullptr}; 0085 0086 QMenu* m_worksheetMenu{nullptr}; 0087 QMenu* m_linearAlgebraMenu{nullptr}; 0088 QMenu* m_calculateMenu{nullptr}; 0089 QMenu* m_settingsMenu{nullptr}; 0090 0091 void initActions(); 0092 void initMenus(); 0093 0094 private slots: 0095 void statusChanged(Cantor::Session::Status); 0096 }; 0097 0098 #endif // CANTORWORKSHEETVIEW_H