| 1 | #ifndef TILEVIEWER_H |
| 2 | #define TILEVIEWER_H |
| 3 | |
| 4 | #include "ui_TileViewer.h" |
| 5 | #include <QDialog> |
| 6 | #include <cstdint> |
| 7 | |
| 8 | class VramTiledView; |
| 9 | |
| 10 | class TileViewer : public QDialog, private Ui::TileViewer |
| 11 | { |
| 12 | Q_OBJECT |
| 13 | public: |
| 14 | explicit TileViewer(QWidget* parent = nullptr); |
| 15 | |
| 16 | void refresh(); |
| 17 | |
| 18 | private: |
| 19 | void decodeVDPregs(); |
| 20 | |
| 21 | void displayCharInfo(int screenX, int screenY, int character, const QString& textInfo); |
| 22 | |
| 23 | void on_cb_tilemapsource_currentIndexChanged(int index); |
| 24 | void on_cb_screen_currentIndexChanged(int index); |
| 25 | void on_le_nametable_textChanged(const QString& text); |
| 26 | void on_le_colortable_textChanged(const QString& text); |
| 27 | void on_le_patterntable_textChanged(const QString& text); |
| 28 | void on_cb_color0_stateChanged(int state); |
| 29 | void on_useVDPRegisters_stateChanged(int state); |
| 30 | |
| 31 | void on_editPaletteButton_clicked(bool checked); |
| 32 | void on_useVDPPalette_stateChanged(int state); |
| 33 | void on_zoomLevel_valueChanged(double d); |
| 34 | |
| 35 | void on_cb_drawgrid_stateChanged(int state); |
| 36 | void on_cb_highlight_stateChanged(int state); |
| 37 | void on_sp_highlight_valueChanged(int i); |
| 38 | void on_sp_bordercolor_valueChanged(int i); |
| 39 | |
| 40 | void VDPDataStoreDataRefreshed(); |
| 41 | void highlightInfo(uint8_t character, int count); |
| 42 | void update_label_characterimage(); |
| 43 | void imageMouseOver(int screenX, int screenY, int character); |
| 44 | |
| 45 | void on_cb_blinkcolors_stateChanged(int arg1); |
| 46 | void on_cb_screenrows_currentIndexChanged(int index); |
| 47 | |
| 48 | private: |
| 49 | VramTiledView* imageWidget; |
| 50 | QImage image4label; |
| 51 | |
| 52 | int mouseOverX = 0; |
| 53 | int mouseOverY = 0; |
| 54 | int mouseOverChar = 0; |
| 55 | }; |
| 56 | |
| 57 | #endif // TILEVIEWER_H |