From 004b73ed7ef33cb407897f7eccbec5f3861f99d7 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Fri, 7 Jul 2023 12:37:21 +0200 Subject: Squashed 'qhexedit2/' content from commit 7f22526 git-subtree-dir: qhexedit2 git-subtree-split: 7f22526a86685aec1c5722154b8a7422d5037b77 --- src/qhexedit.sip | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 src/qhexedit.sip (limited to 'src/qhexedit.sip') diff --git a/src/qhexedit.sip b/src/qhexedit.sip new file mode 100644 index 0000000..a7ef4e7 --- /dev/null +++ b/src/qhexedit.sip @@ -0,0 +1,94 @@ +%Module(name=qhexedit) + +%Import QtCore/QtCoremod.sip +%Import QtGui/QtGuimod.sip + +%If (Qt_5_0_0 -) +%Import QtWidgets/QtWidgetsmod.sip +%End + +class QHexEdit : QAbstractScrollArea +{ +%TypeHeaderCode +#include "../src/qhexedit.h" +%End + +public: + explicit QHexEdit(QWidget *parent /TransferThis/ = 0); + virtual ~QHexEdit(); + + bool setData(QIODevice &); + QByteArray dataAt(qint64, qint64=-1); + bool write(QIODevice &iODevice, qint64=0, qint64=-1); + + void insert(qint64, char); + void remove(qint64, qint64); + void replace(qint64, char); + + void insert(qint64, QByteArray &); + void replace(qint64, qint64, QByteArray &); + + bool addressArea(); + bool addressWidth(); + bool asciiArea(); + qint64 cursorPosition(QPoint); + void ensureVisible(); + qint64 indexOf(QByteArray &, qint64); + bool isModified(); + bool highlighting(); + qint64 lastIndexOf(QByteArray &, qint64); + QString selectionToReadableString(); + QString selectedData(); + void setFont(const QFont &); + QString toReadableString(); + + QColor addressAreaColor(); + void setAddressAreaColor(const QColor &); + + QColor addressFontColor(); + void setAddressFontColor(const QColor &); + + QColor asciiAreaColor(); + void setAsciiAreaColor(const QColor &); + + QColor asciiFontColor(); + void setAsciiFontColor(const QColor &); + + QColor hexFontColor(); + void setHexFontColor(const QColor &); + + qint64 addressOffset(); + void setAddressOffset(qint64); + + qint64 cursorPosition(); + void setCursorPosition(qint64); + + QByteArray data(); + void setData(const QByteArray &); + + QColor highlightingColor(); + void setHighlightingColor(const QColor &); + + bool overwriteMode(); + void setOverwriteMode(bool); + + bool isReadOnly(); + void setReadOnly(bool); + + QColor selectionColor(); + void setSelectionColor(const QColor &); + +public slots: + void redo(); + void setAddressArea(bool); + void setAddressWidth(int); + void setAsciiArea(bool); + void setHighlighting(bool); + void undo(); + +signals: + void currentAddressChanged(qint64); + void currentSizeChanged(qint64); + void dataChanged(); + void overwriteModeChanged(bool); +}; -- cgit v1.2.3