- Add ListPreviewWidget for displaying parsed list data with table view - Add TextViewerWidget for text file preview with syntax highlighting - Add TreeBuilder class to organize parsed data into tree structure - Enhance HexView with selection support, copy functionality, keyboard navigation - Enhance ImagePreviewWidget with additional format support and metadata display - Minor audio preview widget adjustments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
#ifndef LISTPREVIEWWIDGET_H
|
|
#define LISTPREVIEWWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QTableWidget>
|
|
#include <QTreeWidget>
|
|
#include <QLabel>
|
|
#include <QSplitter>
|
|
#include <QVBoxLayout>
|
|
#include <QHeaderView>
|
|
#include "settings.h"
|
|
|
|
class ListPreviewWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ListPreviewWidget(QWidget *parent = nullptr);
|
|
~ListPreviewWidget() = default;
|
|
|
|
// Set list data from QVariantList (each item is a QVariantMap with fields)
|
|
void setListData(const QVariantList &items, const QString &listName = QString());
|
|
|
|
// Set metadata for the sidebar
|
|
void setMetadata(const QVariantMap &metadata);
|
|
|
|
// Clear the widget
|
|
void clear();
|
|
|
|
private slots:
|
|
void applyTheme(const Theme &theme);
|
|
void onItemSelectionChanged();
|
|
|
|
private:
|
|
void setupUi();
|
|
void populateTable(const QVariantList &items);
|
|
void updateMetadataTree(const QVariantMap &item);
|
|
|
|
QLabel *mInfoLabel;
|
|
QTableWidget *mTableWidget;
|
|
QTreeWidget *mMetadataTree;
|
|
QSplitter *mSplitter;
|
|
|
|
QVariantList mItems;
|
|
QString mListName;
|
|
};
|
|
|
|
#endif // LISTPREVIEWWIDGET_H
|