1 #ifndef TITLEBAR_H 2 #define TITLEBAR_H 3 4 #include <QWidget> 5 6 class QLabel; 7 class TitleBar : public QWidget 8 { 9 Q_OBJECT 10 public: 11 explicit TitleBar(QWidget *parent = nullptr); 12 void setAppMayClose(bool bMay); 13 void setVersion(const QString &version); 14 15 Q_SIGNALS: 16 void showBoxWidget(); 17 18 public slots: 19 void showTitlebarName(const QString & name); 20 21 private: 22 QLabel *m_title; 23 QLabel *m_version; 24 bool m_bMayClose; 25 }; 26 27 #endif // TITLEBAR_H 28