mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
Unified type popup: explicit TypeEntry model, modifier toggles, section headers
- Replace sentinel-id scheme (kPrimBase) with TypeEntry::Kind discriminant - Merge showTypeSelectorPopup + showTypePickerPopup into single showTypePopup - Merge applyTypePickerResult into applyTypePopupResult matching on entryKind - Add modifier toggle buttons (plain, *, **, [n]) with array count input - Add section headers (primitives / project types) with dim centered styling - Root mode shows project types first; non-Root sorts same-size primitives first - Remove popup outside border, flat "Create new type" button - Add parseTypeSpec parser, update tests with new TypeEntry API
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
namespace rcx {
|
||||
|
||||
class RcxController;
|
||||
class TypeSelectorPopup;
|
||||
struct TypeEntry;
|
||||
enum class TypePopupMode;
|
||||
|
||||
// ── Document ──
|
||||
|
||||
@@ -133,6 +136,9 @@ private:
|
||||
QVector<SavedSourceEntry> m_savedSources;
|
||||
int m_activeSourceIdx = -1;
|
||||
|
||||
// ── Cached type selector popup (avoids ~350ms cold-start on first show) ──
|
||||
TypeSelectorPopup* m_cachedPopup = nullptr;
|
||||
|
||||
// ── Auto-refresh state ──
|
||||
QTimer* m_refreshTimer = nullptr;
|
||||
QFutureWatcher<QByteArray>* m_refreshWatcher = nullptr;
|
||||
@@ -149,9 +155,9 @@ private:
|
||||
void performRealignment(uint64_t structId, int targetAlign);
|
||||
void switchToSavedSource(int idx);
|
||||
void pushSavedSourcesToEditors();
|
||||
void showTypeSelectorPopup(RcxEditor* editor);
|
||||
void showTypePickerPopup(RcxEditor* editor, EditTarget target, int nodeIdx, QPoint globalPos);
|
||||
void applyTypePickerResult(EditTarget target, int nodeIdx, uint64_t selectedId, const QString& displayName);
|
||||
void showTypePopup(RcxEditor* editor, TypePopupMode mode, int nodeIdx, QPoint globalPos);
|
||||
void applyTypePopupResult(TypePopupMode mode, int nodeIdx, const TypeEntry& entry, const QString& fullText);
|
||||
TypeSelectorPopup* ensurePopup(RcxEditor* editor);
|
||||
|
||||
// ── Auto-refresh methods ──
|
||||
void setupAutoRefresh();
|
||||
|
||||
Reference in New Issue
Block a user