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/ZxMdiArea.h

62 lines
1.6 KiB
C

#pragma once
#include <QMdiArea>
#include "Defines.h"
#include "iPlugin_global.h"
// 主要重载其信号响应
class I_PLUGIN_EXPORT ZxMdiArea :
public QMdiArea
{
Q_OBJECT
public:
ZxMdiArea(QWidget* parent = 0);
~ZxMdiArea();
// 布局
// bFilterMode二次布局时如果bFilterMode为true则过滤掉Hide的窗体
void layoutSubWnds(WndLayoutMode o, bool bFilterMode = false);
WndLayoutMode getLayoutMode();
void relayoutSubWnds();
void setLastAutoSpan(bool b);
void setColCount(int n);
private:
// 布局实现
void _layoutOne(QList<QMdiSubWindow*> listSubWnds);
void _layoutVert(QList<QMdiSubWindow*> listSubWnds);
void _layoutHori(QList<QMdiSubWindow*> listSubWnds);
void _layoutCell(QList<QMdiSubWindow*> listSubWnds);
void _layoutCascade(QList<QMdiSubWindow*> listSubWnds);
protected:
bool eventFilter(QObject *object, QEvent *event);
void childEvent(QChildEvent *childEvent);
void resizeEvent(QResizeEvent *resizeEvent);
void timerEvent(QTimerEvent *timerEvent);
void showEvent(QShowEvent *showEvent);
signals:
// Mdi大小发生了切换
void sigMdiSizeChanged();
// 在布局前允许用户对窗体顺序进行调整
void sigAdjustSubWnds(QList<QMdiSubWindow*>&);
// nMode = 0: added 1:removed 2:polished
// void sigChildActioned(QObject* pChild, int nMode);
protected:
WndLayoutMode m_oMode;
bool m_bFilterMode;
bool m_bLastSpan; //最后一个是否对齐如果不够的话默认为true
int m_nColCount; //默认为2
};