Skip to content

Commit 842a720

Browse files
committed
Enable to build python bindings
1 parent b236e0f commit 842a720

4 files changed

Lines changed: 13 additions & 22 deletions

File tree

python/QHexEdit.sip

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,34 +30,24 @@ public:
3030
void insert(qint64, QByteArray &);
3131
void replace(qint64, qint64, QByteArray &);
3232

33-
bool addressArea();
34-
bool addressWidth();
35-
bool asciiArea();
33+
void addUserArea(qint64, qint64, QColor, QBrush);
34+
void clearUserAreas();
35+
3636
qint64 cursorPosition(QPoint);
3737
void ensureVisible();
3838
qint64 indexOf(QByteArray &, qint64);
3939
bool isModified();
40-
bool highlighting();
40+
4141
qint64 lastIndexOf(QByteArray &, qint64);
4242
QString selectionToReadableString();
4343
QString selectedData();
4444
void setFont(const QFont &);
4545
QString toReadableString();
4646

47-
QColor addressAreaColor();
48-
void setAddressAreaColor(const QColor &);
49-
50-
QColor addressFontColor();
51-
void setAddressFontColor(const QColor &);
52-
53-
QColor asciiAreaColor();
54-
void setAsciiAreaColor(const QColor &);
55-
56-
QColor asciiFontColor();
57-
void setAsciiFontColor(const QColor &);
58-
59-
QColor hexFontColor();
60-
void setHexFontColor(const QColor &);
47+
bool addressArea();
48+
bool addressWidth();
49+
bool asciiArea();
50+
bool highlighting();
6151

6252
qint64 addressOffset();
6353
void setAddressOffset(qint64);
@@ -77,9 +67,6 @@ public:
7767
bool isReadOnly();
7868
void setReadOnly(bool);
7969

80-
QColor selectionColor();
81-
void setSelectionColor(const QColor &);
82-
8370
public slots:
8471
void redo();
8572
void setAddressArea(bool);

python/pyqt5-pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ headers = [
4444
"src/chunks.h",
4545
"src/commands.h",
4646
"src/qhexedit.h",
47+
"src/color_manager.h",
4748
]
4849
sources = [
4950
"src/chunks.cpp",
5051
"src/commands.cpp",
5152
"src/qhexedit.cpp",
53+
"src/color_manager.cpp",
5254
]

python/pyqt6-pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@ headers = [
4444
"src/chunks.h",
4545
"src/commands.h",
4646
"src/qhexedit.h",
47+
"src/color_manager.h",
4748
]
4849
sources = [
4950
"src/chunks.cpp",
5051
"src/commands.cpp",
5152
"src/qhexedit.cpp",
53+
"src/color_manager.cpp",
5254
]

src/qhexedit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ public slots:
336336

337337
protected:
338338
// Handle events
339+
bool event(QEvent *event);
339340
void keyPressEvent(QKeyEvent *event);
340341
void mouseMoveEvent(QMouseEvent * event);
341342
void mousePressEvent(QMouseEvent * event);
@@ -351,7 +352,6 @@ public slots:
351352
qint64 getSelectionEnd();
352353

353354
// Private utility functions
354-
bool event(QEvent *event);
355355
void init();
356356
void readBuffers();
357357
QString toReadable(const QByteArray &ba);

0 commit comments

Comments
 (0)