peers.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * wpa_gui - Peers class
  3. * Copyright (c) 2009, Atheros Communications
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef PEERS_H
  15. #define PEERS_H
  16. #include <QObject>
  17. #include <QStandardItemModel>
  18. #include "wpamsg.h"
  19. #include "ui_peers.h"
  20. class WpaGui;
  21. class Peers : public QDialog, public Ui::Peers
  22. {
  23. Q_OBJECT
  24. public:
  25. Peers(QWidget *parent = 0, const char *name = 0,
  26. bool modal = false, Qt::WFlags fl = 0);
  27. ~Peers();
  28. void setWpaGui(WpaGui *_wpagui);
  29. void event_notify(WpaMsg msg);
  30. public slots:
  31. virtual void context_menu(const QPoint &pos);
  32. virtual void enter_pin();
  33. virtual void ctx_refresh();
  34. protected slots:
  35. virtual void languageChange();
  36. private:
  37. void add_station(QString info);
  38. void add_stations();
  39. void add_single_station(const char *addr);
  40. void add_scan_results();
  41. void update_peers();
  42. QStandardItem * find_addr(QString addr);
  43. WpaGui *wpagui;
  44. QStandardItemModel model;
  45. QIcon *default_icon;
  46. QStandardItem *ctx_item;
  47. };
  48. #endif /* PEERS_H */