QtHPConnect/include/hp_mditexteditor.h

64 lines
1.6 KiB
C
Raw Normal View History

2020-02-02 18:13:27 +01:00
/*
* This file is part of the QtHPConnect distribution (https://github.com/Indy970/QtHPConnect.git).
* Copyright (c) 2020 Ian Gebbie.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3 or later.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2019-02-10 14:32:15 +01:00
#ifndef HP_MDITEXTEDITOR_H
#define HP_MDITEXTEDITOR_H
#include <QObject>
#include <QWidget>
2019-02-10 14:43:00 +01:00
#include <QMdiSubWindow>
#include <QTreeView>
2019-02-26 20:56:39 +01:00
#include "hpdata.h"
2020-02-07 19:50:36 +01:00
#include "hp_mdiwindow.h"
2019-02-10 14:32:15 +01:00
2019-02-10 14:43:00 +01:00
class hpTreeItem;
2019-02-26 20:56:39 +01:00
class hpCalcData;
2019-02-10 14:43:00 +01:00
#include "texteditor.h"
2020-02-07 19:50:36 +01:00
class hp_mdiTextEdit: public hp_MdiWindow
2019-02-10 14:32:15 +01:00
{
2019-02-10 14:43:00 +01:00
Q_OBJECT
protected:
2019-02-26 20:56:39 +01:00
textEditor * textEdit =nullptr;
hpTreeItem * hptreeitem =nullptr;
2019-04-02 21:14:31 +02:00
// hpCalcData * hpcalc =nullptr;
2019-02-26 20:56:39 +01:00
QString filename;
hp_DataType type;
AbstractData * data =nullptr;
2019-02-10 14:43:00 +01:00
2019-02-10 14:32:15 +01:00
public:
2019-02-26 20:56:39 +01:00
hp_mdiTextEdit(QWidget * parent = nullptr, hpTreeItem * treeItem = nullptr,
2019-04-02 21:14:31 +02:00
AbstractData * calcData =nullptr);
hp_mdiTextEdit(QWidget * parent, hp_DataStruct filename,
AbstractData * calcData);
2019-02-10 14:43:00 +01:00
void setup();
2020-02-07 19:50:36 +01:00
bool save();
bool saveAs();
2019-02-10 14:43:00 +01:00
void show();
~hp_mdiTextEdit();
signals:
public slots:
2019-02-10 14:32:15 +01:00
};
2019-02-10 14:43:00 +01:00
#endif // HP_MDITEXTEDITOR_H