2
0

mainwindow.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
  3. * Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
  4. *
  5. * Version: MPL 1.1
  6. *
  7. * The contents of this file are subject to the Mozilla Public License Version
  8. * 1.1 (the "License"); you may not use this file except in compliance with
  9. * the License. You may obtain a copy of the License at
  10. * http://www.mozilla.org/MPL/
  11. *
  12. * Software distributed under the License is distributed on an "AS IS" basis,
  13. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  14. * for the specific language governing rights and limitations under the
  15. * License.
  16. *
  17. * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
  18. *
  19. * The Initial Developer of the Original Code is
  20. * Anthony Minessale II <anthm@freeswitch.org>
  21. * Portions created by the Initial Developer are Copyright (C)
  22. * the Initial Developer. All Rights Reserved.
  23. *
  24. * Contributor(s):
  25. *
  26. * Joao Mesquita <jmesquita@freeswitch.org>
  27. *
  28. */
  29. #ifndef MAINWINDOW_H
  30. #define MAINWINDOW_H
  31. #include <QMainWindow>
  32. #include <QTableWidgetItem>
  33. #include <QSignalMapper>
  34. #include <QSystemTrayIcon>
  35. #include <switch.h>
  36. #include <fshost.h>
  37. #include <call.h>
  38. #include <account.h>
  39. #include "preferences/prefdialog.h"
  40. #include "debugtools/consolewindow.h"
  41. #include "debugtools/statedebugdialog.h"
  42. namespace Ui {
  43. class MainWindow;
  44. }
  45. class MainWindow : public QMainWindow {
  46. Q_OBJECT
  47. public:
  48. MainWindow(QWidget *parent = 0);
  49. ~MainWindow();
  50. protected:
  51. void changeEvent(QEvent *e);
  52. signals:
  53. void dtmfDialed(QString);
  54. private slots:
  55. void showAbout();
  56. void prefTriggered();
  57. void coreLoadingError(QString);
  58. void sendDTMF(QString);
  59. void callTableDoubleClick(QTableWidgetItem*);
  60. void makeCall();
  61. void fshostReady();
  62. void paAnswer();
  63. void paCall(QString);
  64. void paHangup();
  65. void newOutgoingCall(QSharedPointer<Call>);
  66. void ringing(QSharedPointer<Call>);
  67. void answered(QSharedPointer<Call>);
  68. void hungup(QSharedPointer<Call>);
  69. void callFailed(QSharedPointer<Call>);
  70. void recordCall(bool);
  71. void holdCall(bool);
  72. /*void transferCall();*/
  73. void setDefaultAccount();
  74. void accountAdd(QSharedPointer<Account>);
  75. void accountDel(QSharedPointer<Account>);
  76. void accountStateChanged(QSharedPointer<Account>);
  77. void sysTrayActivated(QSystemTrayIcon::ActivationReason reason);
  78. void updateCallTimers();
  79. void debugConsoleTriggered();
  80. void debugEventsTriggered();
  81. void applyPreprocessors(QStringList);
  82. private:
  83. Ui::MainWindow *ui;
  84. QSignalMapper *dialpadMapper;
  85. PrefDialog *preferences;
  86. ConsoleWindow *_consoleWindow;
  87. StateDebugDialog * _stateDebugDialog;
  88. QSystemTrayIcon *sysTray;
  89. QTimer *callTimer;
  90. AccountManager _accountManager;
  91. };
  92. #endif // MAINWINDOW_H