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

mainwindow.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QLabel>
  5. #include <QSystemTrayIcon>
  6. #include <QCloseEvent>
  7. #include <QSettings>
  8. #include "netsoul.h"
  9. #include "dialogaddcontact.h"
  10. #include "chatmanager.h"
  11. #include "options.h"
  12. #include "dialogoptions.h"
  13. namespace Ui {
  14. class MainWindow;
  15. }
  16. class MainWindow : public QMainWindow
  17. {
  18. Q_OBJECT
  19. public:
  20. explicit MainWindow(QWidget *parent = 0);
  21. ~MainWindow();
  22. protected:
  23. void closeEvent(QCloseEvent *);
  24. public slots:
  25. void showAndRaise();
  26. void toggleVisibility();
  27. void options();
  28. void addContact();
  29. void addContact(QString contact);
  30. void addContacts(QStringList contacts);
  31. void removeContacts(QStringList contacts);
  32. private slots:
  33. void nsStateChanged(NetSoul::State s);
  34. void nsUnknownCommand(QString cmd);
  35. void trayActivated(QSystemTrayIcon::ActivationReason r);
  36. private:
  37. Ui::MainWindow *ui;
  38. NetSoul* m_netsoul;
  39. QLabel* m_labelState;
  40. QSystemTrayIcon* m_tray;
  41. QStringList m_contacts;
  42. ChatManager* m_chatMgr;
  43. };
  44. #endif // MAINWINDOW_H