peers.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. virtual void properties();
  35. protected slots:
  36. virtual void languageChange();
  37. virtual void closeEvent(QCloseEvent *event);
  38. private:
  39. void add_station(QString info);
  40. void add_stations();
  41. void add_single_station(const char *addr);
  42. void add_scan_results();
  43. void update_peers();
  44. QStandardItem * find_addr(QString addr);
  45. QStandardItem * find_uuid(QString uuid);
  46. void done(int r);
  47. void remove_enrollee_uuid(QString uuid);
  48. QString ItemType(int type);
  49. WpaGui *wpagui;
  50. QStandardItemModel model;
  51. QIcon *default_icon;
  52. QIcon *ap_icon;
  53. QIcon *laptop_icon;
  54. QStandardItem *ctx_item;
  55. };
  56. #endif /* PEERS_H */