QHexEditor Class.  
 More...
#include <qhexeditor.hpp>
Inherits QHexView.
|  | 
| void | changed (bool status=true) | 
|  | Triggered when data is changed, loaded or saved.  More... 
 | 
|  | 
QHexEditor Class. 
An hexadecimal editor widget, based in QHexView. 
◆ QHexEditorMode
Hex Editor Mode (bits grouping). 
| Enumerator | 
|---|
| Mode8Bits | 8 Bits Mode.  | 
| Mode16Bits | 16 Bits Mode.  | 
| Mode32Bits | 32 Bits Mode.  | 
 
 
◆ QHexEditor()
Constructor. 
- Parameters
- 
  
    | parent | Pointer to parent object (default = nullptr). |  
 
 
 
◆ open()
      
        
          | bool open | ( | const QString & | filename | ) |  | 
      
 
Opens a file. 
- Parameters
- 
  
  
- Returns
- True if success, false otherwise. 
 
 
◆ save()
Saves data onto a file. 
- Returns
- True if success, false otherwise. 
 
 
◆ saveAs()
Saves loaded data as another file. 
- Parameters
- 
  
    | type | Type of the file. |  | filename | The filename. |  
 
- Returns
- True if success, false otherwise. 
 
 
◆ putData()
      
        
          | void putData | ( | const QByteArray & | data | ) |  | 
      
 
Puts the data into the editor. 
- Parameters
- 
  
  
 
 
◆ getData()
      
        
          | QByteArray getData | ( | void |  | ) | const | 
      
 
Gets the data from the editor. 
- Returns
- Data buffer. 
 
 
◆ fill()
      
        
          | void fill | ( | quint8 | value = 0xFF | ) |  | 
      
 
Fills all data with a value. 
- Parameters
- 
  
    | value | Value to fill (default = 0xFF). |  
 
 
 
◆ random()
Fills all data with random values. 
 
 
◆ setSize()
      
        
          | void setSize | ( | qint32 | value | ) |  | 
      
 
Sets the data size of the viewer. 
- Parameters
- 
  
    | value | Data size, in bytes. |  
 
 
 
◆ size()
      
        
          | qint32 size | ( | void |  | ) | const | 
      
 
Gets the data size of the viewer. 
- Returns
- Data size, in bytes. 
 
 
◆ setMode()
Sets the bit grouping mode. 
- Parameters
- 
  
  
 
 
◆ mode()
Gets the current bit grouping mode. 
- Returns
- Bit grouping mode. 
 
 
◆ filename()
      
        
          | const QString & filename | ( | void |  | ) | const | 
      
 
Gets the current loaded filename. 
- Returns
- Filename, or empty if nothing loaded. 
 
 
◆ isChanged()
      
        
          | bool isChanged | ( | void |  | ) | const | 
      
 
Returns if current data is changed and not saved. 
- Returns
- True if data is changed and not saved, false otherwise. 
 
 
◆ showFindDialog()
      
        
          | void showFindDialog | ( | void |  | ) |  | 
      
 
 
◆ showReplaceDialog()
      
        
          | void showReplaceDialog | ( | void |  | ) |  | 
      
 
Shows the Replace Dialog. 
 
 
◆ getAdd16()
      
        
          | uint32_t getAdd16 | ( | void |  | ) | const | 
      
 
Returns the checksum (ADD16) of the data. 
- Returns
- Checksum of the data. 
 
 
◆ getCrc32()
      
        
          | uint32_t getCrc32 | ( | void |  | ) | const | 
      
 
Returns the checksum (CRC32) of the data. 
- Returns
- Checksum of the data. 
 
 
◆ isFullFF()
      
        
          | bool isFullFF | ( | void |  | ) | const | 
      
 
Returns if is full filled with 0xFF. 
- Returns
- True if full data is 0xFF. False otherwise. 
 
 
◆ changed
  
  | 
        
          | void changed | ( | bool | status = true | ) |  |  | signal | 
 
Triggered when data is changed, loaded or saved. 
- Parameters
- 
  
    | status | True if data is changed and not saved, false otherwise. |  
 
 
 
The documentation for this class was generated from the following files: