peers.h 1.5 KB

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