| 827 | } |
| 828 | |
| 829 | QString DisassemblyView::GetDisassemblyTitleLine() |
| 830 | { |
| 831 | // Disassembly column title line based on format created by DisassemblyStringFromAddress() |
| 832 | QString title_line_string; |
| 833 | |
| 834 | // Determine layout of disassembly row. Layout depends on user setting "Show Instruction Bytes". |
| 835 | const bool show_instruction_bytes = m_showInstructionBytes && cpu().isAlive(); |
| 836 | if (show_instruction_bytes) |
| 837 | { |
| 838 | title_line_string = QCoreApplication::translate("DisassemblyViewColumnTitle", " %1 %2 %3 %4"); |
| 839 | } |
| 840 | else |
| 841 | { |
| 842 | title_line_string = QCoreApplication::translate("DisassemblyViewColumnTitle", " %1 %2 %3"); |
| 843 | } |
| 844 | |
| 845 | // First 2 chars in disassembly row is always for non-returning functions (NR) |
| 846 | // Do not display column title for this field. |
| 847 | title_line_string = title_line_string.arg(" "); |
| 848 | |
| 849 | // Second column title is always address of instruction |
| 850 | title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyViewColumnTitle", "Location")); |
| 851 | |
| 852 | // If user specified to "Show Instruction Bytes", third column is opcode + args |
| 853 | if (show_instruction_bytes) |
| 854 | { |
| 855 | title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyViewColumnTitle", "Bytes ")); |
| 856 | } |
| 857 | |
| 858 | // Last column title is always disassembled instruction |
| 859 | title_line_string = title_line_string.arg(QCoreApplication::translate("DisassemblyViewColumnTitle", "Instruction")); |
| 860 | |
| 861 | return title_line_string; |
| 862 | } |
| 863 | |
| 864 | QColor DisassemblyView::GetDisassemblyTitleLineColor() |
| 865 | { |