You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/mGui/mGuiTree/TreeWx/TreeWxMainDa.h

92 lines
3.2 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "TreeWxMain.h"
class M_GUI_TREE_EXPORT TreeWxMainDa : public TreeWxMain
{
Q_OBJECT
public:
TreeWxMainDa(QWidget* parent = 0);
~TreeWxMainDa();
// 填写树
// virtual void fillTree();
// virtual void initTopLevels();
// virtual void initTopLevel_OneWell(ZxDataObject* p, \
// TreeItemMain*& pItem, \
// TreeItemMain* pItemP, \
// bool bExcusive = true);
virtual void initSubLevels(TreeItemMain* pItem);
void initSubLevel_WellPF(TreeItemMain *&pParent);
void initThirdLevel_WellPF(TreeItemMain*& pParent);
void initSubLevel_WellOther(TreeItemMain *&pParent);
void initThirdLevel_WellOther(TreeItemMain*& p);
// void initTopLevel_AllData();
// void initSubLevel_AllData(TreeItemMain *&p);
// 改变当前选项状态
virtual void modifyCurrentItemStates(QString sItemName, bool bInit);
protected:
/// 右键菜单功能_节点通用
virtual void initContextMenuCommonNode(QMenu* pMenu);
// 空节点通用
virtual void initContextMenuCommonAll(QMenu* pMenu);
// 右键节点级别的菜单
virtual void initContextMenuWell(QMenu* pMenu);
void initContextMenuDataChild(QMenu* pMenu);
void initContextMenuPFChild(QMenu* pMenu);
virtual bool delCurrentNodes(QList<TreeItemBase *> &listItems);
// 如果点击的是区块或井,那么获取油田、区块信息
bool getCurItemExtInfos(QMap<QString, QVariant>& map);
virtual void changeNodeAttrs(TreeItemMain*& p);
virtual QString getTipsOf(TreeItemMain*& p);
///////////////////////////////////////////////////////////
// 拖拽相关的函数处理,很啰嗦
virtual bool isDragAccepted(QDragEnterEvent* event);
virtual void dealwithDrop(QDropEvent* event);
bool findParentItem2Drop(MainTreeNodeType oType, \
QModelIndex modelIndex, \
TreeItemMain*& pItemP, \
int& nIndex);
bool _findParentItem2DropWell(QModelIndex modelIndex, \
TreeItemMain*& pItemP, \
int& nIndex);
bool _findParentItem2DropPF(QModelIndex modelIndex, \
TreeItemMain*& pItemP, \
int& nIndex);
void dropNodeItem(TreeItemMain* pItemSrc, \
TreeItemMain* pItemDestP, \
MainTreeNodeType oType, int nIndex);
bool makesureMoveNode(TreeItemMain* pItemSrc, \
TreeItemMain* pItemDestP, \
MainTreeNodeType oType);
bool updateDataObj(ZxDataObject* pDataObj, \
TreeItemMain* pItemSrcA, \
TreeItemMain* pItemDestP, \
MainTreeNodeType oType);
///////////////////////////////////////////////////////////
public slots:
void slotNewWell(); //新建井
void slotScanAndDragOnePF();//拖拽或显示PF单条曲线
// 当通过外界创建了一个PF数据后刷新到TreeCtrl
void slotPfObjAppended(ZxDataGaugeBase* pObj);
};