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