├── .editorconfig ├── .github └── workflows │ ├── dev-build.yml │ └── prod-build.yml ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── ci ├── full.releaserc.json ├── justversion.releaserc.json ├── linux-cmake.yml ├── linux.yml ├── mac.yml ├── ubuntu-setup.yml └── windows.yml ├── cmake ├── FindPCAP.cmake ├── FindPFFFT.cmake ├── Findlibusb-1.0.cmake ├── Hardening.cmake ├── PackExternalDeps.cmake ├── clangLinkerWorkaround.sh ├── gitversion.cmake ├── installhelper.cmake └── passthroughvars.cmake ├── docs ├── CPack.hobbits.description.txt ├── README ├── hobbits_screenshot.png ├── img │ └── favicon.ico ├── index.md ├── js │ └── youtube.js ├── labelled_hobbits_screenshot.png ├── plugin-developer-guide.md ├── python-plugins.md └── user-guide.md ├── external └── CMakeLists.txt ├── mkdocs.yml ├── package-lock.json ├── package.json ├── src ├── CMakeLists.txt ├── hobbits-core │ ├── CMakeLists.txt │ ├── abstractpluginrunner.h │ ├── analyzerinterface.h │ ├── analyzerresult.cpp │ ├── analyzerresult.h │ ├── analyzerrunner.cpp │ ├── analyzerrunner.h │ ├── batchrunner.cpp │ ├── batchrunner.h │ ├── bitarray.cpp │ ├── bitarray.h │ ├── bitcontainer.cpp │ ├── bitcontainer.h │ ├── bitcontainermanager.cpp │ ├── bitcontainermanager.h │ ├── bitcontainerpreview.cpp │ ├── bitcontainerpreview.h │ ├── bitinfo.cpp │ ├── bitinfo.h │ ├── displayinterface.h │ ├── displayrenderconfig.cpp │ ├── displayrenderconfig.h │ ├── exporterrunner.cpp │ ├── exporterrunner.h │ ├── exportresult.cpp │ ├── exportresult.h │ ├── frame.cpp │ ├── frame.h │ ├── fwd_abstractparametereditor.h │ ├── hobbits-core_global.h │ ├── hobbitscoreconfig.h.in │ ├── hobbitsplugin.h │ ├── hobbitspluginmanager.cpp │ ├── hobbitspluginmanager.h │ ├── importerrunner.cpp │ ├── importerrunner.h │ ├── importexportinterface.h │ ├── importresult.cpp │ ├── importresult.h │ ├── mathparser.cpp │ ├── mathparser.h │ ├── metadatahelper.cpp │ ├── metadatahelper.h │ ├── operatorinterface.h │ ├── operatorresult.cpp │ ├── operatorresult.h │ ├── operatorrunner.cpp │ ├── operatorrunner.h │ ├── parameterdelegate.cpp │ ├── parameterdelegate.h │ ├── parameters.cpp │ ├── parameters.h │ ├── pluginaction.cpp │ ├── pluginaction.h │ ├── pluginactionbatch.cpp │ ├── pluginactionbatch.h │ ├── pluginactionlineage.cpp │ ├── pluginactionlineage.h │ ├── pluginactionmanager.cpp │ ├── pluginactionmanager.h │ ├── pluginactionprogress.cpp │ ├── pluginactionprogress.h │ ├── pluginactionwatcher.h │ ├── range.cpp │ ├── range.h │ ├── rangehighlight.cpp │ ├── rangehighlight.h │ ├── rangesequence.cpp │ ├── rangesequence.h │ ├── settingsdata.cpp │ ├── settingsdata.h │ ├── settingsmanager.cpp │ └── settingsmanager.h ├── hobbits-gui │ ├── CMakeLists.txt │ ├── Hobbits.desktop │ ├── batchcreationdialog.cpp │ ├── batchcreationdialog.h │ ├── batchcreationdialog.ui │ ├── batches.qrc │ ├── batches │ │ └── byte_align.hbat │ ├── containerselectiondialog.cpp │ ├── containerselectiondialog.h │ ├── containerselectiondialog.ui │ ├── hobbitsguiconfig.h.in │ ├── hobbitsstyle.cpp │ ├── hobbitsstyle.h │ ├── icons.qrc │ ├── images │ │ └── icons │ │ │ ├── HobbitsRingSmall.png │ │ │ ├── mahlet.bits │ │ │ ├── menu.png │ │ │ └── trash.png │ ├── main.cpp │ ├── mainwindow.cpp │ ├── mainwindow.h │ ├── mainwindow.ui │ ├── preferencesdialog.cpp │ ├── preferencesdialog.h │ ├── preferencesdialog.ui │ ├── style.qrc │ └── style │ │ ├── fonts │ │ ├── Montserrat │ │ │ ├── Montserrat-Black.ttf │ │ │ ├── Montserrat-BlackItalic.ttf │ │ │ ├── Montserrat-Bold.ttf │ │ │ ├── Montserrat-BoldItalic.ttf │ │ │ ├── Montserrat-ExtraBold.ttf │ │ │ ├── Montserrat-ExtraBoldItalic.ttf │ │ │ ├── Montserrat-ExtraLight.ttf │ │ │ ├── Montserrat-ExtraLightItalic.ttf │ │ │ ├── Montserrat-Italic.ttf │ │ │ ├── Montserrat-Light.ttf │ │ │ ├── Montserrat-LightItalic.ttf │ │ │ ├── Montserrat-Medium.ttf │ │ │ ├── Montserrat-MediumItalic.ttf │ │ │ ├── Montserrat-Regular.ttf │ │ │ ├── Montserrat-SemiBold.ttf │ │ │ ├── Montserrat-SemiBoldItalic.ttf │ │ │ ├── Montserrat-Thin.ttf │ │ │ ├── Montserrat-ThinItalic.ttf │ │ │ └── OFL.txt │ │ ├── Roboto │ │ │ ├── LICENSE.txt │ │ │ ├── Roboto-Black.ttf │ │ │ ├── Roboto-BlackItalic.ttf │ │ │ ├── Roboto-Bold.ttf │ │ │ ├── Roboto-BoldItalic.ttf │ │ │ ├── Roboto-Italic.ttf │ │ │ ├── Roboto-Light.ttf │ │ │ ├── Roboto-LightItalic.ttf │ │ │ ├── Roboto-Medium.ttf │ │ │ ├── Roboto-MediumItalic.ttf │ │ │ ├── Roboto-Regular.ttf │ │ │ ├── Roboto-Thin.ttf │ │ │ └── Roboto-ThinItalic.ttf │ │ └── Roboto_Mono │ │ │ ├── LICENSE.txt │ │ │ ├── README.txt │ │ │ ├── RobotoMono-Italic-VariableFont_wght.ttf │ │ │ ├── RobotoMono-VariableFont_wght.ttf │ │ │ └── static │ │ │ ├── RobotoMono-Bold.ttf │ │ │ ├── RobotoMono-BoldItalic.ttf │ │ │ ├── RobotoMono-ExtraLight.ttf │ │ │ ├── RobotoMono-ExtraLightItalic.ttf │ │ │ ├── RobotoMono-Italic.ttf │ │ │ ├── RobotoMono-Light.ttf │ │ │ ├── RobotoMono-LightItalic.ttf │ │ │ ├── RobotoMono-Medium.ttf │ │ │ ├── RobotoMono-MediumItalic.ttf │ │ │ ├── RobotoMono-Regular.ttf │ │ │ ├── RobotoMono-SemiBold.ttf │ │ │ ├── RobotoMono-SemiBoldItalic.ttf │ │ │ ├── RobotoMono-Thin.ttf │ │ │ └── RobotoMono-ThinItalic.ttf │ │ └── qss │ │ └── style.qss ├── hobbits-plugins │ ├── CMakeLists.txt │ ├── analyzers │ │ ├── Find │ │ │ ├── CMakeLists.txt │ │ │ ├── find.cpp │ │ │ ├── find.h │ │ │ ├── findform.cpp │ │ │ ├── findform.h │ │ │ └── findform.ui │ │ ├── Highlight │ │ │ ├── CMakeLists.txt │ │ │ ├── highlight.cpp │ │ │ ├── highlight.h │ │ │ ├── highlightform.cpp │ │ │ ├── highlightform.h │ │ │ └── highlightform.ui │ │ ├── KaitaiStruct │ │ │ ├── CMakeLists.txt │ │ │ ├── kaitaidata.qrc │ │ │ ├── kaitaiscripts.qrc │ │ │ ├── kaitaistruct.cpp │ │ │ ├── kaitaistruct.h │ │ │ ├── kaitaistructform.cpp │ │ │ ├── kaitaistructform.h │ │ │ ├── kaitaistructform.ui │ │ │ ├── ksy │ │ │ │ ├── archive │ │ │ │ │ ├── android_img.ksy │ │ │ │ │ ├── cpio_old_le.ksy │ │ │ │ │ ├── gzip.ksy │ │ │ │ │ ├── lzh.ksy │ │ │ │ │ ├── phar_without_stub.ksy │ │ │ │ │ ├── rar.ksy │ │ │ │ │ └── zip.ksy │ │ │ │ ├── cad │ │ │ │ │ └── monomakh_sapr_chg.ksy │ │ │ │ ├── common │ │ │ │ │ ├── bcd.ksy │ │ │ │ │ ├── bytes_with_io.ksy │ │ │ │ │ ├── riff.ksy │ │ │ │ │ ├── utf8_string.ksy │ │ │ │ │ ├── vlq_base128_be.ksy │ │ │ │ │ └── vlq_base128_le.ksy │ │ │ │ ├── database │ │ │ │ │ ├── dbf.ksy │ │ │ │ │ ├── gettext_mo.ksy │ │ │ │ │ ├── sqlite3.ksy │ │ │ │ │ └── tsm.ksy │ │ │ │ ├── executable │ │ │ │ │ ├── dex.ksy │ │ │ │ │ ├── dos_mz.ksy │ │ │ │ │ ├── elf.ksy │ │ │ │ │ ├── java_class.ksy │ │ │ │ │ ├── mach_o.ksy │ │ │ │ │ ├── microsoft_pe.ksy │ │ │ │ │ ├── python_pyc_27.ksy │ │ │ │ │ ├── swf.ksy │ │ │ │ │ └── uefi_te.ksy │ │ │ │ ├── filesystem │ │ │ │ │ ├── apm_partition_table.ksy │ │ │ │ │ ├── apple_single_double.ksy │ │ │ │ │ ├── btrfs_stream.ksy │ │ │ │ │ ├── cramfs.ksy │ │ │ │ │ ├── ext2.ksy │ │ │ │ │ ├── gpt_partition_table.ksy │ │ │ │ │ ├── iso9660.ksy │ │ │ │ │ ├── luks.ksy │ │ │ │ │ ├── mbr_partition_table.ksy │ │ │ │ │ ├── tr_dos_image.ksy │ │ │ │ │ ├── vfat.ksy │ │ │ │ │ ├── vmware_vmdk.ksy │ │ │ │ │ └── zx_spectrum_tap.ksy │ │ │ │ ├── firmware │ │ │ │ │ ├── andes_firmware.ksy │ │ │ │ │ ├── ines.ksy │ │ │ │ │ └── uimage.ksy │ │ │ │ ├── font │ │ │ │ │ ├── pcf_font.ksy │ │ │ │ │ └── ttf.ksy │ │ │ │ ├── game │ │ │ │ │ ├── allegro_dat.ksy │ │ │ │ │ ├── doom_wad.ksy │ │ │ │ │ ├── dune_2_pak.ksy │ │ │ │ │ ├── fallout2_dat.ksy │ │ │ │ │ ├── fallout_dat.ksy │ │ │ │ │ ├── ftl_dat.ksy │ │ │ │ │ ├── gran_turismo_vol.ksy │ │ │ │ │ ├── heaps_pak.ksy │ │ │ │ │ ├── heroes_of_might_and_magic_agg.ksy │ │ │ │ │ ├── heroes_of_might_and_magic_bmp.ksy │ │ │ │ │ ├── quake_mdl.ksy │ │ │ │ │ ├── quake_pak.ksy │ │ │ │ │ ├── renderware_binary_stream.ksy │ │ │ │ │ ├── saints_row_2_vpp_pc.ksy │ │ │ │ │ └── warcraft_2_pud.ksy │ │ │ │ ├── geospatial │ │ │ │ │ ├── shapefile_index.ksy │ │ │ │ │ └── shapefile_main.ksy │ │ │ │ ├── hardware │ │ │ │ │ ├── edid.ksy │ │ │ │ │ └── mifare │ │ │ │ │ │ └── mifare_classic.ksy │ │ │ │ ├── image │ │ │ │ │ ├── bmp.ksy │ │ │ │ │ ├── dicom.ksy │ │ │ │ │ ├── exif.ksy │ │ │ │ │ ├── gif.ksy │ │ │ │ │ ├── icc_4.ksy │ │ │ │ │ ├── ico.ksy │ │ │ │ │ ├── jpeg.ksy │ │ │ │ │ ├── nitf.ksy │ │ │ │ │ ├── pcx.ksy │ │ │ │ │ ├── pcx_dcx.ksy │ │ │ │ │ ├── png.ksy │ │ │ │ │ ├── psx_tim.ksy │ │ │ │ │ ├── tga.ksy │ │ │ │ │ ├── wmf.ksy │ │ │ │ │ └── xwd.ksy │ │ │ │ ├── log │ │ │ │ │ ├── aix_utmp.ksy │ │ │ │ │ ├── glibc_utmp.ksy │ │ │ │ │ ├── hashcat_restore.ksy │ │ │ │ │ ├── sudoers_ts.ksy │ │ │ │ │ ├── systemd_journal.ksy │ │ │ │ │ └── windows_evt_log.ksy │ │ │ │ ├── machine_code │ │ │ │ │ └── code_6502.ksy │ │ │ │ ├── macos │ │ │ │ │ ├── compressed_resource.ksy │ │ │ │ │ ├── ds_store.ksy │ │ │ │ │ ├── mac_os_resource_snd.ksy │ │ │ │ │ ├── resource_compression │ │ │ │ │ │ ├── dcmp_0.ksy │ │ │ │ │ │ ├── dcmp_1.ksy │ │ │ │ │ │ ├── dcmp_2.ksy │ │ │ │ │ │ └── dcmp_variable_length_integer.ksy │ │ │ │ │ └── resource_fork.ksy │ │ │ │ ├── media │ │ │ │ │ ├── android_opengl_shaders_cache.ksy │ │ │ │ │ ├── avi.ksy │ │ │ │ │ ├── blender_blend.ksy │ │ │ │ │ ├── creative_voice_file.ksy │ │ │ │ │ ├── genmidi_op2.ksy │ │ │ │ │ ├── id3v1_1.ksy │ │ │ │ │ ├── id3v2_3.ksy │ │ │ │ │ ├── id3v2_4.ksy │ │ │ │ │ ├── magicavoxel_vox.ksy │ │ │ │ │ ├── ogg.ksy │ │ │ │ │ ├── quicktime_mov.ksy │ │ │ │ │ ├── standard_midi_file.ksy │ │ │ │ │ ├── stl.ksy │ │ │ │ │ ├── tracker_modules │ │ │ │ │ │ ├── fasttracker_xm_module.ksy │ │ │ │ │ │ └── s3m.ksy │ │ │ │ │ ├── vp8_ivf.ksy │ │ │ │ │ └── wav.ksy │ │ │ │ ├── network │ │ │ │ │ ├── bitcoin_transaction.ksy │ │ │ │ │ ├── dns_packet.ksy │ │ │ │ │ ├── ethernet_frame.ksy │ │ │ │ │ ├── hccap.ksy │ │ │ │ │ ├── hccapx.ksy │ │ │ │ │ ├── icmp_packet.ksy │ │ │ │ │ ├── ipv4_packet.ksy │ │ │ │ │ ├── ipv6_packet.ksy │ │ │ │ │ ├── microsoft_network_monitor_v2.ksy │ │ │ │ │ ├── packet_ppi.ksy │ │ │ │ │ ├── pcap.ksy │ │ │ │ │ ├── protocol_body.ksy │ │ │ │ │ ├── rtcp_payload.ksy │ │ │ │ │ ├── rtp_packet.ksy │ │ │ │ │ ├── rtpdump.ksy │ │ │ │ │ ├── some_ip │ │ │ │ │ │ ├── some_ip.ksy │ │ │ │ │ │ ├── some_ip_container.ksy │ │ │ │ │ │ ├── some_ip_sd.ksy │ │ │ │ │ │ ├── some_ip_sd_entries.ksy │ │ │ │ │ │ └── some_ip_sd_options.ksy │ │ │ │ │ ├── tcp_segment.ksy │ │ │ │ │ ├── tls_client_hello.ksy │ │ │ │ │ ├── udp_datagram.ksy │ │ │ │ │ └── websocket.ksy │ │ │ │ ├── scientific │ │ │ │ │ ├── nt_mdt │ │ │ │ │ │ ├── nt_mdt.ksy │ │ │ │ │ │ └── nt_mdt_pal.ksy │ │ │ │ │ └── spectroscopy │ │ │ │ │ │ ├── avantes_roh60.ksy │ │ │ │ │ │ └── specpr.ksy │ │ │ │ ├── security │ │ │ │ │ ├── efivar_signature_list.ksy │ │ │ │ │ ├── openpgp_message.ksy │ │ │ │ │ └── ssh_public_key.ksy │ │ │ │ ├── serialization │ │ │ │ │ ├── asn1 │ │ │ │ │ │ └── asn1_der.ksy │ │ │ │ │ ├── bson.ksy │ │ │ │ │ ├── google_protobuf.ksy │ │ │ │ │ ├── microsoft_cfb.ksy │ │ │ │ │ ├── msgpack.ksy │ │ │ │ │ ├── php_serialized_value.ksy │ │ │ │ │ ├── python_pickle.ksy │ │ │ │ │ └── ruby_marshal.ksy │ │ │ │ └── windows │ │ │ │ │ ├── regf.ksy │ │ │ │ │ ├── windows_lnk_file.ksy │ │ │ │ │ ├── windows_minidump.ksy │ │ │ │ │ ├── windows_resource_file.ksy │ │ │ │ │ ├── windows_shell_items.ksy │ │ │ │ │ └── windows_systemtime.ksy │ │ │ ├── ksy_py │ │ │ │ ├── archive │ │ │ │ │ ├── android_img.py │ │ │ │ │ ├── cpio_old_le.py │ │ │ │ │ ├── gzip.py │ │ │ │ │ ├── lzh.py │ │ │ │ │ ├── phar_without_stub.py │ │ │ │ │ ├── php_serialized_value.py │ │ │ │ │ ├── rar.py │ │ │ │ │ └── zip.py │ │ │ │ ├── cad │ │ │ │ │ └── monomakh_sapr_chg.py │ │ │ │ ├── common │ │ │ │ │ ├── bcd.py │ │ │ │ │ ├── bytes_with_io.py │ │ │ │ │ ├── riff.py │ │ │ │ │ ├── utf8_string.py │ │ │ │ │ ├── vlq_base128_be.py │ │ │ │ │ └── vlq_base128_le.py │ │ │ │ ├── database │ │ │ │ │ ├── dbf.py │ │ │ │ │ ├── gettext_mo.py │ │ │ │ │ ├── sqlite3.py │ │ │ │ │ ├── tsm.py │ │ │ │ │ └── vlq_base128_be.py │ │ │ │ ├── executable │ │ │ │ │ ├── dex.py │ │ │ │ │ ├── dos_mz.py │ │ │ │ │ ├── elf.py │ │ │ │ │ ├── java_class.py │ │ │ │ │ ├── mach_o.py │ │ │ │ │ ├── microsoft_pe.py │ │ │ │ │ ├── python_pyc_27.py │ │ │ │ │ ├── swf.py │ │ │ │ │ ├── uefi_te.py │ │ │ │ │ └── vlq_base128_le.py │ │ │ │ ├── filesystem │ │ │ │ │ ├── apm_partition_table.py │ │ │ │ │ ├── apple_single_double.py │ │ │ │ │ ├── btrfs_stream.py │ │ │ │ │ ├── cramfs.py │ │ │ │ │ ├── ext2.py │ │ │ │ │ ├── gpt_partition_table.py │ │ │ │ │ ├── iso9660.py │ │ │ │ │ ├── luks.py │ │ │ │ │ ├── mbr_partition_table.py │ │ │ │ │ ├── tr_dos_image.py │ │ │ │ │ ├── vfat.py │ │ │ │ │ ├── vmware_vmdk.py │ │ │ │ │ └── zx_spectrum_tap.py │ │ │ │ ├── firmware │ │ │ │ │ ├── andes_firmware.py │ │ │ │ │ ├── ines.py │ │ │ │ │ └── uimage.py │ │ │ │ ├── font │ │ │ │ │ ├── bytes_with_io.py │ │ │ │ │ ├── pcf_font.py │ │ │ │ │ └── ttf.py │ │ │ │ ├── game │ │ │ │ │ ├── allegro_dat.py │ │ │ │ │ ├── doom_wad.py │ │ │ │ │ ├── dune_2_pak.py │ │ │ │ │ ├── fallout2_dat.py │ │ │ │ │ ├── fallout_dat.py │ │ │ │ │ ├── ftl_dat.py │ │ │ │ │ ├── gran_turismo_vol.py │ │ │ │ │ ├── heaps_pak.py │ │ │ │ │ ├── heroes_of_might_and_magic_agg.py │ │ │ │ │ ├── heroes_of_might_and_magic_bmp.py │ │ │ │ │ ├── quake_mdl.py │ │ │ │ │ ├── quake_pak.py │ │ │ │ │ ├── renderware_binary_stream.py │ │ │ │ │ ├── saints_row_2_vpp_pc.py │ │ │ │ │ └── warcraft_2_pud.py │ │ │ │ ├── geospatial │ │ │ │ │ ├── shapefile_index.py │ │ │ │ │ └── shapefile_main.py │ │ │ │ ├── hardware │ │ │ │ │ ├── edid.py │ │ │ │ │ └── mifare │ │ │ │ │ │ └── mifare_classic.py │ │ │ │ ├── image │ │ │ │ │ ├── bmp.py │ │ │ │ │ ├── dicom.py │ │ │ │ │ ├── exif.py │ │ │ │ │ ├── gif.py │ │ │ │ │ ├── ico.py │ │ │ │ │ ├── jpeg.py │ │ │ │ │ ├── nitf.py │ │ │ │ │ ├── pcx.py │ │ │ │ │ ├── pcx_dcx.py │ │ │ │ │ ├── png.py │ │ │ │ │ ├── psx_tim.py │ │ │ │ │ ├── tga.py │ │ │ │ │ ├── wmf.py │ │ │ │ │ └── xwd.py │ │ │ │ ├── log │ │ │ │ │ ├── aix_utmp.py │ │ │ │ │ ├── glibc_utmp.py │ │ │ │ │ ├── hashcat_restore.py │ │ │ │ │ ├── sudoers_ts.py │ │ │ │ │ ├── systemd_journal.py │ │ │ │ │ └── windows_evt_log.py │ │ │ │ ├── machine_code │ │ │ │ │ └── code_6502.py │ │ │ │ ├── macos │ │ │ │ │ ├── bytes_with_io.py │ │ │ │ │ ├── compressed_resource.py │ │ │ │ │ ├── ds_store.py │ │ │ │ │ ├── mac_os_resource_snd.py │ │ │ │ │ ├── resource_compression │ │ │ │ │ │ ├── bytes_with_io.py │ │ │ │ │ │ ├── dcmp_0.py │ │ │ │ │ │ ├── dcmp_1.py │ │ │ │ │ │ ├── dcmp_2.py │ │ │ │ │ │ └── dcmp_variable_length_integer.py │ │ │ │ │ └── resource_fork.py │ │ │ │ ├── media │ │ │ │ │ ├── android_opengl_shaders_cache.py │ │ │ │ │ ├── avi.py │ │ │ │ │ ├── blender_blend.py │ │ │ │ │ ├── creative_voice_file.py │ │ │ │ │ ├── genmidi_op2.py │ │ │ │ │ ├── id3v1_1.py │ │ │ │ │ ├── id3v2_3.py │ │ │ │ │ ├── id3v2_4.py │ │ │ │ │ ├── magicavoxel_vox.py │ │ │ │ │ ├── ogg.py │ │ │ │ │ ├── quicktime_mov.py │ │ │ │ │ ├── riff.py │ │ │ │ │ ├── standard_midi_file.py │ │ │ │ │ ├── stl.py │ │ │ │ │ ├── tracker_modules │ │ │ │ │ │ ├── fasttracker_xm_module.py │ │ │ │ │ │ └── s3m.py │ │ │ │ │ ├── vlq_base128_be.py │ │ │ │ │ ├── vp8_ivf.py │ │ │ │ │ └── wav.py │ │ │ │ ├── network │ │ │ │ │ ├── bitcoin_transaction.py │ │ │ │ │ ├── dns_packet.py │ │ │ │ │ ├── ethernet_frame.py │ │ │ │ │ ├── hccap.py │ │ │ │ │ ├── hccapx.py │ │ │ │ │ ├── icmp_packet.py │ │ │ │ │ ├── ipv4_packet.py │ │ │ │ │ ├── ipv6_packet.py │ │ │ │ │ ├── microsoft_network_monitor_v2.py │ │ │ │ │ ├── packet_ppi.py │ │ │ │ │ ├── pcap.py │ │ │ │ │ ├── protocol_body.py │ │ │ │ │ ├── rtcp_payload.py │ │ │ │ │ ├── rtp_packet.py │ │ │ │ │ ├── rtpdump.py │ │ │ │ │ ├── some_ip │ │ │ │ │ │ ├── some_ip.py │ │ │ │ │ │ ├── some_ip_container.py │ │ │ │ │ │ ├── some_ip_sd.py │ │ │ │ │ │ ├── some_ip_sd_entries.py │ │ │ │ │ │ └── some_ip_sd_options.py │ │ │ │ │ ├── tcp_segment.py │ │ │ │ │ ├── tls_client_hello.py │ │ │ │ │ ├── udp_datagram.py │ │ │ │ │ ├── websocket.py │ │ │ │ │ └── windows_systemtime.py │ │ │ │ ├── scientific │ │ │ │ │ ├── nt_mdt │ │ │ │ │ │ ├── nt_mdt.py │ │ │ │ │ │ └── nt_mdt_pal.py │ │ │ │ │ └── spectroscopy │ │ │ │ │ │ ├── avantes_roh60.py │ │ │ │ │ │ └── specpr.py │ │ │ │ ├── security │ │ │ │ │ ├── efivar_signature_list.py │ │ │ │ │ ├── openpgp_message.py │ │ │ │ │ └── ssh_public_key.py │ │ │ │ ├── serialization │ │ │ │ │ ├── asn1 │ │ │ │ │ │ └── asn1_der.py │ │ │ │ │ ├── bson.py │ │ │ │ │ ├── google_protobuf.py │ │ │ │ │ ├── microsoft_cfb.py │ │ │ │ │ ├── msgpack.py │ │ │ │ │ ├── php_serialized_value.py │ │ │ │ │ ├── python_pickle.py │ │ │ │ │ ├── ruby_marshal.py │ │ │ │ │ └── vlq_base128_le.py │ │ │ │ └── windows │ │ │ │ │ ├── regf.py │ │ │ │ │ ├── windows_lnk_file.py │ │ │ │ │ ├── windows_minidump.py │ │ │ │ │ ├── windows_resource_file.py │ │ │ │ │ ├── windows_shell_items.py │ │ │ │ │ └── windows_systemtime.py │ │ │ └── scripts │ │ │ │ ├── dependencies │ │ │ │ └── kaitaistruct.py │ │ │ │ ├── dos_mz.py │ │ │ │ ├── runner.py │ │ │ │ └── update_ksy.py │ │ ├── Metadata │ │ │ ├── CMakeLists.txt │ │ │ ├── metadata.cpp │ │ │ ├── metadata.h │ │ │ ├── metadataform.cpp │ │ │ ├── metadataform.h │ │ │ └── metadataform.ui │ │ └── WidthFramer │ │ │ ├── CMakeLists.txt │ │ │ ├── peakselector.cpp │ │ │ ├── peakselector.h │ │ │ ├── widthframer.cpp │ │ │ ├── widthframer.h │ │ │ ├── widthframerform.cpp │ │ │ ├── widthframerform.h │ │ │ └── widthframerform.ui │ ├── displays │ │ ├── Ascii │ │ │ ├── CMakeLists.txt │ │ │ ├── ascii.cpp │ │ │ ├── ascii.h │ │ │ ├── asciidecode.h │ │ │ ├── asciiform.cpp │ │ │ ├── asciiform.h │ │ │ ├── asciiform.ui │ │ │ └── cp437decode.h │ │ ├── Binary │ │ │ ├── CMakeLists.txt │ │ │ ├── binary.cpp │ │ │ ├── binary.h │ │ │ ├── binarycontrols.cpp │ │ │ ├── binarycontrols.h │ │ │ └── binarycontrols.ui │ │ ├── BitRaster │ │ │ ├── CMakeLists.txt │ │ │ ├── bitraster.cpp │ │ │ ├── bitraster.h │ │ │ ├── bitrastercontrols.cpp │ │ │ ├── bitrastercontrols.h │ │ │ └── bitrastercontrols.ui │ │ ├── ByteRaster │ │ │ ├── CMakeLists.txt │ │ │ ├── byteraster.cpp │ │ │ ├── byteraster.h │ │ │ ├── byterastercontrols.cpp │ │ │ ├── byterastercontrols.h │ │ │ └── byterastercontrols.ui │ │ ├── DigraphPlot │ │ │ ├── CMakeLists.txt │ │ │ ├── digraphplot.cpp │ │ │ ├── digraphplot.h │ │ │ ├── digraphplotform.cpp │ │ │ ├── digraphplotform.h │ │ │ └── digraphplotform.ui │ │ ├── DotPlot │ │ │ ├── CMakeLists.txt │ │ │ ├── dotplot.cpp │ │ │ ├── dotplot.h │ │ │ ├── dotplotform.cpp │ │ │ ├── dotplotform.h │ │ │ └── dotplotform.ui │ │ ├── FrequencyPlot │ │ │ ├── CMakeLists.txt │ │ │ ├── frequencyplot.cpp │ │ │ ├── frequencyplot.h │ │ │ ├── frequencyplotform.cpp │ │ │ ├── frequencyplotform.h │ │ │ └── frequencyplotform.ui │ │ ├── Hex │ │ │ ├── CMakeLists.txt │ │ │ ├── hex.cpp │ │ │ ├── hex.h │ │ │ ├── hexform.cpp │ │ │ ├── hexform.h │ │ │ └── hexform.ui │ │ ├── HilbertPlot │ │ │ ├── CMakeLists.txt │ │ │ ├── hilbertplot.cpp │ │ │ ├── hilbertplot.h │ │ │ ├── hilbertplotform.cpp │ │ │ ├── hilbertplotform.h │ │ │ └── hilbertplotform.ui │ │ ├── Spectrogram │ │ │ ├── CMakeLists.txt │ │ │ ├── spectrogram.cpp │ │ │ ├── spectrogram.h │ │ │ ├── spectrogramcontrols.cpp │ │ │ ├── spectrogramcontrols.h │ │ │ ├── spectrogramcontrols.ui │ │ │ └── viridis.h │ │ └── SymbolRaster │ │ │ ├── CMakeLists.txt │ │ │ ├── colordialogdelegate.cpp │ │ │ ├── colordialogdelegate.h │ │ │ ├── colormapmodel.cpp │ │ │ ├── colormapmodel.h │ │ │ ├── symbolraster.cpp │ │ │ ├── symbolraster.h │ │ │ ├── symbolrastercontrols.cpp │ │ │ ├── symbolrastercontrols.h │ │ │ └── symbolrastercontrols.ui │ ├── importerexporters │ │ ├── BitContainerData │ │ │ ├── CMakeLists.txt │ │ │ ├── bitcontainerdata.cpp │ │ │ └── bitcontainerdata.h │ │ ├── DisplayPrint │ │ │ ├── CMakeLists.txt │ │ │ ├── displayprint.cpp │ │ │ ├── displayprint.h │ │ │ ├── displayprintexportform.cpp │ │ │ ├── displayprintexportform.h │ │ │ └── displayprintexportform.ui │ │ ├── FileData │ │ │ ├── CMakeLists.txt │ │ │ ├── filedata.cpp │ │ │ └── filedata.h │ │ ├── HexString │ │ │ ├── CMakeLists.txt │ │ │ ├── hexstring.cpp │ │ │ ├── hexstring.h │ │ │ ├── hexstringimportform.cpp │ │ │ ├── hexstringimportform.h │ │ │ └── hexstringimportform.ui │ │ ├── HttpData │ │ │ ├── CMakeLists.txt │ │ │ ├── httpdata.cpp │ │ │ ├── httpdata.h │ │ │ ├── httpexportform.cpp │ │ │ ├── httpexportform.h │ │ │ ├── httpimportform.cpp │ │ │ ├── httpimportform.h │ │ │ └── httptransceiver.ui │ │ ├── Lfsr │ │ │ ├── CMakeLists.txt │ │ │ ├── lfsr.cpp │ │ │ ├── lfsr.h │ │ │ ├── lfsrform.cpp │ │ │ ├── lfsrform.h │ │ │ └── lfsrform.ui │ │ ├── PacketCapture │ │ │ ├── CMakeLists.txt │ │ │ ├── packetcapture.cpp │ │ │ ├── packetcapture.h │ │ │ ├── packetcaptureclient.cpp │ │ │ ├── packetcaptureclient.h │ │ │ ├── packetcaptureform.cpp │ │ │ ├── packetcaptureform.h │ │ │ └── packetcaptureform.ui │ │ ├── TcpData │ │ │ ├── CMakeLists.txt │ │ │ ├── tcpdata.cpp │ │ │ ├── tcpdata.h │ │ │ ├── tcpreceiver.cpp │ │ │ ├── tcpreceiver.h │ │ │ ├── tcpreceiver.ui │ │ │ ├── tcpsender.cpp │ │ │ ├── tcpsender.h │ │ │ └── tcpsender.ui │ │ ├── UdpData │ │ │ ├── CMakeLists.txt │ │ │ ├── udpdata.cpp │ │ │ ├── udpdata.h │ │ │ ├── udpreceiver.cpp │ │ │ ├── udpreceiver.h │ │ │ ├── udpreceiver.ui │ │ │ ├── udpsender.cpp │ │ │ ├── udpsender.h │ │ │ └── udpsender.ui │ │ └── UsbDevice │ │ │ ├── CMakeLists.txt │ │ │ ├── usb_resources.qrc │ │ │ ├── usb_resources │ │ │ └── usb.ids │ │ │ ├── usbdevice.cpp │ │ │ ├── usbdevice.h │ │ │ ├── usbdeviceimporteditor.cpp │ │ │ ├── usbdeviceimporteditor.h │ │ │ └── usbdeviceimporteditor.ui │ └── operators │ │ ├── BitsError │ │ ├── CMakeLists.txt │ │ ├── bitserror.cpp │ │ ├── bitserror.h │ │ ├── bitserrorform.cpp │ │ ├── bitserrorform.h │ │ └── bitserrorform.ui │ │ ├── Edit │ │ ├── edit.cpp │ │ ├── edit.h │ │ ├── editeditor.cpp │ │ ├── editeditor.h │ │ └── editeditor.ui │ │ ├── Extractor │ │ ├── CMakeLists.txt │ │ ├── extractor.cpp │ │ ├── extractor.h │ │ ├── extractorform.cpp │ │ ├── extractorform.h │ │ └── extractorform.ui │ │ ├── HeaderFramer │ │ ├── CMakeLists.txt │ │ ├── headerframer.cpp │ │ ├── headerframer.h │ │ ├── headerframerform.cpp │ │ ├── headerframerform.h │ │ └── headerframerform.ui │ │ ├── PythonRunner │ │ ├── CMakeLists.txt │ │ ├── pythonrunner.cpp │ │ ├── pythonrunner.h │ │ ├── pythonrunnerform.cpp │ │ ├── pythonrunnerform.h │ │ ├── pythonrunnerform.ui │ │ ├── pythonsyntaxhighlighter.cpp │ │ └── pythonsyntaxhighlighter.h │ │ ├── SymbolRemapper │ │ ├── CMakeLists.txt │ │ ├── remapmodel.cpp │ │ ├── remapmodel.h │ │ ├── symbolremapper.cpp │ │ ├── symbolremapper.h │ │ ├── symbolremapperform.cpp │ │ ├── symbolremapperform.h │ │ └── symbolremapperform.ui │ │ └── TakeSkip │ │ ├── CMakeLists.txt │ │ ├── bitop.cpp │ │ ├── bitop.h │ │ ├── invertop.cpp │ │ ├── invertop.h │ │ ├── oneop.cpp │ │ ├── oneop.h │ │ ├── reverseop.cpp │ │ ├── reverseop.h │ │ ├── skipop.cpp │ │ ├── skipop.h │ │ ├── takeop.cpp │ │ ├── takeop.h │ │ ├── takeskip.cpp │ │ ├── takeskip.h │ │ ├── takeskipeditor.cpp │ │ ├── takeskipeditor.h │ │ ├── takeskipeditor.ui │ │ ├── zeroop.cpp │ │ └── zeroop.h ├── hobbits-python │ ├── CMakeLists.txt │ ├── hobbits-python_global.h │ ├── hobbitspython.cpp │ ├── hobbitspython.h │ ├── hobbitspythonconfig.h.in │ ├── imagebuffer.cpp │ ├── imagebuffer.h │ ├── py_actionprogress.cpp │ ├── py_actionprogress.h │ ├── py_bitarray.cpp │ ├── py_bitarray.h │ ├── py_bitcontainer.cpp │ ├── py_bitcontainer.h │ ├── py_bitinfo.cpp │ ├── py_bitinfo.h │ ├── py_displayhandle.cpp │ ├── py_displayhandle.h │ ├── py_hobbits.cpp │ ├── py_hobbits.h │ ├── pythonanalyzer.cpp │ ├── pythonanalyzer.h │ ├── pythonarg.cpp │ ├── pythonarg.h │ ├── pythondisplay.cpp │ ├── pythondisplay.h │ ├── pythonexporter.cpp │ ├── pythonexporter.h │ ├── pythonimporter.cpp │ ├── pythonimporter.h │ ├── pythoninterpreter.cpp │ ├── pythoninterpreter.h │ ├── pythonoperator.cpp │ ├── pythonoperator.h │ ├── pythonpluginconfig.cpp │ ├── pythonpluginconfig.h │ ├── pythonrequest.cpp │ ├── pythonrequest.h │ ├── pythonresult.cpp │ └── pythonresult.h ├── hobbits-qt-ui-forms.pro ├── hobbits-runner │ ├── CMakeLists.txt │ ├── hobbitsrunnerconfig.h.in │ └── main.cpp └── hobbits-widgets │ ├── CMakeLists.txt │ ├── abstractparametereditor.h │ ├── actionrenderprogress.cpp │ ├── actionrenderprogress.h │ ├── batchedititem.cpp │ ├── batchedititem.h │ ├── batchedititemwidget.cpp │ ├── batchedititemwidget.h │ ├── batchedititemwidget.ui │ ├── batcheditlink.cpp │ ├── batcheditlink.h │ ├── batcheditor.cpp │ ├── batcheditor.h │ ├── batcheditor.ui │ ├── batcheditscene.cpp │ ├── batcheditscene.h │ ├── batchinputdialog.cpp │ ├── batchinputdialog.h │ ├── batchinputdialog.ui │ ├── bitcontainermanagerui.cpp │ ├── bitcontainermanagerui.h │ ├── bitcontainertreemodel.cpp │ ├── bitcontainertreemodel.h │ ├── displayhandle.cpp │ ├── displayhandle.h │ ├── displayhelper.cpp │ ├── displayhelper.h │ ├── displayresult.cpp │ ├── displayresult.h │ ├── displaysplitter.cpp │ ├── displaysplitter.h │ ├── displaywidget.cpp │ ├── displaywidget.h │ ├── highlightnavigator.cpp │ ├── highlightnavigator.h │ ├── highlightnavigator.ui │ ├── hobbits-widgets_global.h │ ├── hobbitswidgets.qrc │ ├── images │ └── icons │ │ ├── arrow-down-999.png │ │ ├── arrow-down-light.png │ │ ├── arrow-down.png │ │ ├── arrow-left-999.png │ │ ├── arrow-left-light.png │ │ ├── arrow-left.png │ │ ├── arrow-right-999.png │ │ ├── arrow-right-light.png │ │ ├── arrow-right.png │ │ ├── arrow-up-999.png │ │ ├── arrow-up-light.png │ │ ├── arrow-up.png │ │ ├── check-999.png │ │ ├── check-blue.png │ │ ├── check-bright-blue.png │ │ ├── check-light-blue.png │ │ ├── check-light.png │ │ ├── circle-999.png │ │ ├── circle-blue.png │ │ ├── circle-bright-blue.png │ │ ├── circle-light-blue.png │ │ ├── circle-light.png │ │ ├── handle-999.png │ │ ├── handle-horizontal-999.png │ │ ├── menu-light.png │ │ ├── minus-999.png │ │ ├── minus-blue.png │ │ ├── minus-bright-blue.png │ │ ├── minus-light-blue.png │ │ ├── minus-light.png │ │ ├── size-grip-666.png │ │ ├── size-grip-999.png │ │ ├── tear.png │ │ ├── windows-light.png │ │ ├── x-999.png │ │ └── x-light.png │ ├── multidisplaywidget.cpp │ ├── multidisplaywidget.h │ ├── parametereditordialog.cpp │ ├── parametereditordialog.h │ ├── parametereditordialog.ui │ ├── parametereditorfileselect.cpp │ ├── parametereditorfileselect.h │ ├── parameterhelper.cpp │ ├── parameterhelper.h │ ├── plugintreemodel.cpp │ ├── plugintreemodel.h │ ├── previewscrollbar.cpp │ ├── previewscrollbar.h │ ├── simpleparametereditor.cpp │ ├── simpleparametereditor.h │ ├── simpleparametereditor.ui │ ├── widgetssettings.cpp │ └── widgetssettings.h ├── tests ├── prepare_tests.js ├── repackage_tests.js ├── test-archive.7z └── test_hobbits.js ├── uncrustify.cfg └── uncrustify_wrapper.sh /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 4 7 | insert_final_newline = true 8 | 9 | [*.cmake] 10 | indent_style = tab 11 | 12 | [CMakeLists.txt] 13 | indent_style = tab 14 | 15 | [*.{yml, yaml}] 16 | indent_size = 2 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /src/*/config.h 2 | 3 | CMakeLists.txt.user 4 | *.pro.user 5 | *.autosave 6 | /build* 7 | /build-debug 8 | /src/build 9 | .vscode 10 | *.so 11 | 12 | node_modules 13 | .version 14 | 15 | site 16 | 17 | /tests/extracted_tests 18 | 19 | /src/hobbits-core/hobbitscoreconfig.h 20 | /src/hobbits-gui/hobbitsguiconfig.h 21 | /src/hobbits-python/hobbitspythonconfig.h 22 | /src/hobbits-runner/hobbitsrunnerconfig.h -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/pffft"] 2 | path = external/pffft 3 | url = https://bitbucket.org/jpommier/pffft.git 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We welcome community contributions. Feel free to use GitHub mechanisms or Discord to: 4 | 5 | - report bugs and undesirable application behavior 6 | - request and discuss new features 7 | - discuss application usage and documentation 8 | - build plugins in your own repository and ask us to promote them 9 | - contribute to the project via the Pull Request Process below 10 | 11 | ## Pull Request Process 12 | 13 | 1. Make sure to reference an open GitHub issue with your pull request. If a related issue does 14 | not exist, make one. 15 | 2. Target the `develop` branch with your pull request. This means you'll probably want to make 16 | your changes on the `develop` branch of your fork. 17 | 3. Make sure your changes don't break the tests or the build. The tests/build will run 18 | automatically when you open your pull request. You can also run the tests locally. 19 | 4. If you are changing core library functionality or a core plugin, try to include some tests 20 | that demonstrate that the change did not break anything. 21 | 5. Please reach out if you have any questions or hesitations. -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020-2021 Mahlet, Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /ci/full.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "ci": true, 3 | "branches": [ 4 | "master" 5 | ], 6 | "debug": true, 7 | "dryRun": false, 8 | "plugins": [ 9 | "@semantic-release/commit-analyzer", 10 | "@semantic-release/release-notes-generator", 11 | "@semantic-release/changelog", 12 | "@semantic-release/npm", 13 | [ 14 | "@semantic-release/git", 15 | { 16 | "assets": [ 17 | "CHANGELOG.md", 18 | "package.json" 19 | ], 20 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 21 | } 22 | ], 23 | [ 24 | "@semantic-release/github", 25 | { 26 | "assets": [ 27 | { 28 | "path": "DEB Packages ubuntu-20.04/*.deb", 29 | "name": "DEB Package for Ubuntu 20.04" 30 | }, 31 | { 32 | "path": "DEB Packages ubuntu-22.04/*.deb", 33 | "name": "DEB Package for Ubuntu 22.04" 34 | } 35 | ] 36 | } 37 | ] 38 | ] 39 | } 40 | -------------------------------------------------------------------------------- /ci/justversion.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "ci": true, 3 | "branches": [ 4 | "master" 5 | ], 6 | "debug": true, 7 | "dryRun": true, 8 | "verifyConditions": [], 9 | "analyzeCommits": ["@semantic-release/commit-analyzer"], 10 | "verifyRelease": [ 11 | { 12 | "path": "@semantic-release/exec", 13 | "cmd": "echo ${nextRelease.version} > .version" 14 | } 15 | ], 16 | "generateNotes": [], 17 | "prepare": [], 18 | "publish": [], 19 | "success": [], 20 | "fail": [], 21 | "addChannel": [] 22 | } 23 | -------------------------------------------------------------------------------- /ci/ubuntu-setup.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - script: sudo apt-get -y update 3 | displayName: 'Update packages' 4 | 5 | - script: sudo apt-get -y install libgl1-mesa-dev 6 | displayName: 'Install libGL' 7 | 8 | - script: sudo apt-get -y install cmake 9 | displayName: 'Install CMake' 10 | 11 | - script: sudo apt-get -y install ninja-build 12 | displayName: 'Install Ninja' 13 | 14 | - script: sudo apt-get -y install libudev-dev patchelf 15 | displayName: 'Install libudev and patchelf' 16 | 17 | - task: UsePythonVersion@0 18 | inputs: 19 | versionSpec: '3.7' 20 | 21 | - script: | 22 | python3 -m pip install conan 23 | displayName: 'Install conan' 24 | 25 | - task: NodeTool@0 26 | inputs: 27 | versionSpec: '12.x' 28 | 29 | -------------------------------------------------------------------------------- /cmake/FindPFFFT.cmake: -------------------------------------------------------------------------------- 1 | find_path( 2 | PFFFT_INCLUDE_DIRS pffft.h 3 | PATHS 4 | ENV PFFFT_ROOT 5 | ENV PFFFT_INCLUDE_DIR 6 | ${PFFFT_ROOT} 7 | /usr 8 | /usr/local 9 | PATH_SUFFIXES 10 | ${CMAKE_INSTALL_INCLUDEDIR} 11 | ) 12 | find_library( 13 | PFFFT_LIBRARIES NAMES pffft 14 | PATHS 15 | ENV PFFFT_ROOT 16 | ENV PFFFT_LIB_DIR 17 | ${PFFFT_ROOT} 18 | /usr 19 | /usr/local 20 | PATH_SUFFIXES 21 | ${CMAKE_INSTALL_LIBDIR} 22 | ) 23 | 24 | include( FindPackageHandleStandardArgs ) 25 | find_package_handle_standard_args( 26 | PFFFT 27 | DEFAULT_MSG 28 | PFFFT_INCLUDE_DIRS 29 | PFFFT_LIBRARIES 30 | ) 31 | 32 | if( PFFFT_FOUND AND NOT TARGET PFFFT::PFFFT ) 33 | add_library( PFFFT::PFFFT UNKNOWN IMPORTED ) 34 | set_target_properties( 35 | PFFFT::PFFFT PROPERTIES 36 | IMPORTED_LINK_INTERFACE_LANGUAGES "CXX" 37 | IMPORTED_LOCATION "${PFFFT_LIBRARIES}" 38 | INTERFACE_INCLUDE_DIRECTORIES "${PFFFT_INCLUDE_DIRS}" 39 | ) 40 | endif() 41 | -------------------------------------------------------------------------------- /cmake/clangLinkerWorkaround.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "There is a long-ignored bug in CLang. https://bugs.llvm.org/show_bug.cgi?id=44594 . Have to work around." 4 | 5 | $( 6 | echo ld 7 | i=0 8 | for el in $@; do 9 | if [ -e "$el" ]; then 10 | fn=$(basename $el); 11 | ext=${fn##*.} 12 | dn=$(dirname $el); 13 | if [[ $dn == *"/lib/gcc/"* ]]; then 14 | if [ "$ext" = "o" ]; then 15 | bn="${fn%.*}"; 16 | newFulN="$dn/${bn}S.o"; 17 | if [ -e "$newFulN" ]; then 18 | el=$newFulN; 19 | fi; 20 | fi; 21 | fi; 22 | fi; 23 | echo $el; 24 | done; 25 | ) | xargs 26 | -------------------------------------------------------------------------------- /cmake/gitversion.cmake: -------------------------------------------------------------------------------- 1 | function(gitversion VAR) 2 | execute_process(COMMAND git -C "${CMAKE_SOURCE_DIR}" rev-parse HEAD 3 | OUTPUT_VARIABLE GIT_REV) 4 | 5 | if ("${GIT_REV}" STREQUAL "") 6 | message("Failed to get version from Git") 7 | set(GIT_REV "[Mystery Build]") 8 | else() 9 | string(STRIP "${GIT_REV}" GIT_REV) 10 | string(SUBSTRING "${GIT_REV}" 0 7 GIT_REV) 11 | set(GIT_REV "dev-${GIT_REV}") 12 | endif() 13 | 14 | set("${VAR}" "${GIT_REV}" PARENT_SCOPE) 15 | endfunction() 16 | -------------------------------------------------------------------------------- /cmake/installhelper.cmake: -------------------------------------------------------------------------------- 1 | function(install_hobbits_lib target headers) 2 | if (LINUX) 3 | install(TARGETS ${target} 4 | LIBRARY 5 | COMPONENT "runtime" 6 | ) 7 | 8 | install(FILES ${headers} 9 | DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/hobbits" 10 | COMPONENT "dev" 11 | ) 12 | elseif(APPLE) 13 | install(TARGETS ${target} 14 | LIBRARY 15 | COMPONENT "runtime" 16 | DESTINATION "hobbits.app/Contents/Frameworks" 17 | ) 18 | elseif(WIN32) 19 | install(TARGETS ${target} 20 | COMPONENT "runtime" 21 | DESTINATION "." 22 | ) 23 | endif() 24 | endfunction(install_hobbits_lib) 25 | -------------------------------------------------------------------------------- /cmake/passthroughvars.cmake: -------------------------------------------------------------------------------- 1 | macro(pass_through_cpack_vars) 2 | get_cmake_property(cpackVarsToPassthrough VARIABLES) 3 | foreach(varName ${cpackVarsToPassthrough}) 4 | if(varName MATCHES "^CPACK_") 5 | #message(STATUS "${varName}") 6 | set("${varName}" "${${varName}}" PARENT_SCOPE) 7 | endif() 8 | endforeach() 9 | endmacro() 10 | -------------------------------------------------------------------------------- /docs/CPack.hobbits.description.txt: -------------------------------------------------------------------------------- 1 | A multi-platform GUI for bit-based analysis, processing, and visualization. 2 | Useful for discovering patterns when reverse-engineering binary formats. 3 | -------------------------------------------------------------------------------- /docs/README: -------------------------------------------------------------------------------- 1 | ## How to update docs 2 | 3 | From the `Mahlet-Inc.github.io` repo folder, execute: 4 | 5 | mkdocs gh-deploy --config-file ../path/to/hobbits/mkdocs.yml -------------------------------------------------------------------------------- /docs/hobbits_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/docs/hobbits_screenshot.png -------------------------------------------------------------------------------- /docs/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/docs/img/favicon.ico -------------------------------------------------------------------------------- /docs/js/youtube.js: -------------------------------------------------------------------------------- 1 | // Load Videos in the Docs 2 | $(document).ready(function () { 3 | $('img[alt="YOUTUBE"]').each(function () { 4 | var id = $(this).attr('src').split('/')[$(this).attr('src').split('/').length - 1]; 5 | var video = ''; 6 | $(this).replaceWith(video); 7 | }); 8 | }); -------------------------------------------------------------------------------- /docs/labelled_hobbits_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/docs/labelled_hobbits_screenshot.png -------------------------------------------------------------------------------- /external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # can't assume the target system has the required SIMD instructions 3 | option(PFFFT_ENABLE_SIMD "Enable SIMD support for pffft" OFF) 4 | 5 | message(STATUS "Using bundled pffft") 6 | add_library(pffft STATIC pffft/pffft.c) 7 | if(PFFFT_ENABLE_SIMD) 8 | message(STATUS "Enabling SIMD support for pffft") 9 | else() 10 | message(STATUS "Disabling SIMD support for pffft") 11 | target_compile_definitions(pffft PUBLIC PFFFT_SIMD_DISABLE) 12 | endif() 13 | target_compile_options(pffft PUBLIC "${PFFFT_CFLAGS}") 14 | target_link_libraries(pffft m) 15 | target_include_directories(pffft INTERFACE pffft) 16 | 17 | add_library(PFFFT::PFFFT ALIAS pffft) 18 | -------------------------------------------------------------------------------- /mkdocs.yml: -------------------------------------------------------------------------------- 1 | site_name: Hobbits 2 | nav: 3 | - Overview: index.md 4 | - User Guide: user-guide.md 5 | - Plugin Developer Guide: plugin-developer-guide.md 6 | - Python Plugins: python-plugins.md 7 | theme: readthedocs 8 | 9 | remote_branch: master 10 | 11 | extra_javascript: 12 | - js/youtube.js 13 | 14 | copyright: © 2020 Mahlet, Inc. 15 | 16 | extra: 17 | logo: 'img/mahlet_logo_big.png' -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Add Subdirectories 4 | # 5 | 6 | add_subdirectory(hobbits-core) 7 | add_subdirectory(hobbits-widgets) 8 | add_subdirectory(hobbits-python) 9 | if (NOT JUST_LIBS) 10 | add_subdirectory(hobbits-plugins) 11 | add_subdirectory(hobbits-gui) 12 | add_subdirectory(hobbits-runner) 13 | endif() 14 | -------------------------------------------------------------------------------- /src/hobbits-core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Config Header 3 | # 4 | 5 | set(HOBBITS_CORE_VERSION "${BUILD_VERSION}") 6 | 7 | set(CONFIG_FILE_NAME "${CMAKE_CURRENT_SOURCE_DIR}/hobbitscoreconfig.h") 8 | configure_file("${CONFIG_FILE_NAME}.in" "${CONFIG_FILE_NAME}") 9 | 10 | # 11 | # Build 12 | # 13 | 14 | # Gather Files 15 | file(GLOB_RECURSE SRCFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") 16 | file(GLOB_RECURSE HDRFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 17 | file(GLOB RCFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.qrc") 18 | 19 | # Configure target 20 | add_library(hobbits-core "${SRCFILES}" "${HDRFILES}" "${RCFILES}") 21 | target_include_directories(hobbits-core INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") 22 | 23 | if (BUILDING_WITH_CONAN) 24 | set(ALL_LINK_LIBS CONAN_PKG::qt) 25 | else() 26 | set(ALL_LINK_LIBS Qt::Core Qt::Widgets) 27 | endif() 28 | 29 | target_link_libraries(hobbits-core ${ALL_LINK_LIBS}) 30 | target_compile_definitions(hobbits-core PRIVATE "-DHOBBITSCORE_LIBRARY") 31 | #harden("hobbits-core") 32 | 33 | set_target_properties(hobbits-core 34 | PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${HOBBITS_LIB_OUT_DIR}) 35 | 36 | install_hobbits_lib(hobbits-core "${HDRFILES}") 37 | -------------------------------------------------------------------------------- /src/hobbits-core/analyzerresult.cpp: -------------------------------------------------------------------------------- 1 | #include "analyzerresult.h" 2 | 3 | AnalyzerResult::AnalyzerResult() 4 | { 5 | 6 | } 7 | 8 | AnalyzerResult* AnalyzerResult::setBitInfo(QSharedPointer bitInfo) 9 | { 10 | m_bitInfo = bitInfo; 11 | return this; 12 | } 13 | 14 | QSharedPointer AnalyzerResult::bitInfo() const 15 | { 16 | return m_bitInfo; 17 | } 18 | 19 | AnalyzerResult* AnalyzerResult::setParameters(const Parameters ¶meters) 20 | { 21 | m_parameters = parameters; 22 | return this; 23 | } 24 | 25 | const Parameters AnalyzerResult::parameters() const 26 | { 27 | return m_parameters; 28 | } 29 | 30 | bool AnalyzerResult::hasNullParameters() const 31 | { 32 | return m_parameters.isNull(); 33 | } 34 | 35 | QString AnalyzerResult::errorString() const 36 | { 37 | return m_errorString; 38 | } 39 | 40 | QSharedPointer AnalyzerResult::result(QSharedPointer bitInfo, Parameters parameters) 41 | { 42 | return QSharedPointer( 43 | (new AnalyzerResult())->setParameters(parameters)->setBitInfo(bitInfo) 44 | ); 45 | } 46 | 47 | QSharedPointer AnalyzerResult::error(QString errorString) 48 | { 49 | auto result = new AnalyzerResult(); 50 | result->m_errorString = errorString; 51 | return QSharedPointer(result); 52 | } 53 | -------------------------------------------------------------------------------- /src/hobbits-core/analyzerresult.h: -------------------------------------------------------------------------------- 1 | #ifndef ANALYZERRESULT_H 2 | #define ANALYZERRESULT_H 3 | 4 | #include "bitinfo.h" 5 | #include "range.h" 6 | #include "parameters.h" 7 | #include 8 | #include "hobbits-core_global.h" 9 | 10 | /** 11 | * @brief The AnalyzerResult class contains the result of an AnalyzerInterface run 12 | * 13 | * \see AnalyzerInterface 14 | */ 15 | class HOBBITSCORESHARED_EXPORT AnalyzerResult 16 | { 17 | public: 18 | AnalyzerResult(); 19 | 20 | AnalyzerResult* setBitInfo(QSharedPointer bitInfo); 21 | QSharedPointer bitInfo() const; 22 | 23 | AnalyzerResult* setParameters(const Parameters ¶meters); 24 | const Parameters parameters() const; 25 | 26 | bool hasNullParameters() const; 27 | QString errorString() const; 28 | 29 | static QSharedPointer result(QSharedPointer bitInfo, Parameters parameters); 30 | static QSharedPointer error(QString errorString); 31 | 32 | private: 33 | QSharedPointer m_bitInfo; 34 | Parameters m_parameters; 35 | QString m_errorString; 36 | }; 37 | 38 | #endif // ANALYZERRESULT_H 39 | -------------------------------------------------------------------------------- /src/hobbits-core/bitcontainermanager.h: -------------------------------------------------------------------------------- 1 | #ifndef BITCONTAINERMANAGER_H 2 | #define BITCONTAINERMANAGER_H 3 | 4 | #include "bitcontainer.h" 5 | #include 6 | #include "hobbits-core_global.h" 7 | 8 | /** 9 | * @brief The BitContainerManager class assists with the management of BitContainer instances 10 | * 11 | * \see BitContainer 12 | */ 13 | class HOBBITSCORESHARED_EXPORT BitContainerManager : public QObject 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit BitContainerManager(QObject *parent = nullptr); 19 | virtual ~BitContainerManager(); 20 | 21 | virtual QSharedPointer currentContainer(); 22 | virtual QSharedPointer getContainerById(QUuid id); 23 | 24 | virtual bool addContainer(QSharedPointer container); 25 | virtual bool selectContainer(QSharedPointer container); 26 | 27 | virtual void deleteCurrentContainer(); 28 | virtual void deleteAllContainers(); 29 | 30 | Q_SIGNALS: 31 | void currSelectionChanged(QSharedPointer selected, QSharedPointer deselected); 32 | void containerAdded(QSharedPointer); 33 | 34 | protected: 35 | QMap> m_containerMap; 36 | QSharedPointer m_current; 37 | }; 38 | 39 | #endif // BITCONTAINERMANAGER_H 40 | -------------------------------------------------------------------------------- /src/hobbits-core/bitcontainerpreview.h: -------------------------------------------------------------------------------- 1 | #ifndef BITCONTAINERPREVIEW_H 2 | #define BITCONTAINERPREVIEW_H 3 | 4 | #include "bitcontainer.h" 5 | #include 6 | #include "hobbits-core_global.h" 7 | 8 | /** 9 | * @brief The BitContainerPreview class is a proxy class for BitContainers that prevents bit editing, but allows limited metadata editing 10 | * 11 | * \see BitContainer 12 | */ 13 | class HOBBITSCORESHARED_EXPORT BitContainerPreview : public QObject 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | static QSharedPointer wrap(QSharedPointer bitContainer); 19 | 20 | QString name() const; 21 | QSharedPointer bits() const; 22 | QSharedPointer info() const; 23 | 24 | void addHighlight(RangeHighlight highlight); 25 | void addHighlights(QList highlights); 26 | void setMetadata(QString key, QVariant value); 27 | void clearHighlightCategory(QString category); 28 | 29 | Q_SIGNALS: 30 | void changed(); 31 | 32 | private: 33 | BitContainerPreview(QSharedPointer bitContainer); 34 | QSharedPointer m_bitContainer; 35 | }; 36 | 37 | #endif // BITCONTAINERPREVIEW_H 38 | -------------------------------------------------------------------------------- /src/hobbits-core/displayrenderconfig.h: -------------------------------------------------------------------------------- 1 | #ifndef DISPLAYRENDERCONFIG_H 2 | #define DISPLAYRENDERCONFIG_H 3 | 4 | #include 5 | #include "hobbits-core_global.h" 6 | 7 | class HOBBITSCORESHARED_EXPORT DisplayRenderConfig : public QObject 8 | { 9 | Q_OBJECT 10 | public: 11 | enum RedrawTriggers { 12 | NewBitOffset = 0x01, 13 | NewFrameOffset = 0x02, 14 | NewBitHover = 0x04, 15 | NewMouseHover = 0x08 16 | }; 17 | 18 | DisplayRenderConfig(); 19 | 20 | bool asynchronous() const; 21 | void setAsynchronous(bool asynchronous); 22 | 23 | bool hideFrameOffsetControls() const; 24 | void setHideFrameOffsetControls(bool hideFrameOffsetControls); 25 | 26 | bool hideBitOffsetControls() const; 27 | void setHideBitOffsetControls(bool hideBitOffsetControls); 28 | 29 | int fullRedrawTriggers() const; 30 | void setFullRedrawTriggers(int fullRedrawTriggers); 31 | 32 | int overlayRedrawTriggers() const; 33 | void setOverlayRedrawTriggers(int overlayRedrawTriggers); 34 | 35 | private: 36 | bool m_asynchronous; 37 | bool m_hideBitOffsetControls; 38 | bool m_hideFrameOffsetControls; 39 | int m_fullRedrawTriggers; 40 | int m_overlayRedrawTriggers; 41 | }; 42 | 43 | #endif // DISPLAYRENDERCONFIG_H 44 | -------------------------------------------------------------------------------- /src/hobbits-core/exportresult.cpp: -------------------------------------------------------------------------------- 1 | #include "exportresult.h" 2 | 3 | ExportResult::ExportResult() 4 | { 5 | 6 | } 7 | 8 | ExportResult* ExportResult::setParameters(const Parameters ¶meters) 9 | { 10 | m_parameters = parameters; 11 | return this; 12 | } 13 | 14 | const Parameters ExportResult::parameters() const 15 | { 16 | return m_parameters; 17 | } 18 | 19 | bool ExportResult::hasNullParameters() const 20 | { 21 | return m_parameters.isNull(); 22 | } 23 | 24 | QString ExportResult::errorString() const 25 | { 26 | return m_errorString; 27 | } 28 | 29 | QSharedPointer ExportResult::nullResult() 30 | { 31 | return QSharedPointer(new ExportResult()); 32 | } 33 | 34 | QSharedPointer ExportResult::error(QString errorString) 35 | { 36 | auto result = new ExportResult(); 37 | result->m_errorString = errorString; 38 | return QSharedPointer(result); 39 | } 40 | 41 | QSharedPointer ExportResult::result(Parameters parameters) 42 | { 43 | return QSharedPointer((new ExportResult())->setParameters(parameters)); 44 | } 45 | -------------------------------------------------------------------------------- /src/hobbits-core/exportresult.h: -------------------------------------------------------------------------------- 1 | #ifndef EXPORTRESULT_H 2 | #define EXPORTRESULT_H 3 | 4 | #include "bitcontainer.h" 5 | #include "parameters.h" 6 | 7 | /** 8 | * @brief The ExportResult class contains the result of an ImportExportInterface::exportBits() run 9 | * 10 | * \see ImportExportInterface 11 | */ 12 | class HOBBITSCORESHARED_EXPORT ExportResult 13 | { 14 | public: 15 | ExportResult(); 16 | 17 | ExportResult* setParameters(const Parameters ¶meters); 18 | const Parameters parameters() const; 19 | 20 | bool hasNullParameters() const; 21 | QString errorString() const; 22 | 23 | static QSharedPointer nullResult(); 24 | static QSharedPointer error(QString errorString); 25 | static QSharedPointer result(Parameters parameters); 26 | 27 | private: 28 | Parameters m_parameters; 29 | QString m_errorString; 30 | }; 31 | 32 | #endif // EXPORTRESULT_H 33 | -------------------------------------------------------------------------------- /src/hobbits-core/frame.cpp: -------------------------------------------------------------------------------- 1 | #include "frame.h" 2 | 3 | #include 4 | 5 | Frame::Frame() : 6 | Range(-1, -1) 7 | { 8 | 9 | } 10 | 11 | Frame::Frame(QSharedPointer bits, qint64 start, qint64 end) : 12 | Range(start, end), 13 | m_bits(bits) 14 | { 15 | 16 | } 17 | 18 | Frame::Frame(QSharedPointer bits, Range range) : 19 | Range(range), 20 | m_bits(bits) 21 | { 22 | 23 | } 24 | 25 | bool Frame::at(qint64 i) const 26 | { 27 | Q_ASSERT_X( 28 | i >= 0 && i < this->size(), 29 | "Frame", 30 | QStringLiteral("Index %1 is not valid").arg(i).toLocal8Bit().data()); 31 | return m_bits->at(this->start() + i); 32 | } 33 | 34 | qint64 Frame::copyBits(qint64 bitOffset, BitArray *dest, qint64 destBitOffset, qint64 maxBits, int copyMode) const 35 | { 36 | return m_bits->copyBits(bitOffset + start(), dest, destBitOffset, qMin(maxBits, size() - bitOffset), copyMode); 37 | } 38 | 39 | QSharedPointer Frame::bits() const 40 | { 41 | return m_bits; 42 | } 43 | -------------------------------------------------------------------------------- /src/hobbits-core/frame.h: -------------------------------------------------------------------------------- 1 | #ifndef FRAME_H 2 | #define FRAME_H 3 | 4 | #include "bitarray.h" 5 | #include "range.h" 6 | #include 7 | #include "hobbits-core_global.h" 8 | 9 | /** 10 | * @brief The Frame class specifies a slice of bits from a BitArray 11 | * 12 | * \see Range BitArray 13 | */ 14 | class HOBBITSCORESHARED_EXPORT Frame : public Range 15 | { 16 | public: 17 | Frame(); 18 | Frame(QSharedPointer bits, qint64 start, qint64 end); 19 | Frame(QSharedPointer bits, Range range); 20 | Frame(const Frame &) = default; 21 | 22 | bool at(qint64 i) const; 23 | qint64 copyBits(qint64 bitOffset, BitArray *dest, qint64 destBitOffset, qint64 maxBits, int copyMode = BitArray::Copy) const; 24 | 25 | QSharedPointer bits() const; 26 | 27 | private: 28 | QSharedPointer m_bits; 29 | }; 30 | 31 | #endif // FRAME_H 32 | -------------------------------------------------------------------------------- /src/hobbits-core/fwd_abstractparametereditor.h: -------------------------------------------------------------------------------- 1 | #ifndef FWD_ABSTRACTPARAMETEREDITOR_H 2 | #define FWD_ABSTRACTPARAMETEREDITOR_H 3 | #ifndef ABSTRACTPARAMETEREDITOR_H 4 | 5 | #include "hobbits-core_global.h" 6 | 7 | class HOBBITSCORESHARED_EXPORT AbstractParameterEditor; 8 | 9 | #endif // ABSTRACTPARAMETEREDITOR_H 10 | #endif // FWD_ABSTRACTPARAMETEREDITOR_H 11 | -------------------------------------------------------------------------------- /src/hobbits-core/hobbits-core_global.h: -------------------------------------------------------------------------------- 1 | #ifndef HOBBITSCORE_GLOBAL_H 2 | #define HOBBITSCORE_GLOBAL_H 3 | 4 | #include 5 | 6 | #if defined (HOBBITSCORE_LIBRARY) 7 | # define HOBBITSCORESHARED_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define HOBBITSCORESHARED_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // HOBBITSCORE_GLOBAL_H 13 | -------------------------------------------------------------------------------- /src/hobbits-core/hobbitscoreconfig.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #cmakedefine01 SELF_CONTAINED_APP 4 | #cmakedefine01 DEVELOPMENT_BUILD 5 | 6 | namespace HobbitsCoreConfig 7 | { 8 | 9 | static const char VERSION[] = "@HOBBITS_CORE_VERSION@"; 10 | static const char PLUGINS_DEFAULT_PATH[] = "@HOBBITS_PLUGINS_PATH@"; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/hobbits-core/hobbitsplugin.h: -------------------------------------------------------------------------------- 1 | #ifndef HOBBITSPLUGIN_H 2 | #define HOBBITSPLUGIN_H 3 | 4 | #include "hobbits-core_global.h" 5 | #include 6 | #include "parameterdelegate.h" 7 | #include "pluginactionprogress.h" 8 | #include "displayrenderconfig.h" 9 | 10 | 11 | /** 12 | * @brief Abstract base plugin interface with common metadata methods 13 | * 14 | * \see AnalyzerInterface DisplayInterface ImportExportInterface OperatorInterface 15 | */ 16 | class HOBBITSCORESHARED_EXPORT HobbitsPlugin 17 | { 18 | public: 19 | virtual ~HobbitsPlugin() = default; 20 | 21 | virtual QString name() = 0; 22 | virtual QString description() = 0; 23 | virtual QStringList tags() = 0; 24 | }; 25 | 26 | #endif // HOBBITSPLUGIN_H 27 | -------------------------------------------------------------------------------- /src/hobbits-core/importresult.h: -------------------------------------------------------------------------------- 1 | #ifndef IMPORTRESULT_H 2 | #define IMPORTRESULT_H 3 | 4 | #include "bitcontainer.h" 5 | #include "parameters.h" 6 | 7 | /** 8 | * @brief The ExportResult class contains the result of an ImportExportInterface::importBits() run 9 | * 10 | * \see ImportExportInterface 11 | */ 12 | class HOBBITSCORESHARED_EXPORT ImportResult 13 | { 14 | public: 15 | ImportResult(); 16 | 17 | ImportResult* setContainer(QSharedPointer container); 18 | QSharedPointer getContainer() const; 19 | 20 | ImportResult* setParameters(const Parameters ¶meters); 21 | const Parameters parameters() const; 22 | 23 | bool hasNullParameters() const; 24 | QString errorString() const; 25 | 26 | static QSharedPointer nullResult(); 27 | static QSharedPointer error(QString error); 28 | static QSharedPointer result(QSharedPointer container, Parameters parameters); 29 | 30 | private: 31 | QSharedPointer m_container; 32 | Parameters m_parameters; 33 | QString m_errorString; 34 | }; 35 | 36 | #endif // IMPORTRESULT_H 37 | -------------------------------------------------------------------------------- /src/hobbits-core/metadatahelper.h: -------------------------------------------------------------------------------- 1 | #ifndef METADATAHELPER_H 2 | #define METADATAHELPER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "hobbits-core_global.h" 8 | 9 | /** 10 | * @brief The MetadataHelper class facilitates coordinated usage of BitInfo across plugins 11 | * 12 | * Since the metadata in BitInfo can be so flexible, it is important for different plugins 13 | * to have shared expectations about metadata values that they might encounter or add 14 | * during processing. 15 | * 16 | * \see BitInfo 17 | */ 18 | class HOBBITSCORESHARED_EXPORT MetadataHelper 19 | { 20 | public: 21 | static MetadataHelper& instance(); 22 | 23 | struct HOBBITSCORESHARED_EXPORT SampleFormat { 24 | QString id; 25 | QString name; 26 | int wordSize; 27 | bool littleEndian; 28 | }; 29 | 30 | static QString sampleFormatKey(); 31 | static QList sampleFormats(); 32 | static SampleFormat sampleFormat(QString id); 33 | 34 | private: 35 | MetadataHelper(); 36 | 37 | QList m_sampleFormats; 38 | QMap m_sampleFormatMap; 39 | public: 40 | MetadataHelper(MetadataHelper const&) = delete; 41 | void operator=(MetadataHelper const&) = delete; 42 | }; 43 | 44 | #endif // METADATAHELPER_H 45 | -------------------------------------------------------------------------------- /src/hobbits-core/operatorresult.h: -------------------------------------------------------------------------------- 1 | #ifndef OPERATORRESULT_H 2 | #define OPERATORRESULT_H 3 | 4 | #include "parameters.h" 5 | #include 6 | #include 7 | #include "bitcontainer.h" 8 | #include "hobbits-core_global.h" 9 | 10 | /** 11 | * @brief The OperatorResult class contains the result of an OperatorInterface run 12 | * 13 | * \see OperatorInterface 14 | */ 15 | class HOBBITSCORESHARED_EXPORT OperatorResult 16 | { 17 | public: 18 | OperatorResult(); 19 | 20 | OperatorResult* setOutputContainers(QList> outputContainers); 21 | QList> outputContainers() const; 22 | 23 | OperatorResult* setParameters(const Parameters ¶meters); 24 | const Parameters parameters() const; 25 | 26 | bool hasNullParameters() const; 27 | QString errorString() const; 28 | 29 | static QSharedPointer result(QList> outputContainers, Parameters parameters); 30 | static QSharedPointer error(QString error); 31 | 32 | private: 33 | QList> m_outputContainers; 34 | Parameters m_parameters; 35 | QString m_errorString; 36 | }; 37 | 38 | #endif // OPERATORRESULT_H 39 | -------------------------------------------------------------------------------- /src/hobbits-core/parameters.cpp: -------------------------------------------------------------------------------- 1 | #include "parameters.h" 2 | 3 | 4 | Parameters::Parameters() : 5 | m_initialized(true), 6 | m_values(QJsonObject()) { 7 | 8 | } 9 | 10 | Parameters::Parameters(QJsonObject values) : 11 | m_initialized(true), 12 | m_values(values) { 13 | 14 | } 15 | 16 | Parameters Parameters::nullParameters() { 17 | Parameters p; 18 | p.m_initialized = false; 19 | return p; 20 | } 21 | 22 | bool Parameters::isNull() const { 23 | return !m_initialized; 24 | } 25 | 26 | bool Parameters::contains(const QString &key) const { 27 | return m_values.contains(key); 28 | } 29 | 30 | QJsonObject Parameters::values() const { 31 | return m_values; 32 | } 33 | 34 | QJsonValue Parameters::value(const QString &key) const { 35 | if (!m_values.contains(key)) { 36 | return QJsonValue(); 37 | } 38 | return m_values.value(key); 39 | } 40 | 41 | void Parameters::insert(const QString &key, const QJsonValue &value) { 42 | m_initialized = true; 43 | m_values.insert(key, value); 44 | } 45 | 46 | QJsonValue Parameters::serialize() const { 47 | if (!m_initialized) { 48 | return QJsonValue(); 49 | } 50 | return values(); 51 | } 52 | 53 | Parameters Parameters::deserialize(QJsonValue serialized) { 54 | if (serialized.isObject()) { 55 | return Parameters(serialized.toObject()); 56 | } 57 | return Parameters(); 58 | } 59 | -------------------------------------------------------------------------------- /src/hobbits-core/parameters.h: -------------------------------------------------------------------------------- 1 | #ifndef PARAMETERS_H 2 | #define PARAMETERS_H 3 | 4 | #include 5 | #include "hobbits-core_global.h" 6 | 7 | class HOBBITSCORESHARED_EXPORT Parameters 8 | { 9 | public: 10 | Parameters(); 11 | explicit Parameters(QJsonObject values); 12 | static Parameters nullParameters(); 13 | 14 | bool isNull() const; 15 | bool contains(const QString &key) const; 16 | QJsonObject values() const; 17 | QJsonValue value(const QString &key) const; 18 | void insert(const QString &key, const QJsonValue &value); 19 | 20 | QJsonValue serialize() const; 21 | static Parameters deserialize(QJsonValue serialized); 22 | 23 | inline bool operator==(const Parameters &other) const 24 | { 25 | if (!m_initialized) { 26 | return other.isNull(); 27 | } 28 | else { 29 | return m_values == other.values(); 30 | } 31 | } 32 | 33 | private: 34 | bool m_initialized; 35 | QJsonObject m_values; 36 | }; 37 | 38 | #endif // PARAMETERS_H 39 | -------------------------------------------------------------------------------- /src/hobbits-core/pluginactionprogress.h: -------------------------------------------------------------------------------- 1 | #ifndef ACTIONPROGRESS_H 2 | #define ACTIONPROGRESS_H 3 | 4 | #include 5 | #include 6 | #include "hobbits-core_global.h" 7 | #include 8 | #include 9 | 10 | /** 11 | * @brief The PluginActionProgress class facilitates communication to and from executing plugin actions 12 | * 13 | * \see PluginAction PluginActionWatcher 14 | */ 15 | class HOBBITSCORESHARED_EXPORT PluginActionProgress : public QObject 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | PluginActionProgress(QObject *parent = nullptr); 21 | 22 | bool isCancelled(); 23 | 24 | public Q_SLOTS: 25 | void setProgressPercent(int progressPercent); 26 | void setCancelled(bool cancelled); 27 | 28 | void setProgress(qint64 completed, qint64 required); 29 | void setProgress(int completed, int required); 30 | void setProgress(double completed, double required); 31 | 32 | void sendUpdate(QString type, QVariant value); 33 | 34 | Q_SIGNALS: 35 | void progressPercentChanged(int percent); 36 | void progressUpdate(QString type, QVariant value); 37 | 38 | protected: 39 | int m_lastProgressPercent; 40 | int m_progressPercent; 41 | QMutex m_mutex; 42 | bool m_cancelled; 43 | }; 44 | 45 | #endif // ACTIONPROGRESS_H 46 | -------------------------------------------------------------------------------- /src/hobbits-core/range.h: -------------------------------------------------------------------------------- 1 | #ifndef RANGE_H 2 | #define RANGE_H 3 | 4 | #include 5 | #include "hobbits-core_global.h" 6 | 7 | /** 8 | * @brief The Range class defines a contiguous range with integer precision 9 | * 10 | * \see Frame RangeHighlight RangeSequence 11 | */ 12 | class HOBBITSCORESHARED_EXPORT Range 13 | { 14 | public: 15 | Range(); 16 | Range(qint64 start, qint64 end); 17 | Range(const Range &other) = default; 18 | 19 | qint64 size() const; 20 | 21 | qint64 start() const; 22 | qint64 end() const; 23 | 24 | bool isNull() const; 25 | 26 | unsigned int compare(const Range&) const; 27 | 28 | Range getOverlap(const Range &other) const; 29 | 30 | void translate(qint64 offset); 31 | 32 | enum Comparison { 33 | Unknown = 0x00, 34 | Separate = 0x01, 35 | Overlapping = 0x02, 36 | Before = 0x04, 37 | After = 0x08, 38 | Within = 0x10, 39 | Around = 0x20, 40 | Equal = 0x40 41 | }; 42 | 43 | friend HOBBITSCORESHARED_EXPORT QDataStream& operator<<(QDataStream&, const Range&); 44 | friend HOBBITSCORESHARED_EXPORT QDataStream& operator>>(QDataStream&, Range&); 45 | 46 | private: 47 | qint64 m_start; 48 | qint64 m_end; 49 | bool m_null; 50 | }; 51 | 52 | bool HOBBITSCORESHARED_EXPORT operator<(const Range &a, const Range &b); 53 | 54 | Q_DECLARE_METATYPE(Range); 55 | 56 | #endif // RANGE_H 57 | -------------------------------------------------------------------------------- /src/hobbits-gui/Hobbits.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Hobbits Binary Format analyser 3 | Exec=hobbits %f 4 | Icon=HobbitsRingSmall 5 | Comment=A multi-platform GUI for bit-based analysis, processing, and visualization 6 | Type=Application 7 | Categories=Development 8 | Terminal=false 9 | X-MultipleArgs=false 10 | StartupNotify=true 11 | -------------------------------------------------------------------------------- /src/hobbits-gui/batchcreationdialog.cpp: -------------------------------------------------------------------------------- 1 | #include "batchcreationdialog.h" 2 | #include "ui_batchcreationdialog.h" 3 | 4 | BatchCreationDialog::BatchCreationDialog(QSharedPointer container, QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::BatchCreationDialog) 7 | { 8 | ui->setupUi(this); 9 | 10 | this->setWindowTitle("Batch Configuration"); 11 | 12 | if (container->childUuids().isEmpty()) { 13 | ui->rb_after->setEnabled(false); 14 | ui->rb_before->setChecked(true); 15 | } 16 | else { 17 | ui->rb_after->setChecked(true); 18 | } 19 | 20 | connect(ui->rb_after, SIGNAL(toggled(bool)), this, SLOT(adjustToCurrentSelections())); 21 | connect(ui->rb_before, SIGNAL(toggled(bool)), this, SLOT(adjustToCurrentSelections())); 22 | } 23 | 24 | BatchCreationDialog::~BatchCreationDialog() 25 | { 26 | delete ui; 27 | } 28 | 29 | int BatchCreationDialog::getSelectedBatchMode() 30 | { 31 | int mode; 32 | if (ui->rb_after->isChecked()) { 33 | mode = PluginActionBatch::InclusiveAfter; 34 | } 35 | else { 36 | mode = PluginActionBatch::InclusiveBefore | PluginActionBatch::IncludeImportersFull; 37 | } 38 | 39 | return mode; 40 | } 41 | -------------------------------------------------------------------------------- /src/hobbits-gui/batchcreationdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef BATCHCREATIONDIALOG_H 2 | #define BATCHCREATIONDIALOG_H 3 | 4 | #include 5 | #include "bitcontainer.h" 6 | #include "pluginactionbatch.h" 7 | 8 | namespace Ui { 9 | class BatchCreationDialog; 10 | } 11 | 12 | class BatchCreationDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit BatchCreationDialog(QSharedPointer container, QWidget *parent = nullptr); 18 | ~BatchCreationDialog(); 19 | 20 | int getSelectedBatchMode(); 21 | 22 | private: 23 | Ui::BatchCreationDialog *ui; 24 | }; 25 | 26 | #endif // BATCHCREATIONDIALOG_H 27 | -------------------------------------------------------------------------------- /src/hobbits-gui/batches.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | batches/byte_align.hbat 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/hobbits-gui/containerselectiondialog.cpp: -------------------------------------------------------------------------------- 1 | #include "containerselectiondialog.h" 2 | #include "ui_containerselectiondialog.h" 3 | 4 | ContainerSelectionDialog::ContainerSelectionDialog(QSharedPointer manager, QWidget *parent) : 5 | QDialog(parent), 6 | ui(new Ui::ContainerSelectionDialog), 7 | m_currSelectionModel(QSharedPointer(new QItemSelectionModel)), 8 | m_bitManager(manager) 9 | { 10 | ui->setupUi(this); 11 | 12 | m_currSelectionModel->setModel(manager->getTreeModel().data()); 13 | ui->tv_containers->setModel(manager->getTreeModel().data()); 14 | ui->tv_containers->setSelectionModel(m_currSelectionModel.data()); 15 | 16 | setWindowTitle("Select Input Containers"); 17 | } 18 | 19 | ContainerSelectionDialog::~ContainerSelectionDialog() 20 | { 21 | delete ui; 22 | } 23 | 24 | QList> ContainerSelectionDialog::getSelected() 25 | { 26 | QList> selected; 27 | 28 | for (auto idx : m_currSelectionModel->selectedIndexes()) { 29 | selected.append(m_bitManager->getTreeModel()->getContainer(idx)); 30 | } 31 | 32 | return selected; 33 | } 34 | 35 | void ContainerSelectionDialog::setMessage(QString msg) 36 | { 37 | ui->lb_msg->setText(msg); 38 | } 39 | -------------------------------------------------------------------------------- /src/hobbits-gui/containerselectiondialog.h: -------------------------------------------------------------------------------- 1 | #ifndef CONTAINERSELECTIONDIALOG_H 2 | #define CONTAINERSELECTIONDIALOG_H 3 | 4 | #include "bitcontainermanagerui.h" 5 | #include 6 | 7 | namespace Ui 8 | { 9 | class ContainerSelectionDialog; 10 | } 11 | 12 | class ContainerSelectionDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit ContainerSelectionDialog(QSharedPointer manager, QWidget *parent = nullptr); 18 | 19 | ~ContainerSelectionDialog(); 20 | 21 | QList> getSelected(); 22 | void setMessage(QString msg); 23 | 24 | private: 25 | Ui::ContainerSelectionDialog *ui; 26 | QSharedPointer m_currSelectionModel; 27 | QSharedPointer m_bitManager; 28 | }; 29 | 30 | #endif // CONTAINERSELECTIONDIALOG_H 31 | -------------------------------------------------------------------------------- /src/hobbits-gui/hobbitsguiconfig.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace HobbitsGuiConfig 4 | { 5 | static const char VERSION[] = "@HOBBITS_GUI_VERSION@"; 6 | } -------------------------------------------------------------------------------- /src/hobbits-gui/hobbitsstyle.h: -------------------------------------------------------------------------------- 1 | #ifndef HOBBITSSTYLE_H 2 | #define HOBBITSSTYLE_H 3 | 4 | #include 5 | 6 | class HobbitsStyle 7 | { 8 | public: 9 | HobbitsStyle(); 10 | 11 | static void applyStyle(QApplication &app); 12 | 13 | private: 14 | static void loadFonts(); 15 | }; 16 | 17 | #endif // HOBBITSSTYLE_H 18 | -------------------------------------------------------------------------------- /src/hobbits-gui/icons.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/icons/trash.png 4 | images/icons/HobbitsRingSmall.png 5 | images/icons/mahlet.bits 6 | images/icons/menu.png 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/hobbits-gui/images/icons/HobbitsRingSmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/images/icons/HobbitsRingSmall.png -------------------------------------------------------------------------------- /src/hobbits-gui/images/icons/mahlet.bits: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/images/icons/mahlet.bits -------------------------------------------------------------------------------- /src/hobbits-gui/images/icons/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/images/icons/menu.png -------------------------------------------------------------------------------- /src/hobbits-gui/images/icons/trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/images/icons/trash.png -------------------------------------------------------------------------------- /src/hobbits-gui/preferencesdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef PREFERENCESDIALOG_H 2 | #define PREFERENCESDIALOG_H 3 | 4 | #include "hobbitspluginmanager.h" 5 | #include "settingsmanager.h" 6 | #include 7 | #include 8 | 9 | namespace Ui 10 | { 11 | class PreferencesDialog; 12 | } 13 | 14 | class PreferencesDialog : public QDialog 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit PreferencesDialog(QSharedPointer pluginManager, QWidget *parent = nullptr); 20 | 21 | ~PreferencesDialog(); 22 | 23 | private slots: 24 | void on_pb_apply_clicked(); 25 | 26 | void on_pb_cancel_clicked(); 27 | 28 | void on_pb_ok_clicked(); 29 | 30 | void on_lw_groups_currentRowChanged(int currentRow); 31 | 32 | QWidget* createUiPage(); 33 | QWidget* createPluginPage(); 34 | QWidget* createPluginLoaderPage(); 35 | 36 | QLayoutItem* createEditor(std::function getter, std::function setter, QWidget *parent); 37 | 38 | private: 39 | static QPixmap getColorPixmap(QColor color); 40 | 41 | Ui::PreferencesDialog *ui; 42 | 43 | SettingsData m_data; 44 | QSharedPointer m_pluginManager; 45 | }; 46 | 47 | #endif // PREFERENCESDIALOG_H 48 | -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-Black.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-BlackItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-BoldItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraBold.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraLight.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-Italic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-Light.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-LightItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-MediumItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-SemiBold.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-Thin.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Montserrat/Montserrat-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Montserrat/Montserrat-ThinItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-Black.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-Italic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/RobotoMono-Italic-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/RobotoMono-Italic-VariableFont_wght.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/RobotoMono-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/RobotoMono-VariableFont_wght.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Bold.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-BoldItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-ExtraLight.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Italic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Light.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-LightItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Medium.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-MediumItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Regular.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-SemiBold.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-Thin.ttf -------------------------------------------------------------------------------- /src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-gui/style/fonts/Roboto_Mono/static/RobotoMono-ThinItalic.ttf -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Find/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "Find" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Find/find.h: -------------------------------------------------------------------------------- 1 | #ifndef FIND_H 2 | #define FIND_H 3 | 4 | 5 | #include "analyzerinterface.h" 6 | #include "parameterdelegate.h" 7 | 8 | class Find : public QObject, AnalyzerInterface 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "hobbits.AnalyzerInterface.Find") 12 | Q_INTERFACES(AnalyzerInterface) 13 | 14 | public: 15 | Find(); 16 | 17 | AnalyzerInterface* createDefaultAnalyzer() override; 18 | 19 | QString name() override; 20 | QString description() override; 21 | QStringList tags() override; 22 | 23 | QSharedPointer parameterDelegate() override; 24 | 25 | QSharedPointer analyzeBits( 26 | QSharedPointer container, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | private: 31 | QSharedPointer m_delegate; 32 | }; 33 | 34 | #endif // FIND_H 35 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Find/findform.h: -------------------------------------------------------------------------------- 1 | #ifndef FINDFORM_H 2 | #define FINDFORM_H 3 | 4 | #include "parameterdelegate.h" 5 | #include "abstractparametereditor.h" 6 | #include "parameterhelper.h" 7 | #include "highlightnavigator.h" 8 | 9 | const QString FIND_COLOR_KEY = "find_color"; 10 | const QString FOUND_HIGHLIGHT = "found_patterns"; 11 | const QString FOUND_RESULT_LABEL = "found_result_label"; 12 | 13 | namespace Ui 14 | { 15 | class FindForm; 16 | } 17 | 18 | class FindForm : public AbstractParameterEditor 19 | { 20 | Q_OBJECT 21 | 22 | public: 23 | FindForm(QSharedPointer delegate); 24 | ~FindForm() override; 25 | 26 | QString title() override; 27 | 28 | bool setParameters(const Parameters ¶meters) override; 29 | Parameters parameters() override; 30 | 31 | void giveDisplayHandle(QSharedPointer handle) override; 32 | 33 | private: 34 | void previewBitsUiImpl(QSharedPointer container) override; 35 | 36 | Ui::FindForm *ui; 37 | HighlightNavigator* m_highlightNav; 38 | QSharedPointer m_paramHelper; 39 | }; 40 | 41 | #endif // FINDFORM_H 42 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Find/findform.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | FindForm 4 | 5 | 6 | 7 | 0 8 | 0 9 | 604 10 | 147 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | Search String (e.g. 0xf6f6 or 0b110) 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Highlight/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "Highlight" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Highlight/highlight.h: -------------------------------------------------------------------------------- 1 | #ifndef HIGHLIGHT_H 2 | #define HIGHLIGHT_H 3 | 4 | 5 | #include "analyzerinterface.h" 6 | #include "parameterdelegate.h" 7 | 8 | class Highlight : public QObject, AnalyzerInterface 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "hobbits.AnalyzerInterface.Highlight") 12 | Q_INTERFACES(AnalyzerInterface) 13 | 14 | public: 15 | Highlight(); 16 | 17 | AnalyzerInterface* createDefaultAnalyzer() override; 18 | 19 | QString name() override; 20 | QString description() override; 21 | QStringList tags() override; 22 | 23 | QSharedPointer parameterDelegate() override; 24 | 25 | QSharedPointer analyzeBits( 26 | QSharedPointer container, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | private: 31 | QSharedPointer m_delegate; 32 | }; 33 | 34 | #endif // HIGHLIGHT_H 35 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Highlight/highlightform.cpp: -------------------------------------------------------------------------------- 1 | #include "highlightform.h" 2 | #include "ui_highlightform.h" 3 | 4 | HighlightForm::HighlightForm(QSharedPointer delegate): 5 | ui(new Ui::HighlightForm()), 6 | m_helper(new ParameterHelper(delegate)) 7 | { 8 | ui->setupUi(this); 9 | 10 | m_helper->addSpinBoxIntParameter("start", ui->sb_start); 11 | m_helper->addSpinBoxIntParameter("length", ui->sb_length); 12 | } 13 | 14 | HighlightForm::~HighlightForm() 15 | { 16 | delete ui; 17 | } 18 | 19 | QString HighlightForm::title() 20 | { 21 | return "Configure Plugin"; 22 | } 23 | 24 | Parameters HighlightForm::parameters() 25 | { 26 | return m_helper->getParametersFromUi(); 27 | } 28 | 29 | bool HighlightForm::setParameters(const Parameters ¶meters) 30 | { 31 | return m_helper->applyParametersToUi(parameters); 32 | } 33 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Highlight/highlightform.h: -------------------------------------------------------------------------------- 1 | #ifndef HIGHLIGHTFORM_H 2 | #define HIGHLIGHTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class HighlightForm; 10 | } 11 | 12 | class HighlightForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | HighlightForm(QSharedPointer delegate); 18 | ~HighlightForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | 27 | Ui::HighlightForm *ui; 28 | QSharedPointer m_helper; 29 | }; 30 | 31 | #endif // HIGHLIGHTFORM_H 32 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "KaitaiStruct" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | 3 | # Doesn't work out of the box, likely a bug in CMake 4 | get_target_property(INTERFACE_INCLUDE_DIRECTORIES_HobbitsPython "hobbits-python" INTERFACE_INCLUDE_DIRECTORIES) 5 | target_include_directories("hobbits-plugin-analyzers-KaitaiStruct" PRIVATE "${INTERFACE_INCLUDE_DIRECTORIES_HobbitsPython}") 6 | 7 | target_link_libraries("hobbits-plugin-analyzers-KaitaiStruct" PRIVATE hobbits-python) 8 | #set("CPACK_DEBIAN_HOBBITS-PLUGIN-ANALYZERS-KAITAISTRUCT_PACKAGE_DEPENDS" "${CPACK_DEBIAN_HOBBITS-PLUGIN-ANALYZERS-KAITAISTRUCT_PACKAGE_DEPENDS}, ${CPACK_DEBIAN_HOBBITS-PYTHON_PACKAGE_NAME}") 9 | #set("CPACK_DEBIAN_HOBBITS-PLUGIN-ANALYZERS-KAITAISTRUCT_PACKAGE_SUGGESTS" "kaitai-struct-compiler, python3-kaitaistruct") 10 | pass_through_cpack_vars() 11 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/kaitaiscripts.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | scripts/runner.py 4 | scripts/dependencies/kaitaistruct.py 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/kaitaistruct.h: -------------------------------------------------------------------------------- 1 | #ifndef KAITAISTRUCT_H 2 | #define KAITAISTRUCT_H 3 | 4 | #include "analyzerinterface.h" 5 | #include "parameterdelegate.h" 6 | 7 | class KaitaiStruct : public QObject, AnalyzerInterface 8 | { 9 | Q_OBJECT 10 | Q_PLUGIN_METADATA(IID "hobbits.AnalyzerInterface.KaitaiStruct") 11 | Q_INTERFACES(AnalyzerInterface) 12 | 13 | public: 14 | KaitaiStruct(); 15 | 16 | AnalyzerInterface* createDefaultAnalyzer() override; 17 | 18 | QString name() override; 19 | QString description() override; 20 | QStringList tags() override; 21 | 22 | QSharedPointer parameterDelegate() override; 23 | 24 | QSharedPointer analyzeBits( 25 | QSharedPointer container, 26 | const Parameters ¶meters, 27 | QSharedPointer progress) override; 28 | 29 | 30 | private: 31 | typedef struct KsField { 32 | QString label; 33 | Range range; 34 | QString value; 35 | QString type; 36 | QVector children; 37 | } KsField; 38 | RangeHighlight makeHighlight(QString label, const QMap> &fieldData, int &colorIdx); 39 | 40 | QSharedPointer m_delegate; 41 | 42 | }; 43 | 44 | #endif // KAITAISTRUCT_H 45 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/cad/monomakh_sapr_chg.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: monomakh_sapr_chg 3 | endian: le 4 | file-extension: chg 5 | application: MONOMAKH-SAPR 6 | ks-version: 0.7 7 | license: CC0-1.0 8 | doc: | 9 | CHG is a container format file used by 10 | [MONOMAKH-SAPR](https://www.liraland.com/mono/index.php), a software 11 | package for analysis & design of reinforced concrete multi-storey 12 | buildings with arbitrary configuration in plan. 13 | 14 | CHG is a simple container, which bundles several project files 15 | together. 16 | 17 | Written and tested by Vladimir Shulzhitskiy, 2017 18 | seq: 19 | - id: title 20 | type: str 21 | size: 10 22 | encoding: "ascii" 23 | - id: ent 24 | type: block 25 | repeat: eos 26 | types: 27 | block: 28 | seq: 29 | - id: header 30 | type: str 31 | size: 13 32 | encoding: "ascii" 33 | - id: file_size 34 | type: u8 35 | - id: file 36 | size: file_size 37 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/common/bytes_with_io.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: bytes_with_io 3 | title: Byte array with an `_io` member 4 | license: MIT 5 | doc: | 6 | Helper type to work around Kaitai Struct not providing an `_io` member for plain byte arrays. 7 | seq: 8 | - id: data 9 | size-eos: true 10 | doc: The actual data. 11 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/firmware/andes_firmware.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: andes_firmware 3 | endian: le 4 | title: Andes Firmware Image layout as seen in MT76 Wifi Chipsets 5 | license: CC0-1.0 6 | application: Firmware Image wifi chipset 7 | doc: Firmware image found with MediaTek MT76xx wifi chipsets. 8 | seq: 9 | - id: image_header 10 | type: image_header 11 | size: 32 12 | - id: ilm 13 | size: image_header.ilm_len 14 | - id: dlm 15 | size: image_header.dlm_len 16 | types: 17 | image_header: 18 | seq: 19 | - id: ilm_len 20 | type: u4 21 | - id: dlm_len 22 | type: u4 23 | - id: fw_ver 24 | type: u2 25 | - id: build_ver 26 | type: u2 27 | - id: extra 28 | type: u4 29 | - id: build_time 30 | type: str 31 | size: 16 32 | encoding: UTF-8 33 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/game/dune_2_pak.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: dune_2_pak 3 | application: Dune 2 game engine 4 | file-extension: pak 5 | license: CC0-1.0 6 | ks-version: 0.8 7 | encoding: ASCII 8 | endian: le 9 | seq: 10 | - id: dir 11 | size: dir_size 12 | type: files 13 | instances: 14 | dir_size: 15 | pos: 0 16 | type: u4 17 | types: 18 | files: 19 | seq: 20 | - id: files 21 | type: file(_index) 22 | repeat: eos 23 | file: 24 | params: 25 | - id: idx 26 | type: u4 27 | seq: 28 | - id: ofs 29 | type: u4 30 | - id: file_name 31 | type: strz 32 | if: ofs != 0 33 | instances: 34 | next_ofs0: 35 | value: _root.dir.files[idx + 1].ofs 36 | if: ofs != 0 37 | next_ofs: 38 | value: 'next_ofs0 == 0 ? _root._io.size : next_ofs0' 39 | if: ofs != 0 40 | body: 41 | io: _root._io 42 | pos: ofs 43 | size: next_ofs - ofs 44 | if: ofs != 0 45 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/game/ftl_dat.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: ftl_dat 3 | application: Faster Than Light (FTL) 4 | file-extension: dat 5 | license: CC0-1.0 6 | endian: le 7 | seq: 8 | - id: num_files 9 | type: u4 10 | doc: Number of files in the archive 11 | - id: files 12 | type: file 13 | repeat: expr 14 | repeat-expr: num_files 15 | types: 16 | file: 17 | seq: 18 | - id: ofs_meta 19 | type: u4 20 | instances: 21 | meta: 22 | pos: ofs_meta 23 | type: meta 24 | if: ofs_meta != 0 25 | meta: 26 | seq: 27 | - id: len_file 28 | type: u4 29 | - id: len_filename 30 | type: u4 31 | - id: filename 32 | type: str 33 | size: len_filename 34 | encoding: UTF-8 35 | - id: body 36 | size: len_file 37 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/game/gran_turismo_vol.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: gran_turismo_vol 3 | endian: le 4 | license: CC0-1.0 5 | file-extension: vol 6 | title: Gran Turismo File System (GTFS) 7 | seq: 8 | - id: magic 9 | contents: ["GTFS", 0, 0, 0, 0] 10 | - id: num_files 11 | type: u2 12 | - id: num_entries 13 | type: u2 14 | - id: reserved 15 | contents: [0, 0, 0, 0] 16 | - id: offsets 17 | type: u4 18 | repeat: expr 19 | repeat-expr: num_files 20 | instances: 21 | ofs_dir: 22 | value: offsets[1] 23 | files: 24 | pos: ofs_dir & 0xFFFFF800 25 | type: file_info 26 | repeat: expr 27 | repeat-expr: _root.num_entries 28 | types: 29 | file_info: 30 | seq: 31 | - id: timestamp 32 | type: u4 33 | - id: offset_idx 34 | type: u2 35 | - id: flags 36 | type: u1 37 | - id: name 38 | type: str 39 | encoding: ASCII 40 | size: 25 41 | pad-right: 0 42 | terminator: 0 43 | instances: 44 | size: 45 | value: '(_root.offsets[offset_idx + 1] & 0xFFFFF800) - _root.offsets[offset_idx]' 46 | body: 47 | pos: _root.offsets[offset_idx] & 0xFFFFF800 48 | size: size 49 | if: not is_dir 50 | is_dir: 51 | value: 'flags & 1 != 0' 52 | is_last_entry: 53 | value: 'flags & 0x80 != 0' 54 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/game/heroes_of_might_and_magic_agg.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: heroes_of_might_and_magic_agg 3 | application: Heroes of Might and Magic 4 | file-extension: agg 5 | license: CC0-1.0 6 | endian: le 7 | doc-ref: http://rewiki.regengedanken.de/wiki/.AGG_(Heroes_of_Might_and_Magic) 8 | seq: 9 | - id: num_files 10 | type: u2 11 | - id: entries 12 | type: entry 13 | repeat: expr 14 | repeat-expr: num_files 15 | types: 16 | entry: 17 | seq: 18 | - id: hash 19 | type: u2 20 | - id: offset 21 | type: u4 22 | - id: size 23 | type: u4 24 | - id: size2 25 | type: u4 26 | instances: 27 | body: 28 | pos: offset 29 | size: size 30 | filename: 31 | seq: 32 | - id: str 33 | type: strz 34 | encoding: ASCII 35 | instances: 36 | filenames: 37 | pos: entries.last.offset + entries.last.size 38 | type: filename 39 | size: 15 40 | repeat: expr 41 | repeat-expr: num_files 42 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/game/heroes_of_might_and_magic_bmp.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: heroes_of_might_and_magic_bmp 3 | application: Heroes of Might and Magic 4 | file-extension: bmp 5 | license: CC0-1.0 6 | endian: le 7 | seq: 8 | - id: magic 9 | type: u2 10 | - id: width 11 | type: u2 12 | - id: height 13 | type: u2 14 | - id: data 15 | size: 'width * height' 16 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/game/quake_pak.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: quake_pak 3 | file-extension: pak 4 | application: Quake game engine 5 | license: CC0-1.0 6 | endian: le 7 | doc-ref: 'https://quakewiki.org/wiki/.pak#Format_specification' 8 | seq: 9 | - id: magic 10 | contents: 'PACK' 11 | - id: ofs_index 12 | type: u4 13 | - id: len_index 14 | type: u4 15 | instances: 16 | index: 17 | pos: ofs_index 18 | size: len_index 19 | type: index_struct 20 | types: 21 | index_struct: 22 | seq: 23 | - id: entries 24 | type: index_entry 25 | repeat: eos 26 | index_entry: 27 | seq: 28 | - id: name 29 | type: str 30 | size: 56 31 | encoding: UTF-8 32 | terminator: 0 33 | pad-right: 0 34 | - id: ofs 35 | type: u4 36 | - id: size 37 | type: u4 38 | instances: 39 | body: 40 | pos: ofs 41 | size: size 42 | io: _root._io 43 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/image/pcx_dcx.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: pcx_dcx 3 | file-extension: dcx 4 | xref: 5 | justsolve: DCX 6 | mime: image/x-dcx 7 | pronom: x-fmt/348 8 | wikidata: Q28205890 9 | license: CC0-1.0 10 | endian: le 11 | imports: 12 | - pcx 13 | doc: | 14 | DCX is a simple extension of PCX image format allowing to bundle 15 | many PCX images (typically, pages of a document) in one file. It saw 16 | some limited use in DOS-era fax software, but was largely 17 | superseeded with multi-page TIFFs and PDFs since then. 18 | seq: 19 | - id: magic 20 | contents: [0xb1, 0x68, 0xde, 0x3a] 21 | - id: files 22 | type: pcx_offset 23 | repeat: until 24 | repeat-until: _.ofs_body == 0 25 | types: 26 | pcx_offset: 27 | seq: 28 | - id: ofs_body 29 | type: u4 30 | instances: 31 | body: 32 | pos: ofs_body 33 | type: pcx 34 | if: ofs_body != 0 35 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/image/psx_tim.ksy: -------------------------------------------------------------------------------- 1 | # http://fileformats.archiveteam.org/wiki/TIM_(PlayStation_graphics) 2 | # http://mrclick.zophar.net/TilEd/download/timgfx.txt 3 | # http://www.romhacking.net/documents/31/ 4 | meta: 5 | id: psx_tim 6 | application: Sony PlayStation (PSX) typical image format 7 | file-extension: tim 8 | xref: 9 | justsolve: TIM_(PlayStation_graphics) 10 | wikidata: Q28207389 11 | license: CC0-1.0 12 | endian: le 13 | seq: 14 | - id: magic 15 | contents: [0x10, 0, 0, 0] 16 | - id: flags 17 | type: u4 18 | doc: Encodes bits-per-pixel and whether CLUT is present in a file or not 19 | - id: clut 20 | type: bitmap 21 | if: has_clut 22 | doc: CLUT (Color LookUp Table), one or several palettes for indexed color image, represented as a 23 | - id: img 24 | type: bitmap 25 | types: 26 | bitmap: 27 | seq: 28 | - id: len 29 | type: u4 30 | - id: origin_x 31 | type: u2 32 | - id: origin_y 33 | type: u2 34 | - id: width 35 | type: u2 36 | - id: height 37 | type: u2 38 | - id: body 39 | size: len - 12 # 4 + 4 * 2 40 | instances: 41 | has_clut: 42 | value: flags & 0b1000 != 0 43 | bpp: 44 | value: flags & 0b0011 45 | enums: 46 | bpp_type: 47 | 0: bpp_4 48 | 1: bpp_8 49 | 2: bpp_16 50 | 3: bpp_24 51 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/log/hashcat_restore.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: hashcat_restore 3 | title: Hashcat Restore file 4 | file-extension: restore 5 | license: CC0-1.0 6 | endian: le 7 | doc-ref: https://hashcat.net/wiki/doku.php?id=restore 8 | seq: 9 | - id: version 10 | type: u4 11 | - id: cwd 12 | type: strz 13 | size: 256 14 | encoding: UTF-8 15 | - id: dicts_pos 16 | type: u4 17 | - id: masks_pos 18 | type: u4 19 | - id: padding 20 | size: 4 21 | - id: current_restore_point 22 | type: u8 23 | - id: argc 24 | type: u4 25 | - id: padding2 26 | size: 12 27 | - id: argv 28 | type: strz 29 | encoding: UTF-8 30 | terminator: 0x0A 31 | repeat: expr 32 | repeat-expr: argc 33 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/network/ipv6_packet.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: ipv6_packet 3 | title: IPv6 network packet 4 | license: CC0-1.0 5 | ks-version: 0.8 6 | endian: be 7 | imports: 8 | - /network/protocol_body 9 | seq: 10 | - id: version 11 | type: b4 12 | - id: traffic_class 13 | type: b8 14 | - id: flow_label 15 | type: b20 16 | - id: payload_length 17 | type: u2 18 | - id: next_header_type 19 | type: u1 20 | - id: hop_limit 21 | type: u1 22 | - id: src_ipv6_addr 23 | size: 16 24 | - id: dst_ipv6_addr 25 | size: 16 26 | - id: next_header 27 | type: protocol_body(next_header_type) 28 | - id: rest 29 | size-eos: true 30 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/network/some_ip/some_ip_container.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: some_ip_container 3 | title: AUTOSAR SOME/IP container 4 | license: CC0-1.0 5 | ks-version: 0.9 6 | endian: be 7 | imports: 8 | - /network/some_ip/some_ip 9 | 10 | seq: 11 | - id: some_ip_packages 12 | type: some_ip 13 | repeat: eos 14 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/network/tcp_segment.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: tcp_segment 3 | title: TCP (Transmission Control Protocol) segment 4 | xref: 5 | rfc: 6 | - 793 7 | - 1323 8 | wikidata: Q8803 9 | license: CC0-1.0 10 | endian: be 11 | doc: | 12 | TCP is one of the core Internet protocols on transport layer (AKA 13 | OSI layer 4), providing stateful connections with error checking, 14 | guarantees of delivery, order of segments and avoidance of duplicate 15 | delivery. 16 | seq: 17 | - id: src_port 18 | type: u2 19 | - id: dst_port 20 | type: u2 21 | - id: seq_num 22 | type: u4 23 | - id: ack_num 24 | type: u4 25 | - id: b12 26 | type: u1 27 | - id: b13 28 | type: u1 29 | - id: window_size 30 | type: u2 31 | - id: checksum 32 | type: u2 33 | - id: urgent_pointer 34 | type: u2 35 | - id: body 36 | size-eos: true 37 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/network/udp_datagram.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: udp_datagram 3 | title: UDP (User Datagram Protocol) datagram 4 | xref: 5 | rfc: 768 6 | wikidata: Q11163 7 | license: CC0-1.0 8 | endian: be 9 | doc: | 10 | UDP is a simple stateless transport layer (AKA OSI layer 4) 11 | protocol, one of the core Internet protocols. It provides source and 12 | destination ports, basic checksumming, but provides not guarantees 13 | of delivery, order of packets, or duplicate delivery. 14 | seq: 15 | - id: src_port 16 | type: u2 17 | - id: dst_port 18 | type: u2 19 | - id: length 20 | type: u2 21 | - id: checksum 22 | type: u2 23 | - id: body 24 | size: length - 8 25 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy/windows/windows_systemtime.ksy: -------------------------------------------------------------------------------- 1 | meta: 2 | id: windows_systemtime 3 | endian: le 4 | title: Microsoft Windows SYSTEMTIME structure 5 | license: CC0-1.0 6 | doc: | 7 | Microsoft Windows SYSTEMTIME structure, stores individual components 8 | of date and time as individual fields, up to millisecond precision. 9 | doc-ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724950.aspx 10 | seq: 11 | - id: year 12 | -orig-id: wYear 13 | type: u2 14 | doc: Year 15 | - id: month 16 | -orig-id: wMonth 17 | type: u2 18 | doc: Month (January = 1) 19 | - id: dow 20 | -orig-id: wDayOfWeek 21 | type: u2 22 | doc: Day of week (Sun = 0) 23 | - id: day 24 | -orig-id: wDay 25 | type: u2 26 | doc: Day of month 27 | - id: hour 28 | -orig-id: wHour 29 | type: u2 30 | doc: Hours 31 | - id: min 32 | -orig-id: wMinute 33 | type: u2 34 | doc: Minutes 35 | - id: sec 36 | -orig-id: wSecond 37 | type: u2 38 | doc: Seconds 39 | - id: msec 40 | -orig-id: wMilliseconds 41 | type: u2 42 | doc: Milliseconds 43 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/common/bytes_with_io.py: -------------------------------------------------------------------------------- 1 | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild 2 | 3 | from pkg_resources import parse_version 4 | import kaitaistruct 5 | from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO 6 | import collections 7 | 8 | 9 | if parse_version(kaitaistruct.__version__) < parse_version('0.9'): 10 | raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version__)) 11 | 12 | class BytesWithIo(KaitaiStruct): 13 | """Helper type to work around Kaitai Struct not providing an `_io` member for plain byte arrays. 14 | """ 15 | SEQ_FIELDS = ["data"] 16 | def __init__(self, _io, _parent=None, _root=None): 17 | self._io = _io 18 | self._parent = _parent 19 | self._root = _root if _root else self 20 | self._debug = collections.defaultdict(dict) 21 | 22 | def _read(self): 23 | self._debug['data']['start'] = self._io.pos() 24 | self.data = self._io.read_bytes_full() 25 | self._debug['data']['end'] = self._io.pos() 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/font/bytes_with_io.py: -------------------------------------------------------------------------------- 1 | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild 2 | 3 | from pkg_resources import parse_version 4 | import kaitaistruct 5 | from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO 6 | import collections 7 | 8 | 9 | if parse_version(kaitaistruct.__version__) < parse_version('0.9'): 10 | raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version__)) 11 | 12 | class BytesWithIo(KaitaiStruct): 13 | """Helper type to work around Kaitai Struct not providing an `_io` member for plain byte arrays. 14 | """ 15 | SEQ_FIELDS = ["data"] 16 | def __init__(self, _io, _parent=None, _root=None): 17 | self._io = _io 18 | self._parent = _parent 19 | self._root = _root if _root else self 20 | self._debug = collections.defaultdict(dict) 21 | 22 | def _read(self): 23 | self._debug['data']['start'] = self._io.pos() 24 | self.data = self._io.read_bytes_full() 25 | self._debug['data']['end'] = self._io.pos() 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/macos/bytes_with_io.py: -------------------------------------------------------------------------------- 1 | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild 2 | 3 | from pkg_resources import parse_version 4 | import kaitaistruct 5 | from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO 6 | import collections 7 | 8 | 9 | if parse_version(kaitaistruct.__version__) < parse_version('0.9'): 10 | raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version__)) 11 | 12 | class BytesWithIo(KaitaiStruct): 13 | """Helper type to work around Kaitai Struct not providing an `_io` member for plain byte arrays. 14 | """ 15 | SEQ_FIELDS = ["data"] 16 | def __init__(self, _io, _parent=None, _root=None): 17 | self._io = _io 18 | self._parent = _parent 19 | self._root = _root if _root else self 20 | self._debug = collections.defaultdict(dict) 21 | 22 | def _read(self): 23 | self._debug['data']['start'] = self._io.pos() 24 | self.data = self._io.read_bytes_full() 25 | self._debug['data']['end'] = self._io.pos() 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/KaitaiStruct/ksy_py/macos/resource_compression/bytes_with_io.py: -------------------------------------------------------------------------------- 1 | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild 2 | 3 | from pkg_resources import parse_version 4 | import kaitaistruct 5 | from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO 6 | import collections 7 | 8 | 9 | if parse_version(kaitaistruct.__version__) < parse_version('0.9'): 10 | raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version__)) 11 | 12 | class BytesWithIo(KaitaiStruct): 13 | """Helper type to work around Kaitai Struct not providing an `_io` member for plain byte arrays. 14 | """ 15 | SEQ_FIELDS = ["data"] 16 | def __init__(self, _io, _parent=None, _root=None): 17 | self._io = _io 18 | self._parent = _parent 19 | self._root = _root if _root else self 20 | self._debug = collections.defaultdict(dict) 21 | 22 | def _read(self): 23 | self._debug['data']['start'] = self._io.pos() 24 | self.data = self._io.read_bytes_full() 25 | self._debug['data']['end'] = self._io.pos() 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Metadata/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "Metadata" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Metadata/metadata.h: -------------------------------------------------------------------------------- 1 | #ifndef METADATA_H 2 | #define METADATA_H 3 | 4 | 5 | #include "analyzerinterface.h" 6 | #include "parameterdelegate.h" 7 | 8 | class Metadata : public QObject, AnalyzerInterface 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "hobbits.AnalyzerInterface.Metadata") 12 | Q_INTERFACES(AnalyzerInterface) 13 | 14 | public: 15 | Metadata(); 16 | 17 | AnalyzerInterface* createDefaultAnalyzer() override; 18 | 19 | QString name() override; 20 | QString description() override; 21 | QStringList tags() override; 22 | 23 | QSharedPointer parameterDelegate() override; 24 | 25 | QSharedPointer analyzeBits( 26 | QSharedPointer container, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | private: 31 | QSharedPointer m_delegate; 32 | }; 33 | 34 | #endif // METADATA_H 35 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/Metadata/metadataform.h: -------------------------------------------------------------------------------- 1 | #ifndef METADATAFORM_H 2 | #define METADATAFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class MetadataForm; 10 | } 11 | 12 | class MetadataForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | MetadataForm(QSharedPointer delegate); 18 | ~MetadataForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | void previewBitsUiImpl(QSharedPointer container) override; 27 | 28 | Ui::MetadataForm *ui; 29 | QSharedPointer m_paramHelper; 30 | }; 31 | 32 | #endif // METADATAFORM_H 33 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/WidthFramer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | pluginInDir("${pluginType}" "WidthFramer" "${CMAKE_CURRENT_SOURCE_DIR}") 3 | 4 | if (BUILDING_WITH_CONAN) 5 | target_link_libraries("hobbits-plugin-analyzers-WidthFramer" PRIVATE CONAN_PKG::pffft) 6 | else() 7 | target_link_libraries("hobbits-plugin-analyzers-WidthFramer" PRIVATE PFFFT::PFFFT) 8 | endif() 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/WidthFramer/peakselector.h: -------------------------------------------------------------------------------- 1 | #ifndef PEAKSELECTOR_H 2 | #define PEAKSELECTOR_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class PeakSelector : public QWidget 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | explicit PeakSelector(QWidget *parent = nullptr); 14 | 15 | QScrollBar* getHScroll(); 16 | QSlider* getZoomSlider(); 17 | 18 | protected: 19 | void paintEvent(QPaintEvent *event) override; 20 | 21 | void mouseMoveEvent(QMouseEvent *event) override; 22 | void mousePressEvent(QMouseEvent *event) override; 23 | void mouseReleaseEvent(QMouseEvent *event) override; 24 | void leaveEvent(QEvent * event) override; 25 | 26 | public slots: 27 | void setData(QVector data); 28 | QPointF getPeak(); 29 | 30 | void adjustScroll(); 31 | 32 | signals: 33 | void peakSelected(QPointF); 34 | 35 | private: 36 | QVector m_data; 37 | double m_dataYMax; 38 | double m_dataYMin; 39 | QScrollBar *m_hScroll; 40 | QSlider *m_zoomSlider; 41 | 42 | int m_startDrag; 43 | int m_endDrag; 44 | QPoint m_hover; 45 | 46 | bool m_disabled; 47 | bool m_hasNan; 48 | }; 49 | 50 | #endif // PEAKSELECTOR_H 51 | -------------------------------------------------------------------------------- /src/hobbits-plugins/analyzers/WidthFramer/widthframer.h: -------------------------------------------------------------------------------- 1 | #ifndef WIDTHFRAMER_H 2 | #define WIDTHFRAMER_H 3 | 4 | #include "analyzerinterface.h" 5 | #include "parameterdelegate.h" 6 | 7 | class WidthFramer : public QObject, AnalyzerInterface 8 | { 9 | Q_OBJECT 10 | Q_PLUGIN_METADATA(IID "hobbits.AnalyzerInterface.WidthFramer") 11 | Q_INTERFACES(AnalyzerInterface) 12 | 13 | public: 14 | WidthFramer(); 15 | 16 | AnalyzerInterface* createDefaultAnalyzer() override; 17 | 18 | QString name() override; 19 | QString description() override; 20 | QStringList tags() override; 21 | 22 | QSharedPointer parameterDelegate() override; 23 | 24 | QSharedPointer analyzeBits( 25 | QSharedPointer container, 26 | const Parameters ¶meters, 27 | QSharedPointer progress) override; 28 | 29 | private: 30 | QSharedPointer m_delegate; 31 | }; 32 | 33 | #endif // WIDTHFRAMER_H 34 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Ascii/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "AsciiView" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Ascii/ascii.h: -------------------------------------------------------------------------------- 1 | #ifndef ASCII_H 2 | #define ASCII_H 3 | 4 | #include "displayinterface.h" 5 | 6 | class Ascii : public QObject, DisplayInterface 7 | { 8 | Q_OBJECT 9 | Q_PLUGIN_METADATA(IID "hobbits.DisplayInterface.Ascii") 10 | Q_INTERFACES(DisplayInterface) 11 | 12 | public: 13 | Ascii(); 14 | 15 | DisplayInterface* createDefaultDisplay() override; 16 | 17 | QString name() override; 18 | QString description() override; 19 | QStringList tags() override; 20 | 21 | QSharedPointer renderConfig() override; 22 | void setDisplayHandle(QSharedPointer displayHandle) override; 23 | QSharedPointer parameterDelegate() override; 24 | 25 | QSharedPointer renderDisplay( 26 | QSize viewportSize, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | QSharedPointer renderOverlay( 31 | QSize viewportSize, 32 | const Parameters ¶meters) override; 33 | 34 | private: 35 | QPoint headerOffset(const Parameters ¶meters); 36 | QSharedPointer m_delegate; 37 | QSharedPointer m_renderConfig; 38 | QSharedPointer m_handle; 39 | Parameters m_lastParams; 40 | }; 41 | 42 | #endif // ASCII_H 43 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Ascii/asciidecode.h: -------------------------------------------------------------------------------- 1 | #ifndef ASCIIDECODE_H 2 | #define ASCIIDECODE_H 3 | 4 | #include "frame.h" 5 | 6 | QString decodeAsciiBits(const Frame& f, qint64 &bitOffset) { 7 | QString frameString = ""; 8 | if (bitOffset + 7 >= f.size()) { 9 | // partial char 10 | frameString += '.'; 11 | } 12 | else { 13 | unsigned char byte = 0; 14 | for (int bit = 0; bit < 8; bit++) { 15 | byte <<= 1; 16 | if (f.at(bitOffset + bit)) { 17 | byte |= 0x01; 18 | } 19 | } 20 | if (isprint(byte)) { 21 | frameString += byte; 22 | } 23 | else { 24 | frameString += '.'; 25 | } 26 | } 27 | bitOffset += 8; 28 | return frameString; 29 | } 30 | 31 | #endif // ASCIIDECODE_H 32 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Ascii/asciiform.h: -------------------------------------------------------------------------------- 1 | #ifndef ASCIIFORM_H 2 | #define ASCIIFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class AsciiForm; 10 | } 11 | 12 | class AsciiForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | AsciiForm(QSharedPointer delegate); 18 | ~AsciiForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | Ui::AsciiForm *ui; 27 | QSharedPointer m_paramHelper; 28 | }; 29 | 30 | #endif // ASCIIFORM_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Binary/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "BinaryView" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Binary/binarycontrols.cpp: -------------------------------------------------------------------------------- 1 | #include "binarycontrols.h" 2 | #include "ui_binarycontrols.h" 3 | 4 | 5 | BinaryControls::BinaryControls(QSharedPointer delegate) : 6 | ui(new Ui::BinaryControls()), 7 | m_stateHelper(new ParameterHelper(delegate)) 8 | { 9 | ui->setupUi(this); 10 | 11 | connect(ui->sb_columnGrouping, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 12 | connect(ui->hs_fontSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 13 | connect(ui->cb_showHeaders, SIGNAL(stateChanged(int)), this, SIGNAL(changed())); 14 | 15 | m_stateHelper->addSliderIntParameter("font_size", ui->hs_fontSize); 16 | m_stateHelper->addCheckBoxBoolParameter("show_headers", ui->cb_showHeaders); 17 | m_stateHelper->addSpinBoxIntParameter("column_grouping", ui->sb_columnGrouping); 18 | } 19 | 20 | QString BinaryControls::title() 21 | { 22 | return "Configure Binary Display"; 23 | } 24 | 25 | bool BinaryControls::setParameters(const Parameters ¶meters) 26 | { 27 | return m_stateHelper->applyParametersToUi(parameters); 28 | } 29 | 30 | Parameters BinaryControls::parameters() 31 | { 32 | return m_stateHelper->getParametersFromUi(); 33 | } 34 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Binary/binarycontrols.h: -------------------------------------------------------------------------------- 1 | #ifndef BINARYCONTROLS_H 2 | #define BINARYCONTROLS_H 3 | 4 | #include "parameterdelegate.h" 5 | #include "abstractparametereditor.h" 6 | #include "parameterhelper.h" 7 | 8 | namespace Ui 9 | { 10 | class BinaryControls; 11 | } 12 | 13 | class BinaryControls : public AbstractParameterEditor 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | BinaryControls(QSharedPointer delegate); 19 | 20 | QString title() override; 21 | 22 | virtual bool setParameters(const Parameters ¶meters) override; 23 | virtual Parameters parameters() override; 24 | 25 | private: 26 | Ui::BinaryControls *ui; 27 | QSharedPointer m_stateHelper; 28 | }; 29 | 30 | #endif // BINARYCONTROLS_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/BitRaster/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "BitRaster" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/BitRaster/bitrastercontrols.cpp: -------------------------------------------------------------------------------- 1 | #include "bitrastercontrols.h" 2 | #include "ui_bitrastercontrols.h" 3 | 4 | 5 | BitRasterControls::BitRasterControls(QSharedPointer delegate) : 6 | ui(new Ui::BitRasterControls()), 7 | m_stateHelper(new ParameterHelper(delegate)) 8 | { 9 | ui->setupUi(this); 10 | 11 | connect(ui->hs_scale, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 12 | connect(ui->cb_showHeaders, SIGNAL(stateChanged(int)), this, SIGNAL(changed())); 13 | 14 | m_stateHelper->addSliderIntParameter("scale", ui->hs_scale); 15 | m_stateHelper->addCheckBoxBoolParameter("show_headers", ui->cb_showHeaders); 16 | } 17 | 18 | QString BitRasterControls::title() 19 | { 20 | return "Configure Bit Raster"; 21 | } 22 | 23 | bool BitRasterControls::setParameters(const Parameters ¶meters) 24 | { 25 | return m_stateHelper->applyParametersToUi(parameters); 26 | } 27 | 28 | Parameters BitRasterControls::parameters() 29 | { 30 | return m_stateHelper->getParametersFromUi(); 31 | } 32 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/BitRaster/bitrastercontrols.h: -------------------------------------------------------------------------------- 1 | #ifndef BITRASTERCONTROLS_H 2 | #define BITRASTERCONTROLS_H 3 | 4 | #include 5 | #include "parameterdelegate.h" 6 | #include "abstractparametereditor.h" 7 | #include "parameterhelper.h" 8 | 9 | namespace Ui 10 | { 11 | class BitRasterControls; 12 | } 13 | 14 | class BitRasterControls : public AbstractParameterEditor 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | BitRasterControls(QSharedPointer delegate); 20 | 21 | QString title() override; 22 | 23 | virtual bool setParameters(const Parameters ¶meters) override; 24 | virtual Parameters parameters() override; 25 | 26 | private: 27 | Ui::BitRasterControls *ui; 28 | QSharedPointer m_stateHelper; 29 | }; 30 | 31 | #endif // BITRASTERCONTROLS_H 32 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/ByteRaster/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "ByteRaster" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/ByteRaster/byterastercontrols.cpp: -------------------------------------------------------------------------------- 1 | #include "byterastercontrols.h" 2 | #include "ui_byterastercontrols.h" 3 | 4 | 5 | ByteRasterControls::ByteRasterControls(QSharedPointer delegate) : 6 | ui(new Ui::ByteRasterControls()), 7 | m_stateHelper(new ParameterHelper(delegate)) 8 | { 9 | ui->setupUi(this); 10 | 11 | connect(ui->hs_scale, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 12 | connect(ui->cb_showHeaders, SIGNAL(stateChanged(int)), this, SIGNAL(changed())); 13 | 14 | m_stateHelper->addSliderIntParameter("scale", ui->hs_scale); 15 | m_stateHelper->addCheckBoxBoolParameter("show_headers", ui->cb_showHeaders); 16 | } 17 | 18 | QString ByteRasterControls::title() 19 | { 20 | return "Configure Byte Raster"; 21 | } 22 | 23 | bool ByteRasterControls::setParameters(const Parameters ¶meters) 24 | { 25 | return m_stateHelper->applyParametersToUi(parameters); 26 | } 27 | 28 | Parameters ByteRasterControls::parameters() 29 | { 30 | return m_stateHelper->getParametersFromUi(); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/ByteRaster/byterastercontrols.h: -------------------------------------------------------------------------------- 1 | #ifndef BYTERASTERCONTROLS_H 2 | #define BYTERASTERCONTROLS_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class ByteRasterControls; 10 | } 11 | 12 | class ByteRasterControls : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | ByteRasterControls(QSharedPointer delegate); 18 | 19 | QString title() override; 20 | 21 | bool setParameters(const Parameters ¶meters) override; 22 | Parameters parameters() override; 23 | 24 | private: 25 | Ui::ByteRasterControls *ui; 26 | QSharedPointer m_stateHelper; 27 | }; 28 | 29 | #endif // BYTERASTERCONTROLS_H 30 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DigraphPlot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "DigraphPlot" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DigraphPlot/digraphplot.h: -------------------------------------------------------------------------------- 1 | #ifndef DIGRAPHPLOT_H 2 | #define DIGRAPHPLOT_H 3 | 4 | #include "displayinterface.h" 5 | 6 | class DigraphPlot : public QObject, DisplayInterface 7 | { 8 | Q_OBJECT 9 | Q_PLUGIN_METADATA(IID "hobbits.DisplayInterface.DigraphPlot") 10 | Q_INTERFACES(DisplayInterface) 11 | 12 | public: 13 | DigraphPlot(); 14 | 15 | DisplayInterface* createDefaultDisplay() override; 16 | 17 | QString name() override; 18 | QString description() override; 19 | QStringList tags() override; 20 | 21 | QSharedPointer renderConfig() override; 22 | void setDisplayHandle(QSharedPointer displayHandle) override; 23 | QSharedPointer parameterDelegate() override; 24 | 25 | QSharedPointer renderDisplay( 26 | QSize viewportSize, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | QSharedPointer renderOverlay( 31 | QSize viewportSize, 32 | const Parameters ¶meters) override; 33 | 34 | private: 35 | QSharedPointer m_delegate; 36 | QSharedPointer m_renderConfig; 37 | QSharedPointer m_handle; 38 | }; 39 | 40 | #endif // DIGRAPHPLOT_H 41 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DigraphPlot/digraphplotform.cpp: -------------------------------------------------------------------------------- 1 | #include "digraphplotform.h" 2 | #include "ui_digraphplotform.h" 3 | 4 | DigraphPlotForm::DigraphPlotForm(QSharedPointer delegate): 5 | ui(new Ui::DigraphPlotForm()), 6 | m_paramHelper(new ParameterHelper(delegate)) 7 | { 8 | ui->setupUi(this); 9 | 10 | connect(ui->sb_wordSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 11 | connect(ui->sb_windowSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 12 | connect(ui->hs_scale, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 13 | 14 | m_paramHelper->addSliderIntParameter("scale", ui->hs_scale); 15 | m_paramHelper->addSpinBoxIntParameter("window_size", ui->sb_windowSize); 16 | m_paramHelper->addSpinBoxIntParameter("word_size", ui->sb_wordSize); 17 | } 18 | 19 | DigraphPlotForm::~DigraphPlotForm() 20 | { 21 | delete ui; 22 | } 23 | 24 | QString DigraphPlotForm::title() 25 | { 26 | return "Configure Digraph Plot"; 27 | } 28 | 29 | Parameters DigraphPlotForm::parameters() 30 | { 31 | return m_paramHelper->getParametersFromUi(); 32 | } 33 | 34 | bool DigraphPlotForm::setParameters(const Parameters ¶meters) 35 | { 36 | return m_paramHelper->applyParametersToUi(parameters); 37 | } 38 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DigraphPlot/digraphplotform.h: -------------------------------------------------------------------------------- 1 | #ifndef DIGRAPHPLOTFORM_H 2 | #define DIGRAPHPLOTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class DigraphPlotForm; 10 | } 11 | 12 | class DigraphPlotForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | DigraphPlotForm(QSharedPointer delegate); 18 | ~DigraphPlotForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | Ui::DigraphPlotForm *ui; 27 | QSharedPointer m_paramHelper; 28 | }; 29 | 30 | #endif // DIGRAPHPLOTFORM_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DotPlot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "DotPlot" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DotPlot/dotplot.h: -------------------------------------------------------------------------------- 1 | #ifndef DOTPLOT_H 2 | #define DOTPLOT_H 3 | 4 | #include "displayinterface.h" 5 | 6 | class DotPlot : public QObject, DisplayInterface 7 | { 8 | Q_OBJECT 9 | Q_PLUGIN_METADATA(IID "hobbits.DisplayInterface.DotPlot") 10 | Q_INTERFACES(DisplayInterface) 11 | 12 | public: 13 | DotPlot(); 14 | 15 | DisplayInterface* createDefaultDisplay() override; 16 | 17 | QString name() override; 18 | QString description() override; 19 | QStringList tags() override; 20 | 21 | QSharedPointer renderConfig() override; 22 | void setDisplayHandle(QSharedPointer displayHandle) override; 23 | QSharedPointer parameterDelegate() override; 24 | 25 | QSharedPointer renderDisplay( 26 | QSize viewportSize, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | QSharedPointer renderOverlay( 31 | QSize viewportSize, 32 | const Parameters ¶meters) override; 33 | 34 | private: 35 | QSharedPointer m_delegate; 36 | QSharedPointer m_renderConfig; 37 | QSharedPointer m_handle; 38 | }; 39 | 40 | #endif // DOTPLOT_H 41 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DotPlot/dotplotform.cpp: -------------------------------------------------------------------------------- 1 | #include "dotplotform.h" 2 | #include "ui_dotplotform.h" 3 | 4 | DotPlotForm::DotPlotForm(QSharedPointer delegate): 5 | ui(new Ui::DotPlotForm()), 6 | m_paramHelper(new ParameterHelper(delegate)) 7 | { 8 | ui->setupUi(this); 9 | 10 | connect(ui->sb_wordSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 11 | connect(ui->sb_windowSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 12 | connect(ui->hs_scale, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 13 | 14 | m_paramHelper->addSliderIntParameter("scale", ui->hs_scale); 15 | m_paramHelper->addSpinBoxIntParameter("window_size", ui->sb_windowSize); 16 | m_paramHelper->addSpinBoxIntParameter("word_size", ui->sb_wordSize); 17 | } 18 | 19 | DotPlotForm::~DotPlotForm() 20 | { 21 | delete ui; 22 | } 23 | 24 | QString DotPlotForm::title() 25 | { 26 | return "Configure Dot Plot"; 27 | } 28 | 29 | Parameters DotPlotForm::parameters() 30 | { 31 | return m_paramHelper->getParametersFromUi(); 32 | } 33 | 34 | bool DotPlotForm::setParameters(const Parameters ¶meters) 35 | { 36 | return m_paramHelper->applyParametersToUi(parameters); 37 | } 38 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/DotPlot/dotplotform.h: -------------------------------------------------------------------------------- 1 | #ifndef DOTPLOTFORM_H 2 | #define DOTPLOTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class DotPlotForm; 10 | } 11 | 12 | class DotPlotForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | DotPlotForm(QSharedPointer delegate); 18 | ~DotPlotForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | Ui::DotPlotForm *ui; 27 | QSharedPointer m_paramHelper; 28 | }; 29 | 30 | #endif // DOTPLOTFORM_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/FrequencyPlot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "FrequencyPlot" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/FrequencyPlot/frequencyplotform.cpp: -------------------------------------------------------------------------------- 1 | #include "frequencyplotform.h" 2 | #include "ui_frequencyplotform.h" 3 | 4 | FrequencyPlotForm::FrequencyPlotForm(QSharedPointer delegate): 5 | ui(new Ui::FrequencyPlotForm()), 6 | m_paramHelper(new ParameterHelper(delegate)) 7 | { 8 | ui->setupUi(this); 9 | 10 | connect(ui->sb_wordSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 11 | connect(ui->sb_windowSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 12 | connect(ui->hs_scale, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 13 | 14 | m_paramHelper->addSliderIntParameter("scale", ui->hs_scale); 15 | m_paramHelper->addSpinBoxIntParameter("window_size", ui->sb_windowSize); 16 | m_paramHelper->addSpinBoxIntParameter("word_size", ui->sb_wordSize); 17 | } 18 | 19 | FrequencyPlotForm::~FrequencyPlotForm() 20 | { 21 | delete ui; 22 | } 23 | 24 | QString FrequencyPlotForm::title() 25 | { 26 | return "Configure Frequency Plot"; 27 | } 28 | 29 | Parameters FrequencyPlotForm::parameters() 30 | { 31 | return m_paramHelper->getParametersFromUi(); 32 | } 33 | 34 | bool FrequencyPlotForm::setParameters(const Parameters ¶meters) 35 | { 36 | return m_paramHelper->applyParametersToUi(parameters); 37 | } 38 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/FrequencyPlot/frequencyplotform.h: -------------------------------------------------------------------------------- 1 | #ifndef FREQUENCYPLOTFORM_H 2 | #define FREQUENCYPLOTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class FrequencyPlotForm; 10 | } 11 | 12 | class FrequencyPlotForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | FrequencyPlotForm(QSharedPointer delegate); 18 | ~FrequencyPlotForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | Ui::FrequencyPlotForm *ui; 27 | QSharedPointer m_paramHelper; 28 | }; 29 | 30 | #endif // FREQUENCYPLOTFORM_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Hex/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "HexView" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Hex/hex.h: -------------------------------------------------------------------------------- 1 | #ifndef HEX_H 2 | #define HEX_H 3 | 4 | #include "displayinterface.h" 5 | 6 | class Hex : public QObject, DisplayInterface 7 | { 8 | Q_OBJECT 9 | Q_PLUGIN_METADATA(IID "hobbits.DisplayInterface.Hex") 10 | Q_INTERFACES(DisplayInterface) 11 | 12 | public: 13 | Hex(); 14 | 15 | DisplayInterface* createDefaultDisplay() override; 16 | 17 | QString name() override; 18 | QString description() override; 19 | QStringList tags() override; 20 | 21 | QSharedPointer renderConfig() override; 22 | void setDisplayHandle(QSharedPointer displayHandle) override; 23 | QSharedPointer parameterDelegate() override; 24 | 25 | QSharedPointer renderDisplay( 26 | QSize viewportSize, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | QSharedPointer renderOverlay( 31 | QSize viewportSize, 32 | const Parameters ¶meters) override; 33 | 34 | private: 35 | QPoint headerOffset(const Parameters ¶meters); 36 | QSharedPointer m_delegate; 37 | QSharedPointer m_renderConfig; 38 | QSharedPointer m_handle; 39 | Parameters m_lastParams; 40 | }; 41 | 42 | #endif // HEX_H 43 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Hex/hexform.cpp: -------------------------------------------------------------------------------- 1 | #include "hexform.h" 2 | #include "ui_hexform.h" 3 | 4 | HexForm::HexForm(QSharedPointer delegate): 5 | ui(new Ui::HexForm()), 6 | m_paramHelper(new ParameterHelper(delegate)) 7 | { 8 | ui->setupUi(this); 9 | 10 | connect(ui->sb_columnGrouping, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 11 | connect(ui->hs_fontSize, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); 12 | connect(ui->cb_showHeaders, SIGNAL(stateChanged(int)), this, SIGNAL(changed())); 13 | 14 | m_paramHelper->addSliderIntParameter("font_size", ui->hs_fontSize); 15 | m_paramHelper->addCheckBoxBoolParameter("show_headers", ui->cb_showHeaders); 16 | m_paramHelper->addSpinBoxIntParameter("column_grouping", ui->sb_columnGrouping); 17 | } 18 | 19 | HexForm::~HexForm() 20 | { 21 | delete ui; 22 | } 23 | 24 | QString HexForm::title() 25 | { 26 | return "Configure Hex Display"; 27 | } 28 | 29 | Parameters HexForm::parameters() 30 | { 31 | return m_paramHelper->getParametersFromUi(); 32 | } 33 | 34 | bool HexForm::setParameters(const Parameters ¶meters) 35 | { 36 | return m_paramHelper->applyParametersToUi(parameters); 37 | } 38 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Hex/hexform.h: -------------------------------------------------------------------------------- 1 | #ifndef HEXFORM_H 2 | #define HEXFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class HexForm; 10 | } 11 | 12 | class HexForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | HexForm(QSharedPointer delegate); 18 | ~HexForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | Ui::HexForm *ui; 27 | QSharedPointer m_paramHelper; 28 | }; 29 | 30 | #endif // HEXFORM_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/HilbertPlot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "HilbertPlot" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/HilbertPlot/hilbertplotform.cpp: -------------------------------------------------------------------------------- 1 | #include "hilbertplotform.h" 2 | #include "ui_hilbertplotform.h" 3 | 4 | HilbertPlotForm::HilbertPlotForm(QSharedPointer delegate): 5 | ui(new Ui::HilbertPlotForm()), 6 | m_paramHelper(new ParameterHelper(delegate)) 7 | { 8 | ui->setupUi(this); 9 | } 10 | 11 | HilbertPlotForm::~HilbertPlotForm() 12 | { 13 | delete ui; 14 | } 15 | 16 | QString HilbertPlotForm::title() 17 | { 18 | return "Configure Hilbert Plot"; 19 | } 20 | 21 | Parameters HilbertPlotForm::parameters() 22 | { 23 | return m_paramHelper->getParametersFromUi(); 24 | } 25 | 26 | bool HilbertPlotForm::setParameters(const Parameters ¶meters) 27 | { 28 | return m_paramHelper->applyParametersToUi(parameters); 29 | } 30 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/HilbertPlot/hilbertplotform.h: -------------------------------------------------------------------------------- 1 | #ifndef HILBERTPLOTFORM_H 2 | #define HILBERTPLOTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class HilbertPlotForm; 10 | } 11 | 12 | class HilbertPlotForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | HilbertPlotForm(QSharedPointer delegate); 18 | ~HilbertPlotForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | 25 | private: 26 | Ui::HilbertPlotForm *ui; 27 | QSharedPointer m_paramHelper; 28 | }; 29 | 30 | #endif // HILBERTPLOTFORM_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/HilbertPlot/hilbertplotform.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | HilbertPlotForm 4 | 5 | 6 | 7 | 0 8 | 0 9 | 212 10 | 16 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Spectrogram/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | pluginInDir("${pluginType}" "Spectrogram" "${CMAKE_CURRENT_SOURCE_DIR}") 3 | 4 | 5 | if (BUILDING_WITH_CONAN) 6 | target_link_libraries("hobbits-plugin-displays-Spectrogram" PRIVATE CONAN_PKG::pffft) 7 | else() 8 | target_link_libraries("hobbits-plugin-displays-Spectrogram" PRIVATE PFFFT::PFFFT) 9 | endif() 10 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/Spectrogram/spectrogramcontrols.h: -------------------------------------------------------------------------------- 1 | #ifndef SPECTROGRAMCONTROLS_H 2 | #define SPECTROGRAMCONTROLS_H 3 | 4 | #include 5 | #include "parameterdelegate.h" 6 | #include "abstractparametereditor.h" 7 | #include "parameterhelper.h" 8 | 9 | namespace Ui 10 | { 11 | class SpectrogramControls; 12 | } 13 | 14 | class SpectrogramControls : public AbstractParameterEditor 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | enum DataType { 20 | Real = 1, 21 | RealComplexInterleaved = 2 22 | }; 23 | 24 | SpectrogramControls(QSharedPointer delegate); 25 | 26 | QString title() override; 27 | 28 | virtual bool setParameters(const Parameters ¶meters) override; 29 | virtual Parameters parameters() override; 30 | 31 | signals: 32 | 33 | private slots: 34 | 35 | private: 36 | void previewBitsUiImpl(QSharedPointer container) override; 37 | Ui::SpectrogramControls *ui; 38 | QSharedPointer m_paramHelper; 39 | }; 40 | 41 | #endif // SPECTROGRAMCONTROLS_H 42 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/SymbolRaster/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "SymbolRaster" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/SymbolRaster/colordialogdelegate.h: -------------------------------------------------------------------------------- 1 | #ifndef COLORDIALOGDELEGATE_H 2 | #define COLORDIALOGDELEGATE_H 3 | 4 | #include 5 | 6 | class ColorDialogDelegate : public QStyledItemDelegate 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | using QStyledItemDelegate::QStyledItemDelegate; 12 | 13 | void paint( 14 | QPainter *painter, 15 | const QStyleOptionViewItem &option, 16 | const QModelIndex &index) const override; 17 | QSize sizeHint( 18 | const QStyleOptionViewItem &option, 19 | const QModelIndex &index) const override; 20 | QWidget* createEditor( 21 | QWidget *parent, 22 | const QStyleOptionViewItem &option, 23 | const QModelIndex &index) const override; 24 | void setEditorData(QWidget *editor, const QModelIndex &index) const override; 25 | void setModelData( 26 | QWidget *editor, 27 | QAbstractItemModel *model, 28 | const QModelIndex &index) const override; 29 | 30 | private slots: 31 | }; 32 | 33 | #endif // COLORDIALOGDELEGATE_H 34 | -------------------------------------------------------------------------------- /src/hobbits-plugins/displays/SymbolRaster/symbolrastercontrols.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLRASTERCONTROLS_H 2 | #define SYMBOLRASTERCONTROLS_H 3 | 4 | #include "colormapmodel.h" 5 | #include "abstractparametereditor.h" 6 | #include "parameterhelper.h" 7 | 8 | namespace Ui 9 | { 10 | class SymbolRasterControls; 11 | } 12 | 13 | class SymbolRasterControls : public AbstractParameterEditor 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | SymbolRasterControls(QSharedPointer delegate); 19 | 20 | public slots: 21 | QString title() override; 22 | 23 | bool setParameters(const Parameters ¶meters) override; 24 | Parameters parameters() override; 25 | 26 | private: 27 | Ui::SymbolRasterControls *ui; 28 | ColorMapModel *m_colorMapModel; 29 | QSharedPointer m_stateHelper; 30 | }; 31 | 32 | #endif // SYMBOLRASTERCONTROLS_H 33 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/BitContainerData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "BitContainerData" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/DisplayPrint/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "DisplayPrint" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/DisplayPrint/displayprintexportform.h: -------------------------------------------------------------------------------- 1 | #ifndef DISPLAYPRINTEXPORTFORM_H 2 | #define DISPLAYPRINTEXPORTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | #include "hobbitspluginmanager.h" 7 | 8 | namespace Ui 9 | { 10 | class DisplayPrintExportForm; 11 | } 12 | 13 | class DisplayPrintExportForm : public AbstractParameterEditor 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | DisplayPrintExportForm(QSharedPointer delegate); 19 | ~DisplayPrintExportForm() override; 20 | 21 | QString title() override; 22 | 23 | bool setParameters(const Parameters ¶meters) override; 24 | Parameters parameters() override; 25 | 26 | static QSharedPointer loadUpPluginManager(); 27 | 28 | private slots: 29 | void on_tb_selectFile_clicked(); 30 | void displaySelected(); 31 | 32 | private: 33 | Ui::DisplayPrintExportForm *ui; 34 | QSharedPointer m_paramHelper; 35 | QSharedPointer m_pluginManager; 36 | AbstractParameterEditor* m_displayEditor; 37 | }; 38 | 39 | #endif // DISPLAYPRINTEXPORTFORM_H 40 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/FileData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "FileData" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/HexString/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "HexString" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/HexString/hexstringimportform.h: -------------------------------------------------------------------------------- 1 | #ifndef HEXSTRINGIMPORTER_H 2 | #define HEXSTRINGIMPORTER_H 3 | 4 | #include "importresult.h" 5 | #include "abstractparametereditor.h" 6 | 7 | namespace Ui 8 | { 9 | class HexStringImportForm; 10 | } 11 | 12 | class HexStringImportForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit HexStringImportForm(); 18 | ~HexStringImportForm() override; 19 | 20 | QString title() override; 21 | 22 | bool setParameters(const Parameters ¶meters) override; 23 | Parameters parameters() override; 24 | bool isStandaloneDialog() override; 25 | 26 | static QSharedPointer importFromFile(QString fileName); 27 | static QSharedPointer importFromHexString(QString hexString, int repeats); 28 | 29 | private slots: 30 | void on_te_hexString_textChanged(); 31 | void on_pb_selectFile_pressed(); 32 | void on_pb_submitInput_pressed(); 33 | void on_cb_repeat_toggled(bool checked); 34 | 35 | private: 36 | Ui::HexStringImportForm *ui; 37 | QString m_fileName; 38 | }; 39 | 40 | #endif // HEXSTRINGIMPORTER_H 41 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/HttpData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "HttpData" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | 3 | if (NOT BUILDING_WITH_CONAN) 4 | target_link_libraries("hobbits-plugin-importerexporters-HttpData" PRIVATE Qt::Network) 5 | endif() 6 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/HttpData/httpexportform.h: -------------------------------------------------------------------------------- 1 | #ifndef HTTPEXPORTFORM_H 2 | #define HTTPEXPORTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include 6 | #include 7 | #include "parameterdelegate.h" 8 | #include "parameterhelper.h" 9 | #include "exportresult.h" 10 | 11 | namespace Ui 12 | { 13 | class HttpTransceiver; 14 | } 15 | 16 | class HttpExportForm : public AbstractParameterEditor 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit HttpExportForm(QSharedPointer delegate); 22 | ~HttpExportForm() override; 23 | 24 | QString title() override; 25 | bool setParameters(const Parameters ¶meters) override; 26 | Parameters parameters() override; 27 | bool isStandaloneDialog() override; 28 | 29 | static QSharedPointer exportData(QByteArray data, const Parameters ¶meters, QSharedPointer progress); 30 | 31 | private slots: 32 | void on_pb_send_clicked(); 33 | 34 | private: 35 | Ui::HttpTransceiver *ui; 36 | QSharedPointer m_paramHelper; 37 | }; 38 | 39 | #endif // HTTPEXPORTFORM_H 40 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/HttpData/httpimportform.h: -------------------------------------------------------------------------------- 1 | #ifndef HTTPIMPORTFORM_H 2 | #define HTTPIMPORTFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include 6 | #include 7 | #include 8 | #include "parameterdelegate.h" 9 | #include "parameterhelper.h" 10 | #include "importresult.h" 11 | 12 | namespace Ui 13 | { 14 | class HttpTransceiver; 15 | } 16 | 17 | class HttpImportForm : public AbstractParameterEditor 18 | { 19 | Q_OBJECT 20 | 21 | public: 22 | explicit HttpImportForm(QSharedPointer delegate); 23 | ~HttpImportForm() override; 24 | 25 | QString title() override; 26 | bool setParameters(const Parameters ¶meters) override; 27 | Parameters parameters() override; 28 | bool isStandaloneDialog() override; 29 | 30 | static QSharedPointer importData(const Parameters ¶meters, QSharedPointer progress); 31 | 32 | private slots: 33 | void on_pb_send_clicked(); 34 | 35 | private: 36 | Ui::HttpTransceiver *ui; 37 | QSharedPointer m_paramHelper; 38 | }; 39 | 40 | #endif // HTTPIMPORTFORM_H 41 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/Lfsr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "PrbsGenerator" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/Lfsr/lfsrform.h: -------------------------------------------------------------------------------- 1 | #ifndef PRBSGENERATORFORM_H 2 | #define PRBSGENERATORFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class LfsrForm; 10 | } 11 | 12 | class LfsrForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | LfsrForm(QSharedPointer delegate); 18 | ~LfsrForm() override; 19 | 20 | QString title() override; 21 | 22 | virtual bool setParameters(const Parameters ¶meters) override; 23 | virtual Parameters parameters() override; 24 | 25 | public slots: 26 | void updateEndState(QString lfsr); 27 | void showHelp(); 28 | 29 | private: 30 | Ui::LfsrForm *ui; 31 | QSharedPointer m_delegate; 32 | QSharedPointer m_stateHelper; 33 | }; 34 | 35 | #endif // PRBSGENERATORFORM_H 36 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/PacketCapture/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | if (NOT WIN32) 3 | pluginInDir("${pluginType}" "PacketCapture" "${CMAKE_CURRENT_SOURCE_DIR}") 4 | 5 | if (BUILDING_WITH_CONAN) 6 | target_link_libraries("hobbits-plugin-importerexporters-PacketCapture" PRIVATE CONAN_PKG::libpcap) 7 | else() 8 | target_link_libraries("hobbits-plugin-importerexporters-PacketCapture" PRIVATE ${PCAP_LIBRARY} Qt::Network) 9 | endif() 10 | 11 | endif() 12 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/PacketCapture/packetcaptureform.h: -------------------------------------------------------------------------------- 1 | #ifndef PACKETCAPTUREFORM_H 2 | #define PACKETCAPTUREFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterdelegate.h" 6 | #include "parameterhelper.h" 7 | #include 8 | 9 | namespace Ui 10 | { 11 | class PacketCaptureForm; 12 | } 13 | 14 | class PacketCaptureForm: public AbstractParameterEditor 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit PacketCaptureForm(QSharedPointer delegate); 20 | ~PacketCaptureForm() override; 21 | 22 | QString title() override; 23 | bool setParameters(const Parameters ¶meters) override; 24 | Parameters parameters() override; 25 | bool isStandaloneDialog() override; 26 | 27 | private slots: 28 | void on_pb_beginCapture_clicked(); 29 | void populateDeviceBox(); 30 | 31 | private: 32 | Ui::PacketCaptureForm *ui; 33 | QSharedPointer m_paramHelper; 34 | }; 35 | 36 | #endif // PACKETCAPTUREFORM_H 37 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/TcpData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "TcpData" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | 3 | if (NOT BUILDING_WITH_CONAN) 4 | target_link_libraries("hobbits-plugin-importerexporters-TcpData" PRIVATE Qt::Network) 5 | endif() 6 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/TcpData/tcpreceiver.h: -------------------------------------------------------------------------------- 1 | #ifndef TCPRECEIVER_H 2 | #define TCPRECEIVER_H 3 | 4 | #include 5 | #include 6 | #include "abstractparametereditor.h" 7 | #include "parameterdelegate.h" 8 | #include "parameterhelper.h" 9 | #include "importresult.h" 10 | 11 | namespace Ui { 12 | class TcpReceiver; 13 | } 14 | 15 | class TcpReceiver : public AbstractParameterEditor 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit TcpReceiver(QSharedPointer delegate); 21 | ~TcpReceiver() override; 22 | 23 | QString title() override; 24 | bool setParameters(const Parameters ¶meters) override; 25 | Parameters parameters() override; 26 | bool isStandaloneDialog() override; 27 | 28 | static QSharedPointer importData(const Parameters ¶meters, QSharedPointer progress); 29 | 30 | private slots: 31 | void on_pb_start_pressed(); 32 | 33 | private: 34 | Ui::TcpReceiver *ui; 35 | QSharedPointer m_paramHelper; 36 | }; 37 | 38 | #endif // TCPRECEIVER_H 39 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/TcpData/tcpsender.h: -------------------------------------------------------------------------------- 1 | #ifndef TCPSENDER_H 2 | #define TCPSENDER_H 3 | 4 | #include 5 | #include "abstractparametereditor.h" 6 | #include "parameterdelegate.h" 7 | #include "parameterhelper.h" 8 | #include "exportresult.h" 9 | 10 | namespace Ui { 11 | class TcpSender; 12 | } 13 | 14 | class TcpSender : public AbstractParameterEditor 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit TcpSender(QSharedPointer delegate); 20 | ~TcpSender() override; 21 | 22 | QString title() override; 23 | bool setParameters(const Parameters ¶meters) override; 24 | Parameters parameters() override; 25 | bool isStandaloneDialog() override; 26 | 27 | static QSharedPointer exportData(QSharedPointer bits, const Parameters ¶meters, QSharedPointer progress); 28 | 29 | private slots: 30 | void on_pb_send_pressed(); 31 | 32 | private: 33 | Ui::TcpSender *ui; 34 | QSharedPointer m_paramHelper; 35 | }; 36 | 37 | #endif // TCPSENDER_H 38 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/UdpData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "UdpData" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | 3 | if (NOT BUILDING_WITH_CONAN) 4 | target_link_libraries("hobbits-plugin-importerexporters-UdpData" PRIVATE Qt::Network) 5 | endif() 6 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/UdpData/udpreceiver.h: -------------------------------------------------------------------------------- 1 | #ifndef UDPRECEIVER_H 2 | #define UDPRECEIVER_H 3 | 4 | #include 5 | #include 6 | #include "abstractparametereditor.h" 7 | #include "parameterdelegate.h" 8 | #include "parameterhelper.h" 9 | #include "importresult.h" 10 | 11 | namespace Ui { 12 | class UdpReceiver; 13 | } 14 | 15 | class UdpReceiver : public AbstractParameterEditor 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit UdpReceiver(QSharedPointer delegate); 21 | ~UdpReceiver() override; 22 | 23 | QString title() override; 24 | bool setParameters(const Parameters ¶meters) override; 25 | Parameters parameters() override; 26 | bool isStandaloneDialog() override; 27 | 28 | static QSharedPointer importData(const Parameters ¶meters, QSharedPointer progress); 29 | 30 | private slots: 31 | void on_pb_start_pressed(); 32 | 33 | private: 34 | Ui::UdpReceiver *ui; 35 | QSharedPointer m_paramHelper; 36 | }; 37 | 38 | #endif // UDPRECEIVER_H 39 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/UdpData/udpsender.h: -------------------------------------------------------------------------------- 1 | #ifndef UDPSENDER_H 2 | #define UDPSENDER_H 3 | 4 | #include 5 | #include "bitarray.h" 6 | #include "abstractparametereditor.h" 7 | #include "parameterdelegate.h" 8 | #include "parameterhelper.h" 9 | #include "exportresult.h" 10 | 11 | namespace Ui { 12 | class UdpSender; 13 | } 14 | 15 | class UdpSender : public AbstractParameterEditor 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit UdpSender(QSharedPointer delegate); 21 | ~UdpSender() override; 22 | 23 | QString title() override; 24 | bool setParameters(const Parameters ¶meters) override; 25 | Parameters parameters() override; 26 | bool isStandaloneDialog() override; 27 | 28 | static QSharedPointer exportData(QSharedPointer bits, const Parameters ¶meters, QSharedPointer progress); 29 | 30 | private slots: 31 | void on_pb_send_pressed(); 32 | 33 | private: 34 | Ui::UdpSender *ui; 35 | QSharedPointer m_paramHelper; 36 | 37 | }; 38 | 39 | #endif // UDPSENDER_H 40 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/UsbDevice/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(NOT WIN32) 2 | pluginInDir("${pluginType}" "UsbDevice" "${CMAKE_CURRENT_SOURCE_DIR}") 3 | 4 | if (BUILDING_WITH_CONAN) 5 | target_link_libraries("hobbits-plugin-importerexporters-UsbDevice" PRIVATE CONAN_PKG::libusb) 6 | else() 7 | target_link_libraries("hobbits-plugin-importerexporters-UsbDevice" PRIVATE usb-1.0) 8 | endif() 9 | endif() 10 | -------------------------------------------------------------------------------- /src/hobbits-plugins/importerexporters/UsbDevice/usb_resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | usb_resources/usb.ids 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/BitsError/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "BitsError" "${CMAKE_CURRENT_SOURCE_DIR}") -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/BitsError/bitserrorform.h: -------------------------------------------------------------------------------- 1 | #ifndef BITSERRORFORM_H 2 | #define BITSERRORFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class BitsErrorForm; 10 | } 11 | 12 | class BitsErrorForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | BitsErrorForm(QSharedPointer delegate); 18 | ~BitsErrorForm() override; 19 | 20 | QString title() override; 21 | 22 | virtual bool setParameters(const Parameters ¶meters) override; 23 | virtual Parameters parameters() override; 24 | 25 | signals: 26 | void parametersChanged(); 27 | 28 | private: 29 | Ui::BitsErrorForm *ui; 30 | QSharedPointer m_stateHelper; 31 | }; 32 | 33 | #endif // BITSERRORFORM_H 34 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/Edit/edit.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "operatorinterface.h" 4 | #include "parameterdelegate.h" 5 | 6 | class Edit : public QObject, OperatorInterface 7 | { 8 | Q_OBJECT 9 | Q_PLUGIN_METADATA(IID "hobbits.OperatorInterface.Edit") 10 | Q_INTERFACES(OperatorInterface) 11 | 12 | public: 13 | Edit(); 14 | 15 | OperatorInterface* createDefaultOperator() override; 16 | 17 | QString name() override; 18 | QString description() override; 19 | QStringList tags() override; 20 | 21 | QSharedPointer parameterDelegate() override; 22 | 23 | int getMinInputContainers(const Parameters ¶meters) override; 24 | int getMaxInputContainers(const Parameters ¶meters) override; 25 | 26 | QSharedPointer operateOnBits( 27 | QList> inputContainers, 28 | const Parameters ¶meters, 29 | QSharedPointer progress) override; 30 | 31 | private: 32 | int getUnitSize(Parameters parameters); 33 | QSharedPointer parseBits(QString newBitsInRange); 34 | QSharedPointer parseHex(QString newBitsInRange); 35 | QSharedPointer parseAscii(QString newBitsInRange); 36 | 37 | QSharedPointer m_delegate; 38 | 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/Extractor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "Extractor" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/Extractor/extractor.h: -------------------------------------------------------------------------------- 1 | #ifndef EXTRACTOR_H 2 | #define EXTRACTOR_H 3 | 4 | #include "operatorinterface.h" 5 | #include "highlightnavigator.h" 6 | #include "parameterdelegate.h" 7 | 8 | namespace Ui 9 | { 10 | class Extractor; 11 | 12 | } 13 | 14 | class Extractor : public QObject, OperatorInterface 15 | { 16 | Q_OBJECT 17 | Q_PLUGIN_METADATA(IID "hobbits.OperatorInterface.Extractor") 18 | Q_INTERFACES(OperatorInterface) 19 | 20 | public: 21 | Extractor(); 22 | 23 | OperatorInterface* createDefaultOperator() override; 24 | 25 | QString name() override; 26 | QString description() override; 27 | QStringList tags() override; 28 | 29 | QSharedPointer parameterDelegate() override; 30 | 31 | int getMinInputContainers(const Parameters ¶meters) override; 32 | int getMaxInputContainers(const Parameters ¶meters) override; 33 | 34 | QSharedPointer operateOnBits( 35 | QList> inputContainers, 36 | const Parameters ¶meters, 37 | QSharedPointer progress) override; 38 | 39 | 40 | private: 41 | QSharedPointer m_delegate; 42 | }; 43 | 44 | #endif // EXTRACTOR_H 45 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/Extractor/extractorform.h: -------------------------------------------------------------------------------- 1 | #ifndef EXTRACTORFORM_H 2 | #define EXTRACTORFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | #include "highlightnavigator.h" 7 | 8 | namespace Ui 9 | { 10 | class ExtractorForm; 11 | } 12 | 13 | 14 | class ExtractorForm : public AbstractParameterEditor 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | ExtractorForm(QSharedPointer delegate); 20 | ~ExtractorForm() override; 21 | 22 | QString title() override; 23 | 24 | virtual bool setParameters(const Parameters ¶meters) override; 25 | virtual Parameters parameters() override; 26 | 27 | private slots: 28 | void setHighlightCategory(QString); 29 | 30 | private: 31 | void previewBitsUiImpl(QSharedPointer container) override; 32 | 33 | Ui::ExtractorForm *ui; 34 | QSharedPointer m_delegate; 35 | QSharedPointer m_stateHelper; 36 | HighlightNavigator* m_highlightNav; 37 | QSharedPointer m_previewContainer; 38 | }; 39 | 40 | #endif // EXTRACTORFORM_H 41 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/HeaderFramer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "HeaderFramer" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/HeaderFramer/headerframer.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADERFRAMER_H 2 | #define HEADERFRAMER_H 3 | 4 | #include "parameterdelegate.h" 5 | #include "operatorinterface.h" 6 | 7 | class HeaderFramer : public QObject, OperatorInterface 8 | { 9 | Q_OBJECT 10 | Q_PLUGIN_METADATA(IID "hobbits.OperatorInterface.3.HeaderFramer") 11 | Q_INTERFACES(OperatorInterface) 12 | 13 | public: 14 | struct HeaderInfo { 15 | QSharedPointer headerBits; 16 | int frameLength; 17 | int prePadLength; 18 | bool byteAligned; 19 | }; 20 | 21 | HeaderFramer(); 22 | 23 | OperatorInterface* createDefaultOperator() override; 24 | 25 | QString name() override; 26 | QString description() override; 27 | QStringList tags() override; 28 | 29 | QSharedPointer parameterDelegate() override; 30 | 31 | int getMinInputContainers(const Parameters ¶meters) override; 32 | int getMaxInputContainers(const Parameters ¶meters) override; 33 | 34 | QSharedPointer operateOnBits( 35 | QList> inputContainers, 36 | const Parameters ¶meters, 37 | QSharedPointer progress) override; 38 | 39 | private: 40 | 41 | QSharedPointer m_delegate; 42 | 43 | }; 44 | 45 | #endif // HEADERFRAMER_H 46 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/HeaderFramer/headerframerform.h: -------------------------------------------------------------------------------- 1 | #ifndef HEADERFRAMERFORM_H 2 | #define HEADERFRAMERFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class HeaderFramerForm; 10 | 11 | } 12 | class HeaderFramerForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | HeaderFramerForm(QSharedPointer delegate); 18 | ~HeaderFramerForm() override; 19 | 20 | QString title() override; 21 | 22 | virtual bool setParameters(const Parameters ¶meters) override; 23 | virtual Parameters parameters() override; 24 | 25 | private slots: 26 | void validateHeader(QString header); 27 | void addHeader(); 28 | void checkSelectedHeader(); 29 | void removeHeader(); 30 | void showSpinBoxes(); 31 | 32 | private: 33 | QString getHeaderString(); 34 | 35 | Ui::HeaderFramerForm *ui; 36 | QSharedPointer m_delegate; 37 | }; 38 | 39 | #endif // HEADERFRAMERFORM_H 40 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/PythonRunner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "PythonRunner" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | 3 | target_link_libraries("hobbits-plugin-operators-PythonRunner" PRIVATE hobbits-python) 4 | pass_through_cpack_vars() 5 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/PythonRunner/pythonrunner.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONRUNNER_H 2 | #define PYTHONRUNNER_H 3 | 4 | #include "mathparser.h" 5 | #include "operatorinterface.h" 6 | #include "parameterdelegate.h" 7 | 8 | class PythonRunner : public QObject, OperatorInterface 9 | { 10 | Q_OBJECT 11 | Q_PLUGIN_METADATA(IID "hobbits.OperatorInterface.PythonRunner") 12 | Q_INTERFACES(OperatorInterface) 13 | 14 | public: 15 | PythonRunner(); 16 | 17 | OperatorInterface* createDefaultOperator() override; 18 | 19 | QString name() override; 20 | QString description() override; 21 | QStringList tags() override; 22 | 23 | QSharedPointer parameterDelegate() override; 24 | 25 | int getMinInputContainers(const Parameters ¶meters) override; 26 | int getMaxInputContainers(const Parameters ¶meters) override; 27 | 28 | QSharedPointer operateOnBits( 29 | QList> inputContainers, 30 | const Parameters ¶meters, 31 | QSharedPointer progress) override; 32 | private: 33 | QSharedPointer m_delegate; 34 | }; 35 | 36 | #endif // PYTHONRUNNER_H 37 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/PythonRunner/pythonrunnerform.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONRUNNERFORM_H 2 | #define PYTHONRUNNERFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class PythonRunnerForm; 10 | } 11 | 12 | class PythonRunnerForm : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | PythonRunnerForm(QSharedPointer delegate); 18 | ~PythonRunnerForm() override; 19 | 20 | QString title() override; 21 | 22 | virtual bool setParameters(const Parameters ¶meters) override; 23 | virtual Parameters parameters() override; 24 | 25 | 26 | public Q_SLOTS: 27 | void openHelpDialog(); 28 | void updateOutputText(QString); 29 | void clearOutputText(); 30 | 31 | private: 32 | Ui::PythonRunnerForm *ui; 33 | QSharedPointer m_paramHelper; 34 | QString m_outputText; 35 | }; 36 | 37 | #endif // PYTHONRUNNERFORM_H 38 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/SymbolRemapper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "QamRemapper" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/SymbolRemapper/remapmodel.h: -------------------------------------------------------------------------------- 1 | #ifndef REMAPMODEL_H 2 | #define REMAPMODEL_H 3 | 4 | #include 5 | 6 | class RemapModel : public QAbstractTableModel 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | explicit RemapModel(QObject *parent = nullptr); 12 | 13 | // Header: 14 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; 15 | 16 | // Basic functionality: 17 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 18 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; 19 | 20 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 21 | 22 | // Editable: 23 | bool setData( 24 | const QModelIndex &index, 25 | const QVariant &value, 26 | int role = Qt::EditRole) override; 27 | 28 | Qt::ItemFlags flags(const QModelIndex &index) const override; 29 | 30 | QList> getMappings(); 31 | 32 | public slots: 33 | void setRemapLength(int length); 34 | 35 | private: 36 | void initializeMappings(); 37 | 38 | int m_remapLength; 39 | QList> m_mappings; 40 | 41 | }; 42 | 43 | #endif // REMAPMODEL_H 44 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/SymbolRemapper/symbolremapper.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLREMAPPER_H 2 | #define SYMBOLREMAPPER_H 3 | 4 | #include "operatorinterface.h" 5 | 6 | class SymbolRemapper : public QObject, OperatorInterface 7 | { 8 | Q_OBJECT 9 | Q_PLUGIN_METADATA(IID "hobbits.OperatorInterface.SymbolRemapper") 10 | Q_INTERFACES(OperatorInterface) 11 | 12 | public: 13 | SymbolRemapper(); 14 | 15 | OperatorInterface* createDefaultOperator() override; 16 | 17 | QString name() override; 18 | QString description() override; 19 | QStringList tags() override; 20 | 21 | QSharedPointer parameterDelegate() override; 22 | 23 | int getMinInputContainers(const Parameters ¶meters) override; 24 | int getMaxInputContainers(const Parameters ¶meters) override; 25 | 26 | QSharedPointer operateOnBits( 27 | QList> inputContainers, 28 | const Parameters ¶meters, 29 | QSharedPointer progress) override; 30 | 31 | private: 32 | QSharedPointer m_delegate; 33 | 34 | }; 35 | 36 | #endif // SYMBOLREMAPPER_H 37 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/SymbolRemapper/symbolremapperform.h: -------------------------------------------------------------------------------- 1 | #ifndef SYMBOLREMAPPERFORM_H 2 | #define SYMBOLREMAPPERFORM_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | #include "remapmodel.h" 7 | 8 | namespace Ui 9 | { 10 | class SymbolRemapperForm; 11 | } 12 | 13 | 14 | class SymbolRemapperForm : public AbstractParameterEditor 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | SymbolRemapperForm(QSharedPointer delegate); 20 | ~SymbolRemapperForm() override; 21 | 22 | QString title() override; 23 | 24 | virtual bool setParameters(const Parameters ¶meters) override; 25 | virtual Parameters parameters() override; 26 | 27 | private: 28 | Ui::SymbolRemapperForm *ui; 29 | QSharedPointer m_delegate; 30 | QSharedPointer m_paramHelper; 31 | QString m_outputText; 32 | RemapModel* m_remapModel; 33 | }; 34 | 35 | #endif // SYMBOLREMAPPERFORM_H 36 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | pluginInDir("${pluginType}" "TakeSkipOperator" "${CMAKE_CURRENT_SOURCE_DIR}") 2 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/bitop.h: -------------------------------------------------------------------------------- 1 | #ifndef BITOP_H 2 | #define BITOP_H 3 | 4 | #include "frame.h" 5 | #include 6 | #include 7 | 8 | class BitOp 9 | { 10 | public: 11 | BitOp(qint64 value); 12 | 13 | virtual ~BitOp(); 14 | 15 | virtual void apply( 16 | const Frame &inputFrame, 17 | QSharedPointer outputBits, 18 | qint64 &inputIdx, 19 | qint64 &outputIdx) = 0; 20 | 21 | static QList> parseOps(QString opString); 22 | 23 | virtual qint64 inputStep(qint64 inputBits) const = 0; 24 | virtual qint64 outputStep(qint64 inputBits) const = 0; 25 | 26 | protected: 27 | qint64 m_value; 28 | }; 29 | 30 | #endif // BITOP_H 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/invertop.cpp: -------------------------------------------------------------------------------- 1 | #include "invertop.h" 2 | 3 | InvertOp::InvertOp(qint64 value) : 4 | BitOp(value) 5 | { 6 | 7 | } 8 | 9 | void InvertOp::apply( 10 | const Frame &inputFrame, 11 | QSharedPointer outputBits, 12 | qint64 &inputIdx, 13 | qint64 &outputIdx) 14 | { 15 | qint64 taken = inputFrame.copyBits(inputIdx, outputBits.data(), outputIdx, m_value, BitArray::Invert); 16 | inputIdx += taken; 17 | outputIdx += taken; 18 | } 19 | 20 | qint64 InvertOp::inputStep(qint64 inputBits) const 21 | { 22 | return qMin(inputBits, m_value); 23 | } 24 | 25 | qint64 InvertOp::outputStep(qint64 inputBits) const 26 | { 27 | return qMin(inputBits, m_value); 28 | } 29 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/invertop.h: -------------------------------------------------------------------------------- 1 | #ifndef INVERTOP_H 2 | #define INVERTOP_H 3 | 4 | #include "bitop.h" 5 | 6 | 7 | class InvertOp : public BitOp 8 | { 9 | public: 10 | InvertOp(qint64 value); 11 | 12 | void apply( 13 | const Frame &inputFrame, 14 | QSharedPointer outputBits, 15 | qint64 &inputIdx, 16 | qint64 &outputIdx) override; 17 | 18 | qint64 inputStep(qint64 inputBits) const override; 19 | qint64 outputStep(qint64 inputBits) const override; 20 | 21 | }; 22 | 23 | #endif // INVERTOP_H 24 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/oneop.cpp: -------------------------------------------------------------------------------- 1 | #include "oneop.h" 2 | 3 | OneOp::OneOp(qint64 value) : 4 | BitOp(value) 5 | { 6 | 7 | } 8 | 9 | void OneOp::apply( 10 | const Frame &inputFrame, 11 | QSharedPointer outputBits, 12 | qint64 &inputIdx, 13 | qint64 &outputIdx) 14 | { 15 | Q_UNUSED(inputFrame) 16 | Q_UNUSED(inputIdx) 17 | for (int i = 0; i < m_value; i++) { 18 | outputBits->set(outputIdx, true); 19 | outputIdx++; 20 | } 21 | } 22 | 23 | qint64 OneOp::inputStep(qint64 inputBits) const 24 | { 25 | Q_UNUSED(inputBits) 26 | return 0; 27 | } 28 | 29 | qint64 OneOp::outputStep(qint64 inputBits) const 30 | { 31 | Q_UNUSED(inputBits) 32 | return m_value; 33 | } 34 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/oneop.h: -------------------------------------------------------------------------------- 1 | #ifndef ONEOP_H 2 | #define ONEOP_H 3 | 4 | #include "bitop.h" 5 | 6 | 7 | class OneOp : public BitOp 8 | { 9 | public: 10 | OneOp(qint64 value); 11 | 12 | void apply( 13 | const Frame &inputFrame, 14 | QSharedPointer outputBits, 15 | qint64 &inputIdx, 16 | qint64 &outputIdx) override; 17 | 18 | qint64 inputStep(qint64 inputBits) const override; 19 | qint64 outputStep(qint64 inputBits) const override; 20 | 21 | }; 22 | 23 | #endif // ONEOP_H 24 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/reverseop.cpp: -------------------------------------------------------------------------------- 1 | #include "reverseop.h" 2 | 3 | ReverseOp::ReverseOp(qint64 value) : 4 | BitOp(value) 5 | { 6 | 7 | } 8 | 9 | void ReverseOp::apply( 10 | const Frame &inputFrame, 11 | QSharedPointer outputBits, 12 | qint64 &inputIdx, 13 | qint64 &outputIdx) 14 | { 15 | for (qint64 i = m_value - 1; i >= 0 && inputIdx + i < inputFrame.size(); i--) { 16 | outputBits->set(outputIdx, inputFrame.at(inputIdx + i)); 17 | outputIdx++; 18 | } 19 | inputIdx = qMin(inputFrame.size(), inputIdx + m_value); 20 | } 21 | 22 | qint64 ReverseOp::inputStep(qint64 inputBits) const 23 | { 24 | return qMin(inputBits, m_value); 25 | } 26 | 27 | qint64 ReverseOp::outputStep(qint64 inputBits) const 28 | { 29 | return qMin(inputBits, m_value); 30 | } 31 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/reverseop.h: -------------------------------------------------------------------------------- 1 | #ifndef REVERSEOP_H 2 | #define REVERSEOP_H 3 | 4 | #include "bitop.h" 5 | 6 | 7 | class ReverseOp : public BitOp 8 | { 9 | public: 10 | ReverseOp(qint64 value); 11 | 12 | void apply( 13 | const Frame &inputFrame, 14 | QSharedPointer outputBits, 15 | qint64 &inputIdx, 16 | qint64 &outputIdx) override; 17 | 18 | qint64 inputStep(qint64 inputBits) const override; 19 | qint64 outputStep(qint64 inputBits) const override; 20 | 21 | }; 22 | 23 | #endif // REVERSEOP_H 24 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/skipop.cpp: -------------------------------------------------------------------------------- 1 | #include "skipop.h" 2 | 3 | SkipOp::SkipOp(qint64 value) : 4 | BitOp(value) 5 | { 6 | 7 | } 8 | 9 | void SkipOp::apply( 10 | const Frame &inputFrame, 11 | QSharedPointer outputBits, 12 | qint64 &inputIdx, 13 | qint64 &outputIdx) 14 | { 15 | Q_UNUSED(outputBits) 16 | Q_UNUSED(outputIdx) 17 | inputIdx = inputIdx + m_value; 18 | if (inputIdx < m_value) { 19 | inputIdx = inputFrame.size(); 20 | } 21 | else { 22 | inputIdx = qMin(inputIdx, inputFrame.size()); 23 | } 24 | } 25 | 26 | qint64 SkipOp::inputStep(qint64 inputBits) const 27 | { 28 | return qMin(inputBits, m_value); 29 | } 30 | 31 | qint64 SkipOp::outputStep(qint64 inputBits) const 32 | { 33 | Q_UNUSED(inputBits) 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/skipop.h: -------------------------------------------------------------------------------- 1 | #ifndef SKIPOP_H 2 | #define SKIPOP_H 3 | 4 | #include "bitop.h" 5 | 6 | class SkipOp : public BitOp 7 | { 8 | public: 9 | SkipOp(qint64 value); 10 | 11 | void apply( 12 | const Frame &inputFrame, 13 | QSharedPointer outputBits, 14 | qint64 &inputIdx, 15 | qint64 &outputIdx) override; 16 | 17 | qint64 inputStep(qint64 inputBits) const override; 18 | qint64 outputStep(qint64 inputBits) const override; 19 | 20 | }; 21 | 22 | #endif // SKIPOP_H 23 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/takeop.cpp: -------------------------------------------------------------------------------- 1 | #include "takeop.h" 2 | 3 | TakeOp::TakeOp(qint64 value) : 4 | BitOp(value) 5 | { 6 | 7 | } 8 | 9 | void TakeOp::apply( 10 | const Frame &inputFrame, 11 | QSharedPointer outputBits, 12 | qint64 &inputIdx, 13 | qint64 &outputIdx) 14 | { 15 | // copying into an empty bit array, so "Or" can be used instead of "Copy" 16 | qint64 taken = inputFrame.copyBits(inputIdx, outputBits.data(), outputIdx, m_value, BitArray::Or); 17 | inputIdx += taken; 18 | outputIdx += taken; 19 | } 20 | 21 | qint64 TakeOp::inputStep(qint64 inputBits) const 22 | { 23 | return qMin(inputBits, m_value); 24 | } 25 | 26 | qint64 TakeOp::outputStep(qint64 inputBits) const 27 | { 28 | return qMin(inputBits, m_value); 29 | } 30 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/takeop.h: -------------------------------------------------------------------------------- 1 | #ifndef TAKEOP_H 2 | #define TAKEOP_H 3 | 4 | #include "bitop.h" 5 | 6 | class TakeOp : public BitOp 7 | { 8 | public: 9 | TakeOp(qint64 value); 10 | 11 | void apply( 12 | const Frame &inputFrame, 13 | QSharedPointer outputBits, 14 | qint64 &inputIdx, 15 | qint64 &outputIdx) override; 16 | 17 | qint64 inputStep(qint64 inputBits) const override; 18 | qint64 outputStep(qint64 inputBits) const override; 19 | 20 | }; 21 | 22 | #endif // TAKEOP_H 23 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/takeskip.h: -------------------------------------------------------------------------------- 1 | #ifndef TAKESKIPOPERATOR_H 2 | #define TAKESKIPOPERATOR_H 3 | 4 | #include "operatorinterface.h" 5 | #include "parameterdelegate.h" 6 | 7 | class TakeSkip : public QObject, OperatorInterface 8 | { 9 | Q_OBJECT 10 | Q_PLUGIN_METADATA(IID "hobbits.OperatorInterface.TakeSkip") 11 | Q_INTERFACES(OperatorInterface) 12 | 13 | public: 14 | TakeSkip(); 15 | 16 | OperatorInterface* createDefaultOperator() override; 17 | 18 | QString name() override; 19 | QString description() override; 20 | QStringList tags() override; 21 | 22 | QSharedPointer parameterDelegate() override; 23 | 24 | int getMinInputContainers(const Parameters ¶meters) override; 25 | int getMaxInputContainers(const Parameters ¶meters) override; 26 | 27 | QSharedPointer operateOnBits( 28 | QList> inputContainers, 29 | const Parameters ¶meters, 30 | QSharedPointer progress) override; 31 | 32 | private: 33 | QSharedPointer m_delegate; 34 | 35 | 36 | }; 37 | 38 | #endif // TAKESKIPOPERATOR_H 39 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/takeskipeditor.h: -------------------------------------------------------------------------------- 1 | #ifndef TAKESKIPEDITOR_H 2 | #define TAKESKIPEDITOR_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | 7 | namespace Ui 8 | { 9 | class TakeSkipEditor; 10 | } 11 | 12 | class TakeSkipEditor : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | TakeSkipEditor(QSharedPointer delegate); 18 | ~TakeSkipEditor() override; 19 | 20 | QString title() override; 21 | 22 | virtual bool setParameters(const Parameters ¶meters) override; 23 | virtual Parameters parameters() override; 24 | 25 | private slots: 26 | void showHelp(); 27 | void requestRun(); 28 | void interleaveSelectionChanged(); 29 | 30 | private: 31 | Ui::TakeSkipEditor *ui; 32 | QSharedPointer m_delegate; 33 | QSharedPointer m_stateHelper; 34 | }; 35 | 36 | #endif // TAKESKIPEDITOR_H 37 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/zeroop.cpp: -------------------------------------------------------------------------------- 1 | #include "zeroop.h" 2 | 3 | ZeroOp::ZeroOp(qint64 value) : 4 | BitOp(value) 5 | { 6 | 7 | } 8 | 9 | void ZeroOp::apply( 10 | const Frame &inputFrame, 11 | QSharedPointer outputBits, 12 | qint64 &inputIdx, 13 | qint64 &outputIdx) 14 | { 15 | Q_UNUSED(inputFrame) 16 | Q_UNUSED(inputIdx) 17 | for (qint64 i = 0; i < m_value; i++) { 18 | outputBits->set(outputIdx, false); 19 | outputIdx++; 20 | } 21 | } 22 | 23 | qint64 ZeroOp::inputStep(qint64 inputBits) const 24 | { 25 | Q_UNUSED(inputBits) 26 | return 0; 27 | } 28 | 29 | qint64 ZeroOp::outputStep(qint64 inputBits) const 30 | { 31 | Q_UNUSED(inputBits) 32 | return m_value; 33 | } 34 | -------------------------------------------------------------------------------- /src/hobbits-plugins/operators/TakeSkip/zeroop.h: -------------------------------------------------------------------------------- 1 | #ifndef ZEROOP_H 2 | #define ZEROOP_H 3 | 4 | #include "bitop.h" 5 | 6 | 7 | class ZeroOp : public BitOp 8 | { 9 | public: 10 | ZeroOp(qint64 value); 11 | 12 | void apply( 13 | const Frame &inputFrame, 14 | QSharedPointer outputBits, 15 | qint64 &inputIdx, 16 | qint64 &outputIdx) override; 17 | 18 | qint64 inputStep(qint64 inputBits) const override; 19 | qint64 outputStep(qint64 inputBits) const override; 20 | 21 | }; 22 | 23 | #endif // ZEROOP_H 24 | -------------------------------------------------------------------------------- /src/hobbits-python/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Config Header 3 | # 4 | 5 | set(HOBBITS_PYTHON_VERSION "${BUILD_VERSION}") 6 | set(HOBBITS_PYTHON_PYTHON_VERSION "${Python3_VERSION}") 7 | 8 | set(CONFIG_FILE_NAME "${CMAKE_CURRENT_SOURCE_DIR}/hobbitspythonconfig.h") 9 | configure_file("${CONFIG_FILE_NAME}.in" "${CONFIG_FILE_NAME}") 10 | 11 | 12 | # 13 | # Build 14 | # 15 | 16 | if (WIN32) 17 | # this helps when using the hobbits windows python builds 18 | set(CMAKE_BUILD_TYPE Release) 19 | endif() 20 | 21 | file(GLOB_RECURSE HDRFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 22 | file(GLOB_RECURSE SRCFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") 23 | file(GLOB RCFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.qrc" "${CMAKE_CURRENT_SOURCE_DIR}/*.ui") 24 | 25 | add_library(hobbits-python "${SRCFILES}" "${HDRFILES}" "${RCFILES}") 26 | target_include_directories(hobbits-python 27 | INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}" 28 | PRIVATE "${Python3_INCLUDE_DIRS}") 29 | 30 | target_link_libraries(hobbits-python hobbits-core hobbits-widgets ${Python3_LIBRARIES}) 31 | target_compile_definitions(hobbits-python PRIVATE "-DHOBBITSPYTHON_LIBRARY") 32 | #harden("hobbits-python") 33 | 34 | set_target_properties(hobbits-python 35 | PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${HOBBITS_LIB_OUT_DIR}) 36 | 37 | install_hobbits_lib(hobbits-python "${HDRFILES}") 38 | -------------------------------------------------------------------------------- /src/hobbits-python/hobbits-python_global.h: -------------------------------------------------------------------------------- 1 | #ifndef HOBBITSPYTHON_GLOBAL_H 2 | #define HOBBITSPYTHON_GLOBAL_H 3 | 4 | #include 5 | 6 | #if defined(HOBBITSPYTHON_LIBRARY) 7 | # define HOBBITSPYTHONSHARED_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define HOBBITSPYTHONSHARED_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // HOBBITSPYTHON_GLOBAL_H 13 | -------------------------------------------------------------------------------- /src/hobbits-python/hobbitspython.h: -------------------------------------------------------------------------------- 1 | #ifndef HOBBITSPYTHON_H 2 | #define HOBBITSPYTHON_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "pythonresult.h" 8 | #include "pluginactionwatcher.h" 9 | #include "bitarray.h" 10 | #include "pythonrequest.h" 11 | 12 | #include "hobbits-python_global.h" 13 | class HOBBITSPYTHONSHARED_EXPORT HobbitsPython : public QObject 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | static HobbitsPython& getInstance(); 19 | static void waitForInterpreterLock(); 20 | 21 | QSharedPointer>> runProcessScript( 22 | QSharedPointer request, 23 | bool includeActionProgressArg = true); 24 | 25 | QSharedPointer>> runProcessScript( 26 | QSharedPointer request, 27 | QSharedPointer progress); 28 | 29 | // copying dependencies from a resource into a temp folder might be used in many python run staging scenarios 30 | static void recursiveDirCopy(QString src, QString dest); 31 | 32 | private: 33 | HobbitsPython(); 34 | }; 35 | 36 | #endif // HOBBITSPYTHON_H 37 | -------------------------------------------------------------------------------- /src/hobbits-python/hobbitspythonconfig.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace HobbitsPythonConfig 4 | { 5 | 6 | static const char PYTHON_VERSION[] = "@HOBBITS_PYTHON_PYTHON_VERSION@"; 7 | static const char VERSION[] = "@HOBBITS_PYTHON_VERSION@"; 8 | 9 | } -------------------------------------------------------------------------------- /src/hobbits-python/imagebuffer.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEBUFFER_H 2 | #define IMAGEBUFFER_H 3 | 4 | #define PY_SSIZE_T_CLEAN 5 | #include 6 | 7 | 8 | extern "C" { 9 | 10 | extern PyTypeObject ImageBuffer; 11 | 12 | } 13 | 14 | #endif // IMAGEBUFFER_H 15 | -------------------------------------------------------------------------------- /src/hobbits-python/py_actionprogress.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_ACTIONPROGRESS_H 2 | #define PY_ACTIONPROGRESS_H 3 | 4 | #define PY_SSIZE_T_CLEAN 5 | #include 6 | 7 | 8 | extern "C" { 9 | 10 | extern PyTypeObject PyActionProgress; 11 | 12 | } 13 | 14 | #endif // PY_ACTIONPROGRESS_H 15 | -------------------------------------------------------------------------------- /src/hobbits-python/py_bitarray.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_BITARRAY_H 2 | #define PY_BITARRAY_H 3 | 4 | #define PY_SSIZE_T_CLEAN 5 | #include 6 | 7 | 8 | extern "C" { 9 | 10 | extern PyTypeObject PyBitArray; 11 | extern PyTypeObject PyImmutableBitArray; 12 | 13 | } 14 | 15 | #endif // PY_BITARRAY_H 16 | -------------------------------------------------------------------------------- /src/hobbits-python/py_bitcontainer.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_BITCONTAINER_H 2 | #define PY_BITCONTAINER_H 3 | 4 | #define PY_SSIZE_T_CLEAN 5 | #include 6 | 7 | 8 | extern "C" { 9 | 10 | extern PyTypeObject PyBitContainer; 11 | extern PyTypeObject PyImmutableBitContainer; 12 | 13 | } 14 | 15 | #endif // PY_BITCONTAINER_H 16 | -------------------------------------------------------------------------------- /src/hobbits-python/py_bitinfo.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_BITINFO_H 2 | #define PY_BITINFO_H 3 | 4 | #define PY_SSIZE_T_CLEAN 5 | #include 6 | 7 | 8 | extern "C" { 9 | 10 | extern PyTypeObject PyBitInfo; 11 | extern PyTypeObject PyImmutableBitInfo; 12 | 13 | } 14 | 15 | #endif // PY_BITINFO_H 16 | -------------------------------------------------------------------------------- /src/hobbits-python/py_displayhandle.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_DISPLAYHANDLE_H 2 | #define PY_DISPLAYHANDLE_H 3 | 4 | 5 | #define PY_SSIZE_T_CLEAN 6 | #include 7 | 8 | 9 | extern "C" { 10 | 11 | extern PyTypeObject PyDisplayHandle; 12 | 13 | } 14 | 15 | #endif // PY_DISPLAYHANDLE_H 16 | -------------------------------------------------------------------------------- /src/hobbits-python/py_hobbits.h: -------------------------------------------------------------------------------- 1 | #ifndef PY_HOBBITS_H 2 | #define PY_HOBBITS_H 3 | 4 | #define PY_SSIZE_T_CLEAN 5 | #include 6 | 7 | extern "C" { 8 | 9 | PyMODINIT_FUNC 10 | PyInit_hobbits(void); 11 | 12 | } 13 | 14 | #endif // PY_HOBBITS_H 15 | -------------------------------------------------------------------------------- /src/hobbits-python/pythonanalyzer.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONANALYZER_H 2 | #define PYTHONANALYZER_H 3 | 4 | #include "analyzerinterface.h" 5 | #include "parameterdelegate.h" 6 | #include "pythonpluginconfig.h" 7 | #include "hobbits-python_global.h" 8 | 9 | class HOBBITSPYTHONSHARED_EXPORT PythonAnalyzer : public AnalyzerInterface 10 | { 11 | public: 12 | PythonAnalyzer(QSharedPointer config); 13 | 14 | AnalyzerInterface* createDefaultAnalyzer() override; 15 | 16 | QString name() override; 17 | QString description() override; 18 | QStringList tags() override; 19 | 20 | QSharedPointer parameterDelegate() override; 21 | 22 | QSharedPointer analyzeBits( 23 | QSharedPointer container, 24 | const Parameters ¶meters, 25 | QSharedPointer progress) override; 26 | 27 | private: 28 | QSharedPointer m_config; 29 | }; 30 | 31 | #endif // PYTHONANALYZER_H 32 | -------------------------------------------------------------------------------- /src/hobbits-python/pythondisplay.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONDISPLAY_H 2 | #define PYTHONDISPLAY_H 3 | 4 | #include "displayinterface.h" 5 | #include "parameterdelegate.h" 6 | #include "pythonpluginconfig.h" 7 | #include "hobbits-python_global.h" 8 | 9 | class HOBBITSPYTHONSHARED_EXPORT PythonDisplay : public DisplayInterface 10 | { 11 | public: 12 | PythonDisplay(QSharedPointer config); 13 | 14 | DisplayInterface* createDefaultDisplay() override; 15 | 16 | QString name() override; 17 | QString description() override; 18 | QStringList tags() override; 19 | 20 | QSharedPointer renderConfig() override; 21 | void setDisplayHandle(QSharedPointer displayHandle) override; 22 | QSharedPointer parameterDelegate() override; 23 | 24 | QSharedPointer renderDisplay( 25 | QSize viewportSize, 26 | const Parameters ¶meters, 27 | QSharedPointer progress) override; 28 | 29 | QSharedPointer renderOverlay( 30 | QSize viewportSize, 31 | const Parameters ¶meters) override; 32 | 33 | private: 34 | QSharedPointer m_config; 35 | QSharedPointer m_handle; 36 | }; 37 | 38 | #endif // PYTHONDISPLAY_H 39 | -------------------------------------------------------------------------------- /src/hobbits-python/pythonexporter.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONEXPORTER_H 2 | #define PYTHONEXPORTER_H 3 | 4 | #include "importexportinterface.h" 5 | #include "parameterdelegate.h" 6 | #include "pythonpluginconfig.h" 7 | #include "hobbits-python_global.h" 8 | 9 | class PythonExporter : public ImporterExporterInterface 10 | { 11 | public: 12 | PythonExporter(QSharedPointer config); 13 | 14 | ImporterExporterInterface* createDefaultImporterExporter() override; 15 | 16 | QString name() override; 17 | QString description() override; 18 | QStringList tags() override; 19 | 20 | bool canExport() override; 21 | bool canImport() override; 22 | 23 | virtual QSharedPointer importParameterDelegate() override; 24 | virtual QSharedPointer exportParameterDelegate() override; 25 | 26 | QSharedPointer importBits(const Parameters ¶meters, 27 | QSharedPointer progress) override; 28 | QSharedPointer exportBits(QSharedPointer container, 29 | const Parameters ¶meters, 30 | QSharedPointer progress) override; 31 | 32 | private: 33 | QSharedPointer m_config; 34 | }; 35 | 36 | #endif // PYTHONEXPORTER_H 37 | -------------------------------------------------------------------------------- /src/hobbits-python/pythoninterpreter.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONINTERPRETER_H 2 | #define PYTHONINTERPRETER_H 3 | 4 | #include "pythonrequest.h" 5 | #include "pythonresult.h" 6 | 7 | class HOBBITSPYTHONSHARED_EXPORT PythonInterpreter 8 | { 9 | private: 10 | PythonInterpreter(); 11 | 12 | public: 13 | ~PythonInterpreter(); 14 | 15 | private: 16 | static PythonInterpreter& instance(); 17 | void initialize(); 18 | 19 | public: 20 | static void waitForLock(); 21 | static QSharedPointer runProcessScript(QSharedPointer request); 22 | 23 | private: 24 | QSharedPointer _runProcessScript(QSharedPointer request); 25 | 26 | bool errorCheckAndPrint(); 27 | 28 | QMutex m_mutex; 29 | QSharedPointer m_initializationError; 30 | }; 31 | 32 | #endif // PYTHONINTERPRETER_H 33 | -------------------------------------------------------------------------------- /src/hobbits-python/pythonoperator.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONOPERATOR_H 2 | #define PYTHONOPERATOR_H 3 | 4 | #include "operatorinterface.h" 5 | #include "parameterdelegate.h" 6 | #include "pythonpluginconfig.h" 7 | #include "hobbits-python_global.h" 8 | 9 | class HOBBITSPYTHONSHARED_EXPORT PythonOperator : public OperatorInterface 10 | { 11 | public: 12 | PythonOperator(QSharedPointer config); 13 | 14 | OperatorInterface* createDefaultOperator() override; 15 | 16 | QString name() override; 17 | QString description() override; 18 | QStringList tags() override; 19 | 20 | QSharedPointer parameterDelegate() override; 21 | 22 | int getMinInputContainers(const Parameters ¶meters) override; 23 | int getMaxInputContainers(const Parameters ¶meters) override; 24 | 25 | QSharedPointer operateOnBits( 26 | QList> inputContainers, 27 | const Parameters ¶meters, 28 | QSharedPointer progress) override; 29 | 30 | private: 31 | QSharedPointer m_config; 32 | }; 33 | 34 | #endif // PYTHONOPERATOR_H 35 | -------------------------------------------------------------------------------- /src/hobbits-python/pythonrequest.cpp: -------------------------------------------------------------------------------- 1 | #include "pythonrequest.h" 2 | 3 | PythonRequest::PythonRequest() 4 | { 5 | 6 | } 7 | 8 | QList PythonRequest::args() const 9 | { 10 | return m_args; 11 | } 12 | 13 | PythonRequest::~PythonRequest() 14 | { 15 | for (auto arg : m_args) { 16 | delete arg; 17 | } 18 | m_args.clear(); 19 | } 20 | 21 | QSharedPointer PythonRequest::create(QString scriptName) 22 | { 23 | QSharedPointer request(new PythonRequest()); 24 | request->m_scriptName = scriptName; 25 | return request; 26 | } 27 | 28 | QSharedPointer PythonRequest::setFunctionName(QString functionName) 29 | { 30 | this->m_functionName = functionName; 31 | return sharedFromThis(); 32 | } 33 | 34 | QSharedPointer PythonRequest::addPathExtension(QString extension) 35 | { 36 | m_pathExtensions.append(extension); 37 | return sharedFromThis(); 38 | } 39 | 40 | QSharedPointer PythonRequest::addArg(PythonArg *arg) 41 | { 42 | m_args.append(arg); 43 | return sharedFromThis(); 44 | } 45 | 46 | QStringList PythonRequest::pathExtensions() const 47 | { 48 | return m_pathExtensions; 49 | } 50 | 51 | QString PythonRequest::scriptName() const 52 | { 53 | return m_scriptName; 54 | } 55 | 56 | QString PythonRequest::functionName() const 57 | { 58 | return m_functionName; 59 | } 60 | -------------------------------------------------------------------------------- /src/hobbits-python/pythonrequest.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONREQUEST_H 2 | #define PYTHONREQUEST_H 3 | 4 | #include 5 | #include "bitarray.h" 6 | #include "pythonarg.h" 7 | 8 | class HOBBITSPYTHONSHARED_EXPORT PythonRequest : public QEnableSharedFromThis 9 | { 10 | public: 11 | ~PythonRequest(); 12 | static QSharedPointer create(QString scriptName); 13 | 14 | QSharedPointer setFunctionName(QString functionName); 15 | QSharedPointer addPathExtension(QString extension); 16 | QSharedPointer addArg(PythonArg *arg); 17 | 18 | 19 | QStringList pathExtensions() const; 20 | QString scriptName() const; 21 | QString functionName() const; 22 | QList args() const; 23 | 24 | private: 25 | PythonRequest(); 26 | QString m_scriptName; 27 | QString m_functionName; 28 | QStringList m_pathExtensions; 29 | QList m_args; 30 | }; 31 | 32 | #endif // PYTHONREQUEST_H 33 | -------------------------------------------------------------------------------- /src/hobbits-python/pythonresult.cpp: -------------------------------------------------------------------------------- 1 | #include "pythonresult.h" 2 | 3 | PythonResult::PythonResult() 4 | { 5 | 6 | } 7 | 8 | QStringList PythonResult::errors() const 9 | { 10 | return m_errors; 11 | } 12 | 13 | QString PythonResult::getStdErr() const 14 | { 15 | return m_stderr; 16 | } 17 | 18 | QString PythonResult::getStdOut() const 19 | { 20 | return m_stdout; 21 | } 22 | 23 | QSharedPointer PythonResult::result(QStringList errors) 24 | { 25 | auto r = QSharedPointer(new PythonResult()); 26 | r->m_errors = errors; 27 | return r; 28 | } 29 | 30 | QSharedPointer PythonResult::result(QFile &stdoutFile, QFile &stderrFile, QStringList errors) 31 | { 32 | auto r = QSharedPointer(new PythonResult()); 33 | r->m_errors = errors; 34 | if (!stdoutFile.open(QFile::ReadOnly)) { 35 | r->m_errors.append(QString("Failed to open stdout file '%1'").arg(stdoutFile.fileName())); 36 | } 37 | else { 38 | r->m_stdout = stdoutFile.readAll(); 39 | } 40 | stdoutFile.close(); 41 | 42 | if (!stderrFile.open(QFile::ReadOnly)) { 43 | r->m_errors.append(QString("Failed to open stderr file '%1'").arg(stderrFile.fileName())); 44 | } 45 | else { 46 | r->m_stderr = stderrFile.readAll(); 47 | } 48 | stderrFile.close(); 49 | 50 | return r; 51 | } 52 | -------------------------------------------------------------------------------- /src/hobbits-python/pythonresult.h: -------------------------------------------------------------------------------- 1 | #ifndef PYTHONRESULT_H 2 | #define PYTHONRESULT_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "hobbits-python_global.h" 9 | 10 | class HOBBITSPYTHONSHARED_EXPORT PythonResult 11 | { 12 | public: 13 | static QSharedPointer result(QStringList errors); 14 | static QSharedPointer result(QFile &stdoutFile, QFile &stderrFile, QStringList errors); 15 | 16 | QString getStdOut() const; 17 | QString getStdErr() const; 18 | QStringList errors() const; 19 | 20 | private: 21 | PythonResult(); 22 | QString m_stdout; 23 | QString m_stderr; 24 | QStringList m_errors; 25 | }; 26 | 27 | #endif // PYTHONRESULT_H 28 | -------------------------------------------------------------------------------- /src/hobbits-qt-ui-forms.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = aux 2 | 3 | FORMS = $$files(*.ui, true) 4 | 5 | RESOURCES += \ 6 | hobbits-plugins/importerexporters/UsbDevice/usb_resources.qrc 7 | -------------------------------------------------------------------------------- /src/hobbits-runner/hobbitsrunnerconfig.h.in: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | namespace HobbitsRunnerConfig 5 | { 6 | static const char VERSION[] = "@HOBBITS_RUNNER_VERSION@"; 7 | } 8 | -------------------------------------------------------------------------------- /src/hobbits-widgets/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Build 3 | # 4 | 5 | file(GLOB_RECURSE HDRFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/*.hpp") 6 | file(GLOB_RECURSE SRCFILES "${CMAKE_CURRENT_SOURCE_DIR}/*.c" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") 7 | file(GLOB resource_files "${CMAKE_CURRENT_SOURCE_DIR}/*.qrc" "${CMAKE_CURRENT_SOURCE_DIR}/*.ui") 8 | 9 | add_library(hobbits-widgets ${SRCFILES} ${HDRFILES} ${resource_files}) 10 | target_include_directories(hobbits-widgets INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") 11 | 12 | target_link_libraries(hobbits-widgets hobbits-core) 13 | target_compile_definitions(hobbits-widgets PRIVATE "-DHOBBITSWIDGETS_LIBRARY") 14 | #harden("hobbits-widgets") 15 | 16 | set_target_properties(hobbits-widgets 17 | PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${HOBBITS_LIB_OUT_DIR}) 18 | 19 | install_hobbits_lib(hobbits-widgets "${HDRFILES}") 20 | -------------------------------------------------------------------------------- /src/hobbits-widgets/actionrenderprogress.cpp: -------------------------------------------------------------------------------- 1 | #include "actionrenderprogress.h" 2 | 3 | ActionRenderProgress::ActionRenderProgress() : 4 | PluginActionProgress() 5 | { 6 | 7 | } 8 | 9 | void ActionRenderProgress::setRenderPreview(QImage preview) 10 | { 11 | QMutexLocker locker(&m_mutex); 12 | 13 | m_preview = preview; 14 | emit renderPreviewChanged(m_preview); 15 | } 16 | -------------------------------------------------------------------------------- /src/hobbits-widgets/actionrenderprogress.h: -------------------------------------------------------------------------------- 1 | #ifndef ACTIONRENDERPROGRESS_H 2 | #define ACTIONRENDERPROGRESS_H 3 | 4 | #include "pluginactionprogress.h" 5 | #include 6 | #include "hobbits-widgets_global.h" 7 | 8 | class HOBBITSWIDGETSSHARED_EXPORT ActionRenderProgress : public PluginActionProgress 9 | { 10 | Q_OBJECT 11 | public: 12 | ActionRenderProgress(); 13 | 14 | void setRenderPreview(QImage preview); 15 | 16 | signals: 17 | void renderPreviewChanged(const QImage&); 18 | 19 | private: 20 | QImage m_preview; 21 | }; 22 | 23 | #endif // ACTIONRENDERPROGRESS_H 24 | -------------------------------------------------------------------------------- /src/hobbits-widgets/batchedititemwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef BATCHEDITITEMWIDGET_H 2 | #define BATCHEDITITEMWIDGET_H 3 | 4 | #include 5 | #include "hobbitspluginmanager.h" 6 | #include "hobbits-widgets_global.h" 7 | 8 | namespace Ui { 9 | class BatchEditItemWidget; 10 | } 11 | 12 | class HOBBITSWIDGETSSHARED_EXPORT BatchEditItemWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit BatchEditItemWidget(QString title, QSharedPointer delegate, Parameters parameters); 18 | ~BatchEditItemWidget(); 19 | 20 | Parameters parameters() const; 21 | QString displayString() const; 22 | 23 | public slots: 24 | void setInputEnabled(bool enabled); 25 | void setOutputEnabled(bool enabled); 26 | 27 | signals: 28 | void inputPressed(); 29 | void outputPressed(); 30 | void parametersChanged(Parameters); 31 | 32 | private slots: 33 | void on_pb_inputs_clicked(); 34 | void on_pb_outputs_clicked(); 35 | void on_pb_config_clicked(); 36 | void on_pb_clear_clicked(); 37 | 38 | void setParameters(const Parameters ¶meters); 39 | 40 | private: 41 | Ui::BatchEditItemWidget *ui; 42 | QSharedPointer m_delegate; 43 | Parameters m_parameters; 44 | }; 45 | 46 | #endif // BATCHEDITITEMWIDGET_H 47 | -------------------------------------------------------------------------------- /src/hobbits-widgets/batcheditlink.h: -------------------------------------------------------------------------------- 1 | #ifndef BATCHEDITLINK_H 2 | #define BATCHEDITLINK_H 3 | 4 | #include "batchedititem.h" 5 | #include "hobbits-widgets_global.h" 6 | 7 | class HOBBITSWIDGETSSHARED_EXPORT BatchEditLink: public QGraphicsObject 8 | { 9 | Q_OBJECT 10 | public: 11 | explicit BatchEditLink(BatchEditItem* sender, BatchEditItem* receiver, int outputNumber); 12 | ~BatchEditLink() override; 13 | 14 | void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override; 15 | QRectF boundingRect() const override; 16 | QPainterPath shape() const override; 17 | 18 | public slots: 19 | void deactivate(QUuid deleted); 20 | void checkRemoval(QUuid deleted, int outputNumber); 21 | 22 | private: 23 | BatchEditItem* m_sender; 24 | BatchEditItem* m_receiver; 25 | int m_outputNumber; 26 | bool m_active; 27 | }; 28 | 29 | #endif // BATCHEDITLINK_H 30 | -------------------------------------------------------------------------------- /src/hobbits-widgets/batcheditor.h: -------------------------------------------------------------------------------- 1 | #ifndef BATCHEDITOR_H 2 | #define BATCHEDITOR_H 3 | 4 | #include 5 | #include "hobbitspluginmanager.h" 6 | #include "batcheditscene.h" 7 | #include "hobbits-widgets_global.h" 8 | 9 | namespace Ui { 10 | class BatchEditor; 11 | } 12 | 13 | class HOBBITSWIDGETSSHARED_EXPORT BatchEditor : public QMainWindow 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit BatchEditor(QSharedPointer pluginManager, QWidget *parent = nullptr); 19 | ~BatchEditor(); 20 | 21 | void setBatch(QSharedPointer batch); 22 | 23 | private slots: 24 | void on_action_saveBatchAs_triggered(); 25 | void on_action_openBatch_triggered(); 26 | void on_action_createNewBatch_triggered(); 27 | 28 | private: 29 | Ui::BatchEditor *ui; 30 | QSharedPointer m_pluginManager; 31 | BatchEditScene *m_editScene; 32 | }; 33 | 34 | #endif // BATCHEDITOR_H 35 | -------------------------------------------------------------------------------- /src/hobbits-widgets/batchinputdialog.h: -------------------------------------------------------------------------------- 1 | #ifndef BATCHINPUTDIALOG_H 2 | #define BATCHINPUTDIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "hobbits-widgets_global.h" 10 | 11 | namespace Ui { 12 | class BatchInputDialog; 13 | } 14 | 15 | class HOBBITSWIDGETSSHARED_EXPORT BatchInputDialog : public QDialog 16 | { 17 | Q_OBJECT 18 | 19 | public: 20 | explicit BatchInputDialog(QList> inputs, QMap displayMap, QWidget *parent = nullptr); 21 | ~BatchInputDialog(); 22 | 23 | QList > inputs() const; 24 | 25 | private slots: 26 | void on_pb_delete_clicked(); 27 | 28 | private: 29 | Ui::BatchInputDialog *ui; 30 | QStandardItemModel *m_model; 31 | }; 32 | 33 | #endif // BATCHINPUTDIALOG_H 34 | -------------------------------------------------------------------------------- /src/hobbits-widgets/bitcontainermanagerui.h: -------------------------------------------------------------------------------- 1 | #ifndef BITCONTAINERMANAGERUI_H 2 | #define BITCONTAINERMANAGERUI_H 3 | 4 | #include "bitcontainertreemodel.h" 5 | #include 6 | #include "bitcontainermanager.h" 7 | #include "hobbits-widgets_global.h" 8 | 9 | class HOBBITSWIDGETSSHARED_EXPORT BitContainerManagerUi : public BitContainerManager 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | explicit BitContainerManagerUi(QObject *parent = nullptr); 15 | 16 | QSharedPointer getTreeModel(); 17 | QSharedPointer getCurrSelectionModel(); 18 | 19 | virtual QSharedPointer currentContainer() override; 20 | virtual QSharedPointer getContainerById(QUuid id) override; 21 | 22 | virtual bool addContainer(QSharedPointer container) override; 23 | virtual bool selectContainer(QSharedPointer container) override; 24 | 25 | virtual void deleteCurrentContainer() override; 26 | virtual void deleteAllContainers() override; 27 | 28 | private Q_SLOTS: 29 | void manageSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); 30 | 31 | private: 32 | QSharedPointer m_bitContainerTreeModel; 33 | QSharedPointer m_currSelectionModel; 34 | }; 35 | 36 | #endif // BITCONTAINERMANAGERUI_H 37 | -------------------------------------------------------------------------------- /src/hobbits-widgets/displayresult.cpp: -------------------------------------------------------------------------------- 1 | #include "displayresult.h" 2 | 3 | DisplayResult::DisplayResult() 4 | { 5 | 6 | } 7 | 8 | DisplayResult *DisplayResult::setImage(const QImage& image) 9 | { 10 | m_image = image; 11 | return this; 12 | } 13 | 14 | QImage DisplayResult::getImage() const 15 | { 16 | return m_image; 17 | } 18 | 19 | DisplayResult *DisplayResult::setParameters(const Parameters ¶meters) 20 | { 21 | m_parameters = parameters; 22 | return this; 23 | } 24 | 25 | const Parameters DisplayResult::parameters() const 26 | { 27 | return m_parameters; 28 | } 29 | 30 | bool DisplayResult::hasNullParameters() const 31 | { 32 | return m_parameters.isNull(); 33 | } 34 | 35 | QString DisplayResult::errorString() const 36 | { 37 | return m_errorString; 38 | } 39 | 40 | QSharedPointer DisplayResult::nullResult() 41 | { 42 | return QSharedPointer(new DisplayResult()); 43 | } 44 | 45 | QSharedPointer DisplayResult::error(QString errorString) 46 | { 47 | auto result = new DisplayResult(); 48 | result->m_errorString = errorString; 49 | return QSharedPointer(result); 50 | } 51 | 52 | QSharedPointer DisplayResult::result(const QImage& image, Parameters parameters) 53 | { 54 | return QSharedPointer((new DisplayResult())->setImage(image)->setParameters(parameters)); 55 | } 56 | -------------------------------------------------------------------------------- /src/hobbits-widgets/displayresult.h: -------------------------------------------------------------------------------- 1 | #ifndef DISPLAYRESULT_H 2 | #define DISPLAYRESULT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include "hobbits-widgets_global.h" 8 | 9 | /** 10 | * @brief The DisplayResult class contains the result of a DisplayInterface::renderDisplay() or DisplayInterface::renderOverlay() run 11 | * 12 | * \see DisplayInterface 13 | */ 14 | class HOBBITSWIDGETSSHARED_EXPORT DisplayResult 15 | { 16 | public: 17 | DisplayResult(); 18 | 19 | DisplayResult* setImage(const QImage& image); 20 | QImage getImage() const; 21 | 22 | DisplayResult* setParameters(const Parameters ¶meters); 23 | const Parameters parameters() const; 24 | 25 | bool hasNullParameters() const; 26 | QString errorString() const; 27 | 28 | static QSharedPointer nullResult(); 29 | static QSharedPointer error(QString error); 30 | static QSharedPointer result(const QImage& image, Parameters parameters); 31 | 32 | private: 33 | QImage m_image; 34 | Parameters m_parameters; 35 | QString m_errorString; 36 | 37 | }; 38 | 39 | #endif // DISPLAYRESULT_H 40 | -------------------------------------------------------------------------------- /src/hobbits-widgets/hobbits-widgets_global.h: -------------------------------------------------------------------------------- 1 | #ifndef HOBBITSWIDGETS_GLOBAL_H 2 | #define HOBBITSWIDGETS_GLOBAL_H 3 | 4 | #include 5 | 6 | #if defined(HOBBITSWIDGETS_LIBRARY) 7 | # define HOBBITSWIDGETSSHARED_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define HOBBITSWIDGETSSHARED_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // HOBBITSWIDGETS_GLOBAL_H 13 | -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-down-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-down-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-down-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-down-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-down.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-left-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-left-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-left-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-left-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-left.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-right-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-right-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-right-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-right-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-right.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-up-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-up-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-up-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-up-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/arrow-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/arrow-up.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/check-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/check-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/check-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/check-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/check-bright-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/check-bright-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/check-light-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/check-light-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/check-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/check-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/circle-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/circle-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/circle-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/circle-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/circle-bright-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/circle-bright-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/circle-light-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/circle-light-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/circle-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/circle-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/handle-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/handle-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/handle-horizontal-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/handle-horizontal-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/menu-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/menu-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/minus-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/minus-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/minus-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/minus-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/minus-bright-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/minus-bright-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/minus-light-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/minus-light-blue.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/minus-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/minus-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/size-grip-666.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/size-grip-666.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/size-grip-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/size-grip-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/tear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/tear.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/windows-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/windows-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/x-999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/x-999.png -------------------------------------------------------------------------------- /src/hobbits-widgets/images/icons/x-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/src/hobbits-widgets/images/icons/x-light.png -------------------------------------------------------------------------------- /src/hobbits-widgets/parametereditordialog.h: -------------------------------------------------------------------------------- 1 | #ifndef PARAMETEREDITORDIALOG_H 2 | #define PARAMETEREDITORDIALOG_H 3 | 4 | #include 5 | #include "parameterdelegate.h" 6 | #include "hobbits-widgets_global.h" 7 | 8 | namespace Ui { 9 | class ParameterEditorDialog; 10 | } 11 | 12 | class HOBBITSWIDGETSSHARED_EXPORT ParameterEditorDialog : public QDialog 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit ParameterEditorDialog( 18 | QSharedPointer delegate, 19 | Parameters parameters = Parameters(), 20 | QWidget *parent = nullptr); 21 | ~ParameterEditorDialog(); 22 | 23 | void setParameters(const Parameters ¶meters); 24 | Parameters parameters(); 25 | 26 | static Parameters promptForParameters(QSharedPointer delegate, Parameters parameters = Parameters()); 27 | 28 | private: 29 | Ui::ParameterEditorDialog *ui; 30 | AbstractParameterEditor *m_editor; 31 | }; 32 | 33 | #endif // PARAMETEREDITORDIALOG_H 34 | -------------------------------------------------------------------------------- /src/hobbits-widgets/parametereditorfileselect.h: -------------------------------------------------------------------------------- 1 | #ifndef PARAMETEREDITORFILESELECT_H 2 | #define PARAMETEREDITORFILESELECT_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterdelegate.h" 6 | #include 7 | #include "hobbits-widgets_global.h" 8 | 9 | class HOBBITSWIDGETSSHARED_EXPORT ParameterEditorFileSelect : public AbstractParameterEditor 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | ParameterEditorFileSelect( 15 | QFileDialog::AcceptMode acceptMode, 16 | QString fileKey = "filename", 17 | QString editorTitle = "Select File", 18 | QString stateKey = QString()); 19 | ~ParameterEditorFileSelect() override; 20 | 21 | QString title() override; 22 | 23 | bool setParameters(const Parameters ¶meters) override; 24 | Parameters parameters() override; 25 | bool isStandaloneDialog() override; 26 | 27 | private: 28 | QFileDialog *m_fileDialog; 29 | QString m_fileKey; 30 | QString m_editorTitle; 31 | }; 32 | 33 | #endif // PARAMETEREDITORFILESELECT_H 34 | -------------------------------------------------------------------------------- /src/hobbits-widgets/simpleparametereditor.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLEPARAMETEREDITOR_H 2 | #define SIMPLEPARAMETEREDITOR_H 3 | 4 | #include "abstractparametereditor.h" 5 | #include "parameterhelper.h" 6 | #include "hobbits-widgets_global.h" 7 | 8 | namespace Ui { 9 | class SimpleParameterEditor; 10 | } 11 | 12 | class HOBBITSWIDGETSSHARED_EXPORT SimpleParameterEditor : public AbstractParameterEditor 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit SimpleParameterEditor(QSharedPointer delegate, QString title); 18 | ~SimpleParameterEditor() override; 19 | 20 | QString title() override; 21 | 22 | virtual bool setParameters(const Parameters ¶meters) override; 23 | virtual Parameters parameters() override; 24 | 25 | private: 26 | Ui::SimpleParameterEditor *ui; 27 | QSharedPointer m_stateHelper; 28 | QString m_title; 29 | }; 30 | 31 | #endif // SIMPLEPARAMETEREDITOR_H 32 | -------------------------------------------------------------------------------- /src/hobbits-widgets/simpleparametereditor.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | SimpleParameterEditor 4 | 5 | 6 | 7 | 0 8 | 0 9 | 297 10 | 187 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | true 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Qt::Horizontal 27 | 28 | 29 | 30 | 268 31 | 20 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/hobbits-widgets/widgetssettings.h: -------------------------------------------------------------------------------- 1 | #ifndef WIDGETSSETTINGS_H 2 | #define WIDGETSSETTINGS_H 3 | 4 | #include "hobbits-widgets_global.h" 5 | #include 6 | #include 7 | 8 | class HOBBITSWIDGETSSHARED_EXPORT WidgetsSettings 9 | { 10 | public: 11 | WidgetsSettings(); 12 | 13 | static QString dialogDirKey(QString baseKey); 14 | static QString dialogSizeKey(QString baseKey); 15 | static QString dialogRectKey(QString baseKey); 16 | 17 | static QString getFile( 18 | QWidget *parent, 19 | const QString &caption, 20 | const QString &defaultDirectory, 21 | const QString &filter, 22 | QFileDialog::AcceptMode acceptMode, 23 | QFileDialog::FileMode fileMode, 24 | const QString &dialogSettingsKey); 25 | }; 26 | 27 | #endif // WIDGETSSETTINGS_H 28 | -------------------------------------------------------------------------------- /tests/prepare_tests.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const sevenBin = require('7zip-bin') 4 | const { extractFull } = require('node-7z') 5 | const del = require('del'); 6 | const { existsSync } = require('fs') 7 | 8 | // Delete current extracted folders 9 | let extractedTests = './extracted_tests' 10 | let testArchive = './test-archive.7z' 11 | if (existsSync(extractedTests)) { 12 | console.log(`Deleting existing ${extractedTests} folder...`) 13 | del.sync(extractedTests) 14 | } 15 | 16 | // Make new test archive 17 | const pathTo7zip = sevenBin.path7za 18 | const archiveStream = extractFull(testArchive, '.', { 19 | $bin: pathTo7zip 20 | }) 21 | 22 | archiveStream.on('end', () => { 23 | console.log(`Tests extracted into ${extractedTests}. Run them with test_hobbits.js`) 24 | }) -------------------------------------------------------------------------------- /tests/repackage_tests.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const sevenBin = require('7zip-bin') 4 | const { add } = require('node-7z') 5 | 6 | const { unlinkSync, existsSync } = require('fs') 7 | const glob = require('glob'); 8 | 9 | // Delete test output 10 | console.log(`Removing test output before archiving...`) 11 | let testOutputMatches = glob.sync('extracted_tests/**/testrunoutput.*', {nonull: false}) 12 | for (let oldOutput of testOutputMatches) { 13 | unlinkSync(oldOutput) 14 | } 15 | 16 | // Delete old test archive 17 | let testArchive = './test-archive.7z' 18 | if (existsSync(testArchive)) { 19 | console.log(`Removing old ${testArchive}...`) 20 | unlinkSync(testArchive) 21 | } 22 | 23 | // Make new test archive 24 | console.log(`Creating new archive...`) 25 | const pathTo7zip = sevenBin.path7za 26 | const archiveStream = add(testArchive, './extracted_tests', { 27 | latestTimestamp: true, 28 | recursive: true, 29 | $bin: pathTo7zip 30 | }) 31 | 32 | archiveStream.on('end', () => { 33 | console.log(`Tests packaged into ${testArchive} and ready to commit`) 34 | }) -------------------------------------------------------------------------------- /tests/test-archive.7z: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Mahlet-Inc/hobbits/edbd43d056db6505dea6eca4d1c541818869456c/tests/test-archive.7z -------------------------------------------------------------------------------- /uncrustify_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | uncrustify -c uncrustify.cfg -l CPP --no-backup `find -regex './src/.*\.\(cpp\|h\)$'` --------------------------------------------------------------------------------