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

43 lines
801 B
C

#pragma once
#include <QTabWidget>
#include "iPlugin_global.h"
// TabWidgetEx该类实现TabWidget相关附加功能
class I_PLUGIN_EXPORT TabWidgetEx :
public QTabWidget
{
Q_OBJECT
public:
TabWidgetEx(QWidget *parent = 0);
~TabWidgetEx();
// Tab是否允许移动默认不移动
void setTabMovable(bool b);
bool isTabMovable();
// TabBar
void setTabBarHorW(int n);
int getTabBarHorW();
protected:
// virtual void mouseDoubleClickEvent(QMouseEvent *);
// event分发
virtual bool eventFilter(QObject *, QEvent *);
signals:
// 双击Item
void sigItemDoubleClicked(int n);
// 右击Item
void sigItemRightClicked(int n, QPoint pos);
private:
QTabBar* m_pTabBar;
bool m_bTabMovable; //TabItem允许移动
};