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.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "iWxConfigBase.h"
|
|
|
|
|
#include "iGuiConfig_global.h"
|
|
|
|
|
class iXmlBtn;
|
|
|
|
|
class X_GUI_CONFIG_EXPORT iWxConfigBtnCmds : public iWxConfigBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit iWxConfigBtnCmds(QWidget *parent = 0);
|
|
|
|
|
~iWxConfigBtnCmds();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
QHBoxLayout* initUI_Desc();
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
// 执行
|
|
|
|
|
virtual bool runActionBy(QString sName);
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
// Radio Changed
|
|
|
|
|
void slotRadioChanged();
|
|
|
|
|
|
|
|
|
|
// 右键菜单
|
|
|
|
|
void slotTableWxShowContextMenu(const QPoint &pos);
|
|
|
|
|
void slotTableWxCellChanged(int currentRow, int currentColumn, int previousRow, int previousColumn);
|
|
|
|
|
|
|
|
|
|
#ifdef QT_DEBUG
|
|
|
|
|
// 难以置信的是,用了setCellWidget后,QTableWidget的signal无法使用 TODO
|
|
|
|
|
void slotTableCellClicked(int r, int c);
|
|
|
|
|
void slotGbxClicked();
|
|
|
|
|
void slotTableWxItemPressed(QTableWidgetItem*);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// 菜单响应
|
|
|
|
|
void slotRefresh();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
QString getCurType();
|
|
|
|
|
|
|
|
|
|
void initAndAllocBtns();
|
|
|
|
|
QString getTypeByID(QString sID);
|
|
|
|
|
void allocOneBtn(QString sType, iXmlBtn* pBtn);
|
|
|
|
|
|
|
|
|
|
void fillItemGrids(QString sSeries);
|
|
|
|
|
QWidget* getCellWx(iXmlBtn *pBtn);
|
|
|
|
|
QString getTooltip(int r, int c);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 内部变量,Table
|
|
|
|
|
QTableWidget* m_pTableWx;
|
|
|
|
|
QLabel* m_pLblDesc;
|
|
|
|
|
QMenu* m_pMenu;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
int m_nColMax;
|
|
|
|
|
|
|
|
|
|
// Radio
|
|
|
|
|
QVector<QRadioButton*> m_vecRadios;
|
|
|
|
|
|
|
|
|
|
// Btn载体
|
|
|
|
|
QMap<QString, QVector<iXmlBtn*> > m_mapBtns;
|
|
|
|
|
};
|