Major UI improvements across the application: MainWindow: - Integrate undo stack for field editing - Dirty state tracking with tab title indicators (*) - Save/SaveAs prompts on tab close with unsaved changes - Export menu integration in tab context menu - Tab management: close all, close left/right of current tab - Connect export system to tree widget signals XTreeWidget: - Add context menus for tree items - Quick export action for immediate saves - Export dialog action for format options - Raw data export for any item - Batch export for containers XTreeWidgetItem: - Add modified state tracking with visual indicator - Support for marking items as dirty ImagePreviewWidget: - Enhanced image display and navigation - Improved zoom and pan controls TreeBuilder: - Better handling of nested data structures - Improved child node generation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
857 B
C++
35 lines
857 B
C++
#ifndef XTREEWIDGETITEM_H
|
|
#define XTREEWIDGETITEM_H
|
|
|
|
#include <QTreeWidgetItem>
|
|
|
|
class QTreeWidget;
|
|
|
|
// Custom item class
|
|
class XTreeWidgetItem : public QTreeWidgetItem
|
|
{
|
|
public:
|
|
XTreeWidgetItem(QTreeWidget *parent, bool group = false);
|
|
XTreeWidgetItem(QTreeWidgetItem *parent, bool group = false);
|
|
~XTreeWidgetItem() = default;
|
|
|
|
// Override the less-than operator to customize sorting.
|
|
bool operator<(const QTreeWidgetItem &other) const override;
|
|
XTreeWidgetItem &operator =(const XTreeWidgetItem &other);
|
|
|
|
bool GetIsGroup() const;
|
|
void SetIsGroup(bool aIsGroup);
|
|
|
|
// Modified state for edit indicator
|
|
void setModified(bool modified);
|
|
bool isModified() const;
|
|
|
|
private:
|
|
bool isGroup;
|
|
bool m_modified = false;
|
|
QString m_originalText;
|
|
};
|
|
|
|
|
|
#endif // XTREEWIDGETITEM_H
|