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>
41 lines
1.2 KiB
C++
41 lines
1.2 KiB
C++
#ifndef XTREEWIDGET_H
|
|
#define XTREEWIDGET_H
|
|
|
|
#include <QTreeWidget>
|
|
|
|
class QTreeWidgetItem;
|
|
|
|
class XTreeWidget : public QTreeWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit XTreeWidget(QWidget *parent = nullptr);
|
|
|
|
// Helper methods for batch export
|
|
int countExportableChildren(QTreeWidgetItem* parent) const;
|
|
int countExportableChildrenByType(QTreeWidgetItem* parent, int contentType) const;
|
|
|
|
signals:
|
|
void ItemSelected(const QString itemText, QTreeWidgetItem* item);
|
|
void ItemClosed(const QString itemText);
|
|
void Cleared();
|
|
|
|
// Export signals
|
|
void exportRequested(const QString& format, QTreeWidgetItem* item);
|
|
void quickExportRequested(QTreeWidgetItem* item);
|
|
void exportDialogRequested(QTreeWidgetItem* item);
|
|
void batchExportRequested(QTreeWidgetItem* parentItem);
|
|
void batchExportByTypeRequested(QTreeWidgetItem* parentItem, int contentType);
|
|
|
|
protected:
|
|
void ItemSelectionChanged();
|
|
void PrepareContextMenu(const QPoint &pos);
|
|
|
|
private:
|
|
void prepareInstanceContextMenu(QMenu* menu, QTreeWidgetItem* item);
|
|
void prepareContainerContextMenu(QMenu* menu, QTreeWidgetItem* item);
|
|
};
|
|
|
|
#endif // XTREEWIDGET_H
|