mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
- Import enums from C/C++ source and PDB with name/value members - Compose/format/generate enum definitions properly - Workspace dock: rename to Project, theme-based titlebar and selection - Add comprehensive EPROCESS.rcx (325 nodes) and MMPFN.rcx (65 nodes)
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
#pragma once
|
|
#include "themes/theme.h"
|
|
#include <QWidget>
|
|
#include <QMenuBar>
|
|
#include <QToolButton>
|
|
#include <QLabel>
|
|
#include <QHBoxLayout>
|
|
|
|
namespace rcx {
|
|
|
|
class TitleBarWidget : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit TitleBarWidget(QWidget* parent = nullptr);
|
|
|
|
QMenuBar* menuBar() const { return m_menuBar; }
|
|
void applyTheme(const Theme& theme);
|
|
void setShowIcon(bool show);
|
|
void setMenuBarTitleCase(bool titleCase);
|
|
bool menuBarTitleCase() const { return m_titleCase; }
|
|
|
|
void updateMaximizeIcon();
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent* event) override;
|
|
void mouseDoubleClickEvent(QMouseEvent* event) override;
|
|
void paintEvent(QPaintEvent* event) override;
|
|
|
|
private:
|
|
QLabel* m_appLabel = nullptr;
|
|
QMenuBar* m_menuBar = nullptr;
|
|
QToolButton* m_btnMin = nullptr;
|
|
QToolButton* m_btnMax = nullptr;
|
|
QToolButton* m_btnClose = nullptr;
|
|
|
|
Theme m_theme;
|
|
bool m_titleCase = false;
|
|
|
|
QToolButton* makeChromeButton(const QString& iconPath);
|
|
void toggleMaximize();
|
|
};
|
|
|
|
} // namespace rcx
|