56 lines
878 B
C++
Executable File
56 lines
878 B
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "model_tree_widget_item.h"
|
|
|
|
#include "dialog.h"
|
|
|
|
|
|
class QGroupBox;
|
|
|
|
namespace PlanEditor
|
|
{
|
|
|
|
class PlanEditor;
|
|
|
|
class ModelTreeWidget : public Dialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
using BaseClass = Dialog;
|
|
|
|
ModelTreeWidget(PlanEditor *planEditor, QWidget *parent);
|
|
~ModelTreeWidget() = default;
|
|
|
|
QTreeWidgetItem *rootItem() const { return m_itemTreeRoot; }
|
|
|
|
void showNeedSaveFlag(bool);
|
|
|
|
void setNameOfPlan( const QString & nameOfPlan );
|
|
|
|
bool isEmpty() const;
|
|
|
|
void haveChanges(bool on);
|
|
|
|
private:
|
|
void keyPressEvent(QKeyEvent *event);
|
|
|
|
void buildTitle();
|
|
|
|
QPointer<PlanEditor> m_planEditor;
|
|
QGroupBox *m_treeGroup;
|
|
QTreeWidget *m_treeWidget;
|
|
QTreeWidgetItem *m_itemTreeRoot;
|
|
QString m_nameOfPlan;
|
|
QString m_title;
|
|
bool m_needSaveFlag;
|
|
|
|
};
|
|
|
|
|
|
}
|