You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

searchfellowdlg.h 841 B

8 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef SEARCHFELLOWDLG_H
  2. #define SEARCHFELLOWDLG_H
  3. #include <QDialog>
  4. #include <functional>
  5. #include <vector>
  6. #include "feiqlib/fellow.h"
  7. using namespace std;
  8. namespace Ui {
  9. class SearchFellowDlg;
  10. }
  11. class SearchFellowDlg : public QDialog
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit SearchFellowDlg(QWidget *parent = 0);
  16. ~SearchFellowDlg();
  17. void setSearchDriver(function<vector<const Fellow*>(const QString &)> driver);
  18. signals:
  19. void onFellowSelected(const Fellow* fellow);
  20. public slots:
  21. void search(const QString& text);
  22. void searchDone();
  23. protected:
  24. virtual void showEvent(QShowEvent *) override;
  25. private:
  26. void loadAllFellows();
  27. private:
  28. Ui::SearchFellowDlg *ui;
  29. function<vector<const Fellow*>(const QString& text)> mSearchDriver;
  30. vector<const Fellow*> mCurResult;
  31. };
  32. #endif // SEARCHFELLOWDLG_H

mac下的“飞秋”大多数只是飞鸽传书协议,而且未发现令人满意的开源项目,所以基于c++与qt实现了基础的飞秋协议。

Contributors (1)