Files
qt5-legatus-legacy/Lts/Plugins/PlanEditor/model_tree_widget.h
T
2026-08-13 18:33:10 +02:00

81 lines
1.6 KiB
C++
Executable File

/**
**
** @RDE_HEADER@
** model_tree_widget.h
** $Id$
** $HeadURL$
** $Author$
**
** -----------------------------------------------------------------------------------------------
**
** Hardware-Environment: Intel-PC
** Software-Environment: Windows 7, Qt 5.4. ArcGIS 10.2.5
**
** Language ........: C++ 11
**
** -----------------------------------------------------------------------------------------------
**
** Author ...........: Jörg Turla, SPD G, Tel. 3132
**
** -----------------------------------------------------------------------------------------------
**
** Notes .........:
**
** 14.06.2016, JT : First edition for use with Qt5
**
** -----------------------------------------------------------------------------------------------
*/
#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;
}; // ModelTreeWidget
} // namespace PlanEditor