File indexing completed on 2024-04-28 05:41:05
0001 /* 0002 Copyright (C) 2013-2014 Volker Krause <vkrause@kde.org> 0003 0004 This program is free software; you can redistribute it and/or modify it 0005 under the terms of the GNU Library General Public License as published by 0006 the Free Software Foundation; either version 2 of the License, or (at your 0007 option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, but WITHOUT 0010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 0012 License for more details. 0013 0014 You should have received a copy of the GNU General Public License 0015 along with this program. If not, see <https://www.gnu.org/licenses/>. 0016 */ 0017 0018 #ifndef MAINWINDOW_H 0019 #define MAINWINDOW_H 0020 0021 #include <QMainWindow> 0022 0023 #include <memory> 0024 0025 class ElfFileSet; 0026 class ElfModel; 0027 0028 namespace Ui 0029 { 0030 class MainWindow; 0031 } 0032 0033 class MainWindow : public QMainWindow 0034 { 0035 Q_OBJECT 0036 public: 0037 explicit MainWindow(QWidget* parent = nullptr); 0038 ~MainWindow(); 0039 0040 void loadFile(const QString &fileName); 0041 0042 protected: 0043 void closeEvent(QCloseEvent *event) override; 0044 0045 private slots: 0046 void fileOpen(); 0047 void reloadFileOnStartup(); 0048 void currentViewChanged(); 0049 0050 private: 0051 void restoreSettings(); 0052 0053 private: 0054 std::unique_ptr<Ui::MainWindow> ui; 0055 QString m_currentFileName; 0056 ElfModel *m_elfModel = nullptr; 0057 std::unique_ptr<ElfFileSet> m_fileSet; 0058 }; 0059 0060 #endif // MAINWINDOW_H