├── README.md ├── xdepends_source.pro ├── gui_source ├── gui_source.pro ├── main_gui.cpp ├── guimainwindow.h ├── guimainwindow.ui └── guimainwindow.cpp ├── LICENSE ├── global.h └── .gitmodules /README.md: -------------------------------------------------------------------------------- 1 | XDepends -------------------------------------------------------------------------------- /xdepends_source.pro: -------------------------------------------------------------------------------- 1 | TEMPLATE = subdirs 2 | 3 | SUBDIRS += build_libs 4 | SUBDIRS += gui_source 5 | 6 | isEmpty(PREFIX) { 7 | PREFIX = /usr 8 | } 9 | 10 | target.path = $PWD 11 | target.commands = bash -x "$$PWD/install.sh $$PREFIX" 12 | INSTALLS += target -------------------------------------------------------------------------------- /gui_source/gui_source.pro: -------------------------------------------------------------------------------- 1 | QT += core gui 2 | 3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 4 | 5 | CONFIG += c++11 6 | 7 | SOURCES += \ 8 | dialogoptions.cpp \ 9 | guimainwindow.cpp \ 10 | main_gui.cpp 11 | 12 | HEADERS += \ 13 | dialogoptions.h \ 14 | guimainwindow.h 15 | 16 | FORMS += \ 17 | dialogoptions.ui \ 18 | guimainwindow.ui 19 | 20 | include(../build.pri) 21 | 22 | XCONFIG += use_disasm 23 | XCONFIG += use_extrabuttons 24 | 25 | !contains(XCONFIG, archive_widget) { 26 | XCONFIG += archive_widget 27 | include(../archive_widget/archive_widget.pri) 28 | } 29 | 30 | !contains(XCONFIG, dialogattachprocess) { 31 | XCONFIG += dialogattachprocess 32 | include(../../_mylibs/XProcessWidget/dialogattachprocess.pri) 33 | } 34 | 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021-2025 hors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /global.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2022-2023 hors 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, 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, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | * SOFTWARE. 20 | */ 21 | #ifndef _GLOBAL_H 22 | #define _GLOBAL_H 23 | 24 | #include 25 | 26 | #define X_APPLICATIONDISPLAYNAME "XDepends" 27 | #define X_APPLICATIONNAME "xdepends" 28 | #define X_APPLICATIONVERSION "0.01" 29 | #define X_ORGANIZATIONNAME "NTInfo" 30 | #define X_ORGANIZATIONDOMAIN "ntinfo.biz" 31 | #define X_OPTIONSFILE "xdepends.ini" 32 | #define X_SHORTCUTSFILE "shortcuts.ini" 33 | 34 | #endif // _GLOBAL_H 35 | -------------------------------------------------------------------------------- /gui_source/main_gui.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2022-2023 hors 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, 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, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | * SOFTWARE. 20 | */ 21 | #include "guimainwindow.h" 22 | #include 23 | #include 24 | 25 | int main(int argc,char *argv[]) 26 | { 27 | #if QT_VERSION >= QT_VERSION_CHECK(5,6,0) 28 | QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); 29 | #endif 30 | #ifdef Q_OS_MAC 31 | #ifndef QT_DEBUG 32 | QCoreApplication::setLibraryPaths(QStringList(QString(argv[0]).remove("MacOS/XDepends")+"PlugIns")); 33 | #endif 34 | #endif 35 | QCoreApplication::setOrganizationName(X_ORGANIZATIONNAME); 36 | QCoreApplication::setOrganizationDomain(X_ORGANIZATIONDOMAIN); 37 | QCoreApplication::setApplicationName(X_APPLICATIONNAME); 38 | QCoreApplication::setApplicationVersion(X_APPLICATIONVERSION); 39 | 40 | if((argc==2)&&((QString(argv[1])=="--version")||(QString(argv[1])=="-v"))) 41 | { 42 | QString sInfo=QString("%1 v%2").arg(X_APPLICATIONDISPLAYNAME,X_APPLICATIONVERSION); 43 | printf("%s\n",sInfo.toUtf8().data()); 44 | 45 | return 0; 46 | } 47 | 48 | QApplication a(argc,argv); 49 | // TODO set main image 50 | 51 | XOptions xOptions; 52 | 53 | xOptions.setName(X_OPTIONSFILE); 54 | 55 | xOptions.addID(XOptions::ID_VIEW_FONT,""); 56 | xOptions.addID(XOptions::ID_VIEW_LANG,"System"); 57 | xOptions.addID(XOptions::ID_VIEW_QSS); 58 | xOptions.addID(XOptions::ID_VIEW_STYLE,"Fusion"); 59 | 60 | xOptions.load(); 61 | 62 | XOptions::adjustApplicationView(X_APPLICATIONNAME,&xOptions); 63 | 64 | GuiMainWindow w; 65 | w.show(); 66 | 67 | return a.exec(); 68 | } 69 | -------------------------------------------------------------------------------- /gui_source/guimainwindow.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2022-2023 hors 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, 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, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | * SOFTWARE. 20 | */ 21 | #ifndef GUIMAINWINDOW_H 22 | #define GUIMAINWINDOW_H 23 | 24 | #include "../global.h" 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include "dialogattachprocess.h" 30 | #include "dialogoptions.h" 31 | #include "dialogpe.h" 32 | #include "dialogshortcuts.h" 33 | #include "xformats.h" 34 | #include "xoptions.h" 35 | 36 | namespace Ui { 37 | class GuiMainWindow; 38 | } 39 | 40 | class GuiMainWindow : public QMainWindow 41 | { 42 | Q_OBJECT 43 | 44 | enum MODE 45 | { 46 | MODE_UNKNOWN=0, 47 | MODE_FILE, 48 | MODE_PROCESS 49 | }; 50 | 51 | public: 52 | GuiMainWindow(QWidget *pParent=nullptr); 53 | ~GuiMainWindow(); 54 | 55 | private slots: 56 | void adjustWindow(); 57 | void processFile(QString sFileName); 58 | void closeCurrent(); 59 | void setMode(MODE mode); 60 | void on_pushButtonFile_clicked(); 61 | void on_pushButtonProcess_clicked(); 62 | void on_pushButtonViewer_clicked(); 63 | void on_pushButtonSave_clicked(); 64 | void on_pushButtonReload_clicked(); 65 | void on_pushButtonOptions_clicked(); 66 | void on_pushButtonShortcuts_clicked(); 67 | void on_pushButtonAbout_clicked(); 68 | void on_pushButtonExit_clicked(); 69 | void on_checkBoxRecursive_toggled(bool bChecked); 70 | 71 | protected: 72 | void dragEnterEvent(QDragEnterEvent *pEvent) override; 73 | void dragMoveEvent(QDragMoveEvent *pEvent) override; 74 | void dropEvent(QDropEvent *pEvent) override; 75 | 76 | private: 77 | Ui::GuiMainWindow *ui; 78 | XOptions g_xOptions; 79 | XShortcuts g_xShortcuts; 80 | MODE g_mode; 81 | }; 82 | #endif // GUIMAINWINDOW_H 83 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Formats"] 2 | path = Formats 3 | url = https://github.com/horsicq/Formats 4 | [submodule "StaticScan"] 5 | path = StaticScan 6 | url = https://github.com/horsicq/StaticScan 7 | [submodule "SpecAbstract"] 8 | path = SpecAbstract 9 | url = https://github.com/horsicq/SpecAbstract 10 | [submodule "XArchive"] 11 | path = XArchive 12 | url = https://github.com/horsicq/XArchive 13 | [submodule "XDEX"] 14 | path = XDEX 15 | url = https://github.com/horsicq/XDEX 16 | [submodule "XOptions"] 17 | path = XOptions 18 | url = https://github.com/horsicq/XOptions 19 | [submodule "XStyles"] 20 | path = XStyles 21 | url = https://github.com/horsicq/XStyles 22 | [submodule "XTranslation"] 23 | path = XTranslation 24 | url = https://github.com/horsicq/XTranslation 25 | [submodule "XHashWidget"] 26 | path = XHashWidget 27 | url = https://github.com/horsicq/XHashWidget 28 | [submodule "XCapstone"] 29 | path = XCapstone 30 | url = https://github.com/horsicq/XCapstone 31 | [submodule "archive_widget"] 32 | path = archive_widget 33 | url = https://github.com/horsicq/archive_widget 34 | [submodule "nfd_widget"] 35 | path = nfd_widget 36 | url = https://github.com/horsicq/nfd_widget 37 | [submodule "Controls"] 38 | path = Controls 39 | url = https://github.com/horsicq/Controls 40 | [submodule "FormatDialogs"] 41 | path = FormatDialogs 42 | url = https://github.com/horsicq/FormatDialogs 43 | [submodule "FormatWidgets"] 44 | path = FormatWidgets 45 | url = https://github.com/horsicq/FormatWidgets 46 | [submodule "XHexView"] 47 | path = XHexView 48 | url = https://github.com/horsicq/XHexView 49 | [submodule "XDisasmView"] 50 | path = XDisasmView 51 | url = https://github.com/horsicq/XDisasmView 52 | [submodule "XEntropyWidget"] 53 | path = XEntropyWidget 54 | url = https://github.com/horsicq/XEntropyWidget 55 | [submodule "XMemoryMapWidget"] 56 | path = XMemoryMapWidget 57 | url = https://github.com/horsicq/XMemoryMapWidget 58 | [submodule "XQwt"] 59 | path = XQwt 60 | url = https://github.com/horsicq/XQwt 61 | [submodule "XShortcuts"] 62 | path = XShortcuts 63 | url = https://github.com/horsicq/XShortcuts 64 | [submodule "signatures"] 65 | path = signatures 66 | url = https://github.com/horsicq/signatures 67 | [submodule "XDemangle"] 68 | path = XDemangle 69 | url = https://github.com/horsicq/XDemangle 70 | [submodule "XDemangleWidget"] 71 | path = XDemangleWidget 72 | url = https://github.com/horsicq/XDemangleWidget 73 | [submodule "build_tools"] 74 | path = build_tools 75 | url = https://github.com/horsicq/build_tools 76 | [submodule "XCppfilt"] 77 | path = XCppfilt 78 | url = https://github.com/horsicq/XCppfilt 79 | [submodule "XDynStructs"] 80 | path = XDynStructs 81 | url = https://github.com/horsicq/XDynStructs 82 | [submodule "XDynStructsEngine"] 83 | path = XDynStructsEngine 84 | url = https://github.com/horsicq/XDynStructsEngine 85 | [submodule "XDynStructsWidget"] 86 | path = XDynStructsWidget 87 | url = https://github.com/horsicq/XDynStructsWidget 88 | [submodule "XFileInfo"] 89 | path = XFileInfo 90 | url = https://github.com/horsicq/XFileInfo 91 | [submodule "XPDF"] 92 | path = XPDF 93 | url = https://github.com/horsicq/XPDF 94 | [submodule "XInfoDB"] 95 | path = XInfoDB 96 | url = https://github.com/horsicq/XInfoDB 97 | [submodule "XSymbolsWidget"] 98 | path = XSymbolsWidget 99 | url = https://github.com/horsicq/XSymbolsWidget 100 | [submodule "XOnlineTools"] 101 | path = XOnlineTools 102 | url = https://github.com/horsicq/XOnlineTools 103 | [submodule "XAboutWidget"] 104 | path = XAboutWidget 105 | url = https://github.com/horsicq/XAboutWidget 106 | [submodule "die_script"] 107 | path = die_script 108 | url = https://github.com/horsicq/die_script 109 | [submodule "hex_templates"] 110 | path = hex_templates 111 | url = https://github.com/horsicq/hex_templates 112 | [submodule "XExtractorWidget"] 113 | path = XExtractorWidget 114 | url = https://github.com/horsicq/XExtractorWidget 115 | [submodule "XExtractor"] 116 | path = XExtractor 117 | url = https://github.com/horsicq/XExtractor 118 | [submodule "XUpdate"] 119 | path = XUpdate 120 | url = https://github.com/horsicq/XUpdate 121 | [submodule "XGithub"] 122 | path = XGithub 123 | url = https://github.com/horsicq/XGithub 124 | [submodule "XVisualizationWidget"] 125 | path = XVisualizationWidget 126 | url = https://github.com/horsicq/XVisualizationWidget 127 | [submodule "XDecompiler"] 128 | path = XDecompiler 129 | url = https://github.com/horsicq/XDecompiler 130 | [submodule "XYara"] 131 | path = XYara 132 | url = https://github.com/horsicq/XYara 133 | [submodule "yara_widget"] 134 | path = yara_widget 135 | url = https://github.com/horsicq/yara_widget 136 | [submodule "die_widget"] 137 | path = die_widget 138 | url = https://github.com/horsicq/die_widget 139 | [submodule "Detect-It-Easy"] 140 | path = Detect-It-Easy 141 | url = https://github.com/horsicq/Detect-It-Easy 142 | [submodule "XDataConvertorWidget"] 143 | path = XDataConvertorWidget 144 | url = https://github.com/horsicq/XDataConvertorWidget 145 | [submodule "XScanEngine"] 146 | path = XScanEngine 147 | url = https://github.com/horsicq/XScanEngine 148 | [submodule "XDisasmCore"] 149 | path = XDisasmCore 150 | url = https://github.com/horsicq/XDisasmCore.git 151 | [submodule "XRegionsWidget"] 152 | path = XRegionsWidget 153 | url = https://github.com/horsicq/XRegionsWidget.git 154 | [submodule "XHexEdit"] 155 | path = XHexEdit 156 | url = https://github.com/horsicq/XHexEdit.git 157 | [submodule "XStaticUnpacker"] 158 | path = XStaticUnpacker 159 | url = https://github.com/horsicq/XStaticUnpacker 160 | -------------------------------------------------------------------------------- /gui_source/guimainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | GuiMainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 827 10 | 533 11 | 12 | 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | File name 27 | 28 | 29 | 30 | 0 31 | 32 | 33 | 0 34 | 35 | 36 | 0 37 | 38 | 39 | 0 40 | 41 | 42 | 43 | 44 | true 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | File 57 | 58 | 59 | 60 | 61 | 62 | 63 | Process 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 75 78 | 0 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | Recursive 90 | 91 | 92 | 93 | 94 | 95 | 96 | Qt::Horizontal 97 | 98 | 99 | 100 | 40 101 | 20 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | Save 110 | 111 | 112 | 113 | 114 | 115 | 116 | Reload 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | Options 131 | 132 | 133 | 134 | 135 | 136 | 137 | Shortcuts 138 | 139 | 140 | 141 | 142 | 143 | 144 | Qt::Horizontal 145 | 146 | 147 | 148 | 40 149 | 20 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | About 158 | 159 | 160 | 161 | 162 | 163 | 164 | Exit 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | -------------------------------------------------------------------------------- /gui_source/guimainwindow.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2022-2023 hors 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy 4 | * of this software and associated documentation files (the "Software"), to deal 5 | * in the Software without restriction, including without limitation the rights 6 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | * copies of the Software, and to permit persons to whom the Software is 8 | * furnished to do so, 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, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | * SOFTWARE. 20 | */ 21 | #include "guimainwindow.h" 22 | #include "ui_guimainwindow.h" 23 | 24 | GuiMainWindow::GuiMainWindow(QWidget *pParent) 25 | : QMainWindow(pParent), 26 | ui(new Ui::GuiMainWindow) 27 | { 28 | ui->setupUi(this); 29 | 30 | g_mode=MODE_UNKNOWN; 31 | 32 | setWindowTitle(XOptions::getTitle(X_APPLICATIONDISPLAYNAME,X_APPLICATIONVERSION)); 33 | 34 | setAcceptDrops(true); 35 | 36 | g_xOptions.setName(X_OPTIONSFILE); 37 | 38 | g_xOptions.addID(XOptions::ID_VIEW_STYLE,"Fusion"); 39 | g_xOptions.addID(XOptions::ID_VIEW_QSS,""); 40 | g_xOptions.addID(XOptions::ID_VIEW_LANG,"System"); 41 | g_xOptions.addID(XOptions::ID_VIEW_STAYONTOP,false); 42 | g_xOptions.addID(XOptions::ID_VIEW_FONT,""); 43 | g_xOptions.addID(XOptions::ID_FILE_SAVELASTDIRECTORY,true); 44 | g_xOptions.addID(XOptions::ID_FILE_SAVEBACKUP,true); 45 | g_xOptions.addID(XOptions::ID_FILE_SAVERECENTFILES,true); 46 | 47 | #ifdef Q_OS_WIN 48 | g_xOptions.addID(XOptions::ID_FILE_CONTEXT,"*"); 49 | #endif 50 | 51 | StaticScanOptionsWidget::setDefaultValues(&g_xOptions); 52 | SearchSignaturesOptionsWidget::setDefaultValues(&g_xOptions); 53 | XHexViewOptionsWidget::setDefaultValues(&g_xOptions); 54 | XDisasmViewOptionsWidget::setDefaultValues(&g_xOptions); 55 | 56 | g_xOptions.load(); 57 | 58 | g_xShortcuts.setName(X_SHORTCUTSFILE); 59 | g_xShortcuts.setNative(g_xOptions.isNative()); 60 | 61 | g_xShortcuts.addGroup(XShortcuts::GROUPID_STRINGS); 62 | g_xShortcuts.addGroup(XShortcuts::GROUPID_SIGNATURES); 63 | g_xShortcuts.addGroup(XShortcuts::GROUPID_HEX); 64 | g_xShortcuts.addGroup(XShortcuts::GROUPID_DISASM); 65 | 66 | g_xShortcuts.load(); 67 | 68 | adjustWindow(); 69 | 70 | if(QCoreApplication::arguments().count()>1) 71 | { 72 | QString sFileName=QCoreApplication::arguments().at(1); 73 | 74 | processFile(sFileName); 75 | } 76 | } 77 | 78 | GuiMainWindow::~GuiMainWindow() 79 | { 80 | delete ui; 81 | } 82 | 83 | void GuiMainWindow::adjustWindow() 84 | { 85 | g_xOptions.adjustWindow(this); 86 | } 87 | 88 | void GuiMainWindow::processFile(QString sFileName) 89 | { 90 | if(sFileName!="") 91 | { 92 | 93 | closeCurrent(); 94 | } 95 | } 96 | 97 | void GuiMainWindow::closeCurrent() 98 | { 99 | // TODO 100 | } 101 | 102 | void GuiMainWindow::setMode(MODE mode) 103 | { 104 | if(mode==MODE_FILE) 105 | { 106 | ui->checkBoxRecursive->show(); 107 | } 108 | else if(mode==MODE_PROCESS) 109 | { 110 | ui->checkBoxRecursive->hide(); 111 | } 112 | 113 | g_mode=mode; 114 | } 115 | 116 | void GuiMainWindow::on_pushButtonFile_clicked() 117 | { 118 | 119 | } 120 | 121 | void GuiMainWindow::on_pushButtonProcess_clicked() 122 | { 123 | DialogAttachProcess dialogAttachProcess(this); 124 | 125 | if(dialogAttachProcess.exec()==QDialog::Accepted) 126 | { 127 | // TODO 128 | } 129 | } 130 | 131 | void GuiMainWindow::on_pushButtonViewer_clicked() 132 | { 133 | 134 | } 135 | 136 | void GuiMainWindow::on_pushButtonSave_clicked() 137 | { 138 | 139 | } 140 | 141 | void GuiMainWindow::on_pushButtonReload_clicked() 142 | { 143 | 144 | } 145 | 146 | void GuiMainWindow::on_pushButtonOptions_clicked() 147 | { 148 | DialogOptions dialogOptions(this,&g_xOptions); 149 | dialogOptions.exec(); 150 | 151 | adjustWindow(); 152 | } 153 | 154 | void GuiMainWindow::on_pushButtonShortcuts_clicked() 155 | { 156 | DialogShortcuts dialogShortcuts(this); 157 | 158 | dialogShortcuts.setData(&g_xShortcuts); 159 | 160 | dialogShortcuts.exec(); 161 | 162 | adjustWindow(); 163 | } 164 | 165 | void GuiMainWindow::on_pushButtonAbout_clicked() 166 | { 167 | 168 | } 169 | 170 | void GuiMainWindow::on_pushButtonExit_clicked() 171 | { 172 | this->close(); 173 | } 174 | 175 | void GuiMainWindow::dragEnterEvent(QDragEnterEvent *pEvent) 176 | { 177 | pEvent->acceptProposedAction(); 178 | } 179 | 180 | void GuiMainWindow::dragMoveEvent(QDragMoveEvent *pEvent) 181 | { 182 | pEvent->acceptProposedAction(); 183 | } 184 | 185 | void GuiMainWindow::dropEvent(QDropEvent *pEvent) 186 | { 187 | const QMimeData* mimeData=pEvent->mimeData(); 188 | 189 | if(mimeData->hasUrls()) 190 | { 191 | QList urlList=mimeData->urls(); 192 | 193 | if(urlList.count()) 194 | { 195 | QString sFileName=urlList.at(0).toLocalFile(); 196 | 197 | sFileName=XBinary::convertFileName(sFileName); 198 | 199 | processFile(sFileName); 200 | } 201 | } 202 | } 203 | 204 | void GuiMainWindow::on_checkBoxRecursive_toggled(bool bChecked) 205 | { 206 | // TODO 207 | } 208 | --------------------------------------------------------------------------------