logplus/WellLogUI/include/assetcopy.h

72 lines
1.9 KiB
C++
Raw Blame History

#ifndef ASSETCOPY_H
#define ASSETCOPY_H
#include <QObject>
#include <QMenu>
#include <QTableWidget>
#include <QTableWidgetSelectionRange>
#include <QCache>
// #include "ObjWellLogWavefile.h"
#include "ObjWellLog.h"
#include "adapter_defs.h"
class AssetCopy : public QObject
{
Q_OBJECT
public:
AssetCopy(QObject *parent=NULL);
~AssetCopy();
void initPopMenu(QTableWidget *pTable, QMenu *pmenu = NULL);
void setDataType(DType type);
void reqCustomComtextMenu(const QPoint &pos);
QString itemParseText(int row,int col);
void setVerScrollValue(int value);
void setHorScrollValue(int value);
void restParse();
bool isParse();
void SetWellLogs(DType type1,QList<CObjWellLog*>&pWellLogs);
public slots:
void onCopyData();
void onParseData();
void onCopyLinesData();
void onCopyColnumsData();
signals:
void signalReqCustomContextMenu(const QPoint& point);
void signalParseData(const QTableWidgetSelectionRange &parseRange);
void saveToTempModel();
void needANewLine(int);
private slots:
void onCustomContextMenuRequested(const QPoint& pos);
private:
QString itemText(int row,int col);
void changeCacheRowCol(int orgRow,int orgCol,int movRow,int movCol);
private:
//////////////////<2F><EFBFBD><E9B8B4><><D5B3>//////////////////
QByteArray seriseSelectRange(const QTableWidgetSelectionRange& selectRange);
QTableWidgetSelectionRange deseriseSelectRange( QByteArray& selectByte);
//ճ<><D5B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void parseData(const QTableWidgetSelectionRange& parse);
void cacheGridData(const QTableWidgetSelectionRange& m_selectionRange);
private:
///////////////////<2F><><EFBFBD><EFBFBD><><D5B3>////////////
QMenu* m_menu;
static AssetCopy *p_assCopy;
QMap<int,QMap<int,QString> > m_cacheData;
QMap<int,QMap<int,QString> > m_parseCacheData;
bool m_isParse;
int m_verScrolValue;
int m_horScrolValue;
QList<CObjWellLog*>m_pWellLogs;
DType type;
};
#endif // ASSETCOPY_H