#ifndef MAINWINDOW_H #define MAINWINDOW_H #include "finder.h" #include "word_list.h" #include #include #include #include QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } QT_END_NAMESPACE class MainWindow : public QMainWindow { Q_OBJECT private: WordList word_list_; QStringListModel result_model_; QStandardItemModel search_algorithms_; QStandardItemModel word_list_sources_; std::unique_ptr finder_; public: MainWindow(QWidget *parent = nullptr); ~MainWindow(); private: void setupAlgorithmSelector(); void setupWordListSourceSelector(); void setupWordList(); void generateWordList(); void loadWordList(std::filesystem::path path); void search(const QString &search_term); void createSelectedFinder(); void showResults(const WordRefList &results); private slots: void on_searchInput_textChanged(const QString &search_term); void on_searchAlgorithmSelector_currentIndexChanged(int); void on_wordListSourceSelector_currentIndexChanged(int); void on_wordListSizeSelector_valueChanged(int); private: Ui::MainWindow *ui; }; #endif // MAINWINDOW_H