2010-01-04 15:49:22 -05:00
|
|
|
/*
|
|
|
|
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
2014-02-05 16:02:28 -05:00
|
|
|
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
|
2010-01-04 15:49:22 -05:00
|
|
|
*
|
|
|
|
* Version: MPL 1.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Anthony Minessale II <anthm@freeswitch.org>
|
|
|
|
* Portions created by the Initial Developer are Copyright (C)
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Joao Mesquita <jmesquita@freeswitch.org>
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2010-01-21 00:05:56 -05:00
|
|
|
#include <QTableWidgetItem>
|
2010-01-04 15:49:22 -05:00
|
|
|
#include <QSignalMapper>
|
2010-01-20 21:48:53 -05:00
|
|
|
#include <QSystemTrayIcon>
|
2010-01-04 15:49:22 -05:00
|
|
|
#include <switch.h>
|
|
|
|
#include <fshost.h>
|
|
|
|
#include <call.h>
|
2010-01-18 23:03:34 -05:00
|
|
|
#include <account.h>
|
2010-01-07 01:43:51 -05:00
|
|
|
#include "preferences/prefdialog.h"
|
2010-04-07 01:05:03 -04:00
|
|
|
#include "debugtools/consolewindow.h"
|
|
|
|
#include "debugtools/statedebugdialog.h"
|
2010-01-04 15:49:22 -05:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void changeEvent(QEvent *e);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void dtmfDialed(QString);
|
|
|
|
|
|
|
|
private slots:
|
2010-01-07 19:12:54 -05:00
|
|
|
void showAbout();
|
2010-01-04 15:49:22 -05:00
|
|
|
void prefTriggered();
|
|
|
|
void coreLoadingError(QString);
|
2010-01-20 21:48:53 -05:00
|
|
|
void sendDTMF(QString);
|
2010-01-21 00:05:56 -05:00
|
|
|
void callTableDoubleClick(QTableWidgetItem*);
|
2010-01-04 15:49:22 -05:00
|
|
|
void makeCall();
|
|
|
|
void fshostReady();
|
|
|
|
void paAnswer();
|
|
|
|
void paCall(QString);
|
|
|
|
void paHangup();
|
2010-01-14 22:30:11 -05:00
|
|
|
void newOutgoingCall(QSharedPointer<Call>);
|
|
|
|
void ringing(QSharedPointer<Call>);
|
|
|
|
void answered(QSharedPointer<Call>);
|
|
|
|
void hungup(QSharedPointer<Call>);
|
2010-01-14 23:05:17 -05:00
|
|
|
void callFailed(QSharedPointer<Call>);
|
2010-01-17 21:43:48 -05:00
|
|
|
void recordCall(bool);
|
2010-04-07 23:22:41 -04:00
|
|
|
void holdCall(bool);
|
2010-04-14 22:54:59 -04:00
|
|
|
/*void transferCall();*/
|
2010-01-18 23:03:34 -05:00
|
|
|
void setDefaultAccount();
|
|
|
|
void accountAdd(QSharedPointer<Account>);
|
2010-01-20 00:11:40 -05:00
|
|
|
void accountDel(QSharedPointer<Account>);
|
2010-01-18 23:03:34 -05:00
|
|
|
void accountStateChanged(QSharedPointer<Account>);
|
2010-01-20 21:48:53 -05:00
|
|
|
void sysTrayActivated(QSystemTrayIcon::ActivationReason reason);
|
2010-01-23 13:36:25 -05:00
|
|
|
void updateCallTimers();
|
2010-04-07 01:05:03 -04:00
|
|
|
void debugConsoleTriggered();
|
|
|
|
void debugEventsTriggered();
|
2010-04-08 22:15:29 -04:00
|
|
|
void applyPreprocessors(QStringList);
|
2010-01-04 15:49:22 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
|
|
|
QSignalMapper *dialpadMapper;
|
|
|
|
PrefDialog *preferences;
|
2010-04-07 01:05:03 -04:00
|
|
|
ConsoleWindow *_consoleWindow;
|
|
|
|
StateDebugDialog * _stateDebugDialog;
|
2010-01-20 21:48:53 -05:00
|
|
|
QSystemTrayIcon *sysTray;
|
2010-01-23 13:36:25 -05:00
|
|
|
QTimer *callTimer;
|
2010-07-03 12:37:32 -04:00
|
|
|
AccountManager _accountManager;
|
2010-01-04 15:49:22 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|