#pragma once #include #include #include #include #include "Utilities/bin_patch.h" namespace Ui { class patch_manager_dialog; } class patch_manager_dialog : public QDialog { Q_OBJECT public: explicit patch_manager_dialog(QWidget* parent = nullptr); ~patch_manager_dialog(); private Q_SLOTS: void filter_patches(const QString& term); void on_item_selected(QTreeWidgetItem *current, QTreeWidgetItem *previous); void on_item_changed(QTreeWidgetItem *item, int column); void on_custom_context_menu_requested(const QPoint& pos); void on_legacy_patches_enabled(int state); private: void refresh(); void load_patches(); void populate_tree(); void save_config(); void update_patch_info(const patch_engine::patch_info& info); bool is_valid_file(const QMimeData& md, QStringList* drop_paths = nullptr); patch_engine::patch_map m_map; bool m_legacy_patches_enabled = false; Ui::patch_manager_dialog *ui; protected: void dropEvent(QDropEvent* event) override; void dragEnterEvent(QDragEnterEvent* event) override; void dragMoveEvent(QDragMoveEvent* event) override; void dragLeaveEvent(QDragLeaveEvent* event) override; };