#pragma once

#include <QLabel>
#include <QToolButton>

#include "WindowButtonGroup.h"

class TitleBar : public QFrame
{
	Q_OBJECT

public:
	TitleBar(QWidget *parent, bool showUserInfo=true);
	~TitleBar();

protected:
	virtual bool eventFilter(QObject *obj, QEvent *event);

signals:
	void onChangePassword();
	void onLogout();


private:
	QLabel *m_pIconLabel; //标题栏图标
	QLabel *m_pTitleLabel; //标题栏标题
	QToolButton *m_pUserButton;
	WindowButtonGroup *m_pWindowButtonGroup;
};
