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/iBase/iPlugin/ZxTableOption.h

70 lines
1.4 KiB
C++

#pragma once
#include "Defines.h"
#include "ZxBaseUtil.h"
#include "ZxUiBase.h"
#include "iPlugin_global.h"
class ZxSerializer;
class ZxTableModel;
class ZxTableView;
// Table格式选项
class I_PLUGIN_EXPORT ZxTableOption : public ZxUiBase
{
Q_OBJECT
public:
explicit ZxTableOption(ZxTableView* pView, \
QWidget *parent = 0);
~ZxTableOption();
public:
virtual void initUI();
// 序列化
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
public slots:
void slotCbxAllModeClicked();
void slotBtnOK();
void slotBtnCancel();
private:
void initUI_Main();
void initUI_Headers();
void initUI_Grids();
void initUI_Btns();
void freshUI_Grids();
void freshUI_CtrlsOf(int nCol, bool bStr, QSpinBox*& pSpin, QCheckBox*& pCbx);
void addColInfoRow(QGridLayout*& pLayout, QString sName, bool bStr);
void addColTitleRow(QGridLayout*& pLayout, QStringList list);
int getDefaultDigit(int nCol, bool bStr);
bool getDefaultTrim(int nCol, bool bStr);
bool _apply();
void ensureSubs();
private:
VecVariant m_vecDataRowOne;
ZxTableView* m_pTableView;
ZxTableModel* m_pTableModel;
QVBoxLayout* m_pMainLayout;
QGridLayout* m_pGridLayout;
QCheckBox* m_pCbxTopUsed;
QCheckBox* m_pCbxTopAutoTrimmed;
QSpinBox* m_pSpinTopDigit;
};