#ifndef SEARCHFELLOWDLG_H #define SEARCHFELLOWDLG_H #include #include #include #include "feiqlib/fellow.h" using namespace std; namespace Ui { class SearchFellowDlg; } class SearchFellowDlg : public QDialog { Q_OBJECT public: explicit SearchFellowDlg(QWidget *parent = 0); ~SearchFellowDlg(); void setSearchDriver(function(const QString &)> driver); signals: void onFellowSelected(const Fellow* fellow); public slots: void search(const QString& text); void searchDone(); protected: virtual void showEvent(QShowEvent *) override; private: void loadAllFellows(); private: Ui::SearchFellowDlg *ui; function(const QString& text)> mSearchDriver; vector mCurResult; }; #endif // SEARCHFELLOWDLG_H