- 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>
43 lines
854 B
C++
43 lines
854 B
C++
#ifndef TEXTVIEWERWIDGET_H
|
|
#define TEXTVIEWERWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QPlainTextEdit>
|
|
#include <QVBoxLayout>
|
|
#include <QHBoxLayout>
|
|
#include <QLabel>
|
|
#include <QSplitter>
|
|
#include <QTreeWidget>
|
|
|
|
#include "settings.h"
|
|
|
|
class TextViewerWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit TextViewerWidget(QWidget *parent = nullptr);
|
|
~TextViewerWidget() = default;
|
|
|
|
void setData(const QByteArray &data, const QString &filename);
|
|
void setMetadata(const QVariantMap &metadata);
|
|
|
|
private slots:
|
|
void applyTheme(const Theme &theme);
|
|
|
|
private:
|
|
void setupSyntaxHighlighting(const QString &extension);
|
|
|
|
QByteArray mData;
|
|
QString mFilename;
|
|
|
|
QSplitter *mSplitter;
|
|
QLabel *mInfoLabel;
|
|
QPlainTextEdit *mTextEdit;
|
|
QTreeWidget *mMetadataTree;
|
|
|
|
Theme mCurrentTheme;
|
|
};
|
|
|
|
#endif // TEXTVIEWERWIDGET_H
|