<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][14572] </title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=14572">14572</a></dd>
<dt>Author</dt> <dd>jmesquita</dd>
<dt>Date</dt> <dd>2009-08-19 17:05:18 -0500 (Wed, 19 Aug 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>We can see call, channels and events in realtime and with filtering.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkcontribjmesquitafsguisrcinterfacesmonitorstatemachinecpp">freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.cpp</a></li>
<li><a href="#freeswitchtrunkcontribjmesquitafsguisrcinterfacesmonitorstatemachineh">freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.h</a></li>
<li><a href="#freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimemodelscpp">freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.cpp</a></li>
<li><a href="#freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimemodelsh">freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.h</a></li>
<li><a href="#freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimestatisticsdialogcpp">freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.cpp</a></li>
<li><a href="#freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimestatisticsdialogh">freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.h</a></li>
<li><a href="#freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimestatisticsdialogui">freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.ui</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkcontribjmesquitafsguisrcinterfacesmonitorstatemachinecpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.cpp (14571 => 14572)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.cpp        2009-08-19 18:34:29 UTC (rev 14571)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.cpp        2009-08-19 22:05:18 UTC (rev 14572)
</span><span class="lines">@@ -2,6 +2,10 @@
</span><span class="cx"> #include &quot;eslconnection.h&quot;
</span><span class="cx"> #include &quot;esl.h&quot;
</span><span class="cx"> 
</span><ins>+Event::Event(QHash&lt;QString, QString&gt; headers)
+        : _headers(headers)
+{}
+
</ins><span class="cx"> State::State(int state_id, QString state_name, QHash&lt;QString, QString&gt; variables)
</span><span class="cx">         : _state_id(state_id),
</span><span class="cx">         _state_name(state_name),
</span><span class="lines">@@ -154,4 +158,17 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    /* Append new event to uuid */
+    QString event_uuid = e._headers.value(&quot;Unique-ID&quot;);
+    if (!event_uuid.isEmpty())
+    {
+        Event *event = new Event(e._headers);
+        Channel * chan = _channels.value(event_uuid, NULL);
+        if (!chan)
+            chan = _inactive_channels.value(event_uuid, NULL);
+        if (!chan)
+            qDebug() &lt;&lt; QString(&quot;Event %1 has no uuid.&quot;).arg(e.getType());
+        chan-&gt;addEvent(event);
+        emit newEvent(chan, event);
+    }
</ins><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunkcontribjmesquitafsguisrcinterfacesmonitorstatemachineh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.h (14571 => 14572)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.h        2009-08-19 18:34:29 UTC (rev 14571)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/interfaces/monitorstatemachine.h        2009-08-19 22:05:18 UTC (rev 14572)
</span><span class="lines">@@ -7,6 +7,16 @@
</span><span class="cx"> 
</span><span class="cx"> class ESLconnection;
</span><span class="cx"> 
</span><ins>+class Event
+{
+private:
+    QHash&lt;QString, QString&gt; _headers;
+public:
+    Event(QHash&lt;QString, QString&gt; headers);
+    QString getEventName() { return _headers.value(&quot;Event-Name&quot;); }
+    QHash&lt;QString, QString&gt; getHeaders() { return _headers; }
+};
+
</ins><span class="cx"> class State
</span><span class="cx"> {
</span><span class="cx"> private:
</span><span class="lines">@@ -27,6 +37,7 @@
</span><span class="cx">     QString *_uuid;
</span><span class="cx">     QList &lt;State *&gt; _states;
</span><span class="cx">     State *_currentConfig;
</span><ins>+    QList&lt;Event *&gt; _events;
</ins><span class="cx"> public:
</span><span class="cx">     Channel(QString uuid, State *state);
</span><span class="cx">     QHash&lt;QString, QString&gt; getCurrentStateVariables() { return _currentConfig-&gt;getHeaders(); }
</span><span class="lines">@@ -35,6 +46,9 @@
</span><span class="cx">     QString getCurrentStateHeader(QString header) { return _currentConfig-&gt;getHeader(header); }
</span><span class="cx">     void stateChanged(State *state) { _states.append(state); _currentConfig = state; }
</span><span class="cx">     QList &lt;State *&gt; getStates() { return _states; }
</span><ins>+    void addEvent(Event * event) { _events.append(event); }
+    QList&lt;Event *&gt; getEvents() { return _events; }
+    Event * getEvent(int i) { return _events.at(i); }
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> class Call
</span><span class="lines">@@ -79,6 +93,7 @@
</span><span class="cx">     void callCreated(Call *);
</span><span class="cx">     void callDestroyed(Call *);
</span><span class="cx">     void channelDestroyed(Channel *);
</span><ins>+    void newEvent(Channel *, Event *);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #endif // MONITORSTATEMACHINE_H
</span></span></pre></div>
<a id="freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimemodelscpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.cpp (14571 => 14572)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.cpp        2009-08-19 18:34:29 UTC (rev 14571)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.cpp        2009-08-19 22:05:18 UTC (rev 14572)
</span><span class="lines">@@ -20,3 +20,23 @@
</span><span class="cx"> 
</span><span class="cx">     return (_uuid_list.contains(sourceModel()-&gt;data(index0, Qt::UserRole).toString()));
</span><span class="cx"> }
</span><ins>+
+EventSortModel::EventSortModel(QObject *parent) :
+        QSortFilterProxyModel(parent)
+{}
+
+void EventSortModel::setUUIDFilter(QString uuid)
+{
+    _uuid = uuid;
+    invalidateFilter();
+}
+
+bool EventSortModel::filterAcceptsRow(int sourceRow, const QModelIndex &amp;sourceParent) const
+{
+    QModelIndex index0 = sourceModel()-&gt;index(sourceRow, 0, sourceParent);
+
+    if (_uuid.isEmpty())
+        return false;
+
+    return (sourceModel()-&gt;data(index0, Qt::UserRole).toString() == _uuid);
+}
</ins></span></pre></div>
<a id="freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimemodelsh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.h (14571 => 14572)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.h        2009-08-19 18:34:29 UTC (rev 14571)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimemodels.h        2009-08-19 22:05:18 UTC (rev 14572)
</span><span class="lines">@@ -16,4 +16,17 @@
</span><span class="cx">     QList&lt;QString&gt; _uuid_list;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+class EventSortModel : public QSortFilterProxyModel {
+
+    Q_OBJECT
+
+public:
+    EventSortModel(QObject *parent = 0);
+    void setUUIDFilter(QString uuid);
+
+protected:
+     bool filterAcceptsRow(int sourceRow, const QModelIndex &amp;sourceParent) const;
+    QString _uuid;
+};
+
</ins><span class="cx"> #endif // REALTIMEMODELS_H
</span></span></pre></div>
<a id="freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimestatisticsdialogcpp"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.cpp (14571 => 14572)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.cpp        2009-08-19 18:34:29 UTC (rev 14571)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.cpp        2009-08-19 22:05:18 UTC (rev 14572)
</span><span class="lines">@@ -11,6 +11,14 @@
</span><span class="cx"> {
</span><span class="cx">     m_ui-&gt;setupUi(this);
</span><span class="cx"> 
</span><ins>+    /* Connect event stuff */
+    connect(sm, SIGNAL(newEvent(Channel*,Event*)),
+            this, SLOT(newEvent(Channel*,Event*)));
+    connect(m_ui-&gt;listActiveEvents, SIGNAL(clicked(QModelIndex)),
+            this, SLOT(activeEventSelected(QModelIndex)));
+    connect(m_ui-&gt;listInactiveEvents, SIGNAL(clicked(QModelIndex)),
+            this, SLOT(inactiveEventSelected(QModelIndex)));
+
</ins><span class="cx">     /* Connect channel stuff */
</span><span class="cx">     connect(sm, SIGNAL(channelCreated(Channel*)),
</span><span class="cx">             this, SLOT(channelCreate(Channel*)));
</span><span class="lines">@@ -33,6 +41,7 @@
</span><span class="cx">     connect(m_ui-&gt;listInactiveCalls, SIGNAL(itemSelectionChanged()),
</span><span class="cx">             this, SLOT(inactiveCallSelectionChanged()));
</span><span class="cx"> 
</span><ins>+    /* Channel models */
</ins><span class="cx">     _channel_model = new QStandardItemModel(this);
</span><span class="cx">     _channel_sort_model = new ChannelSortModel(this);
</span><span class="cx">     _channel_sort_model-&gt;setSourceModel(_channel_model);
</span><span class="lines">@@ -43,6 +52,13 @@
</span><span class="cx">     _inactive_channel_sort_model-&gt;setSourceModel(_inactive_channel_model);
</span><span class="cx">     m_ui-&gt;listInactiveChannels-&gt;setModel(_inactive_channel_sort_model);
</span><span class="cx"> 
</span><ins>+    /* Event models */
+    _event_model = new QStandardItemModel(this);
+    _event_sort_model = new EventSortModel(this);
+    _event_sort_model-&gt;setSourceModel(_event_model);
+    m_ui-&gt;listActiveEvents-&gt;setModel(_event_sort_model);
+    m_ui-&gt;listInactiveEvents-&gt;setModel(_event_sort_model);
+
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RealtimeStatisticsDialog::~RealtimeStatisticsDialog()
</span><span class="lines">@@ -68,9 +84,9 @@
</span><span class="cx">     if (!ch)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    QStandardItem *item = new QStandardItem(QString(&quot;%1 - %2&quot;).arg(ch-&gt;getUUID(), ch-&gt;getCurrentStateHeader(&quot;Channel-State&quot;)));
</del><ins>+    QStandardItem *item = new QStandardItem(QString(&quot;%1 - %2&quot;).arg(ch-&gt;getUUID()));
</ins><span class="cx">     item-&gt;setData(ch-&gt;getUUID(), Qt::UserRole);
</span><del>-    _channel_model-&gt;insertRow(0, item);
</del><ins>+    _channel_model-&gt;appendRow(item);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RealtimeStatisticsDialog::channelDestroy(Channel *ch)
</span><span class="lines">@@ -86,10 +102,13 @@
</span><span class="cx">         if (item-&gt;data(Qt::UserRole) == ch-&gt;getUUID())
</span><span class="cx">         {
</span><span class="cx">             if (selectedIndex.isValid() &amp;&amp; selectedIndex.data(Qt::UserRole) == ch-&gt;getUUID())
</span><del>-                m_ui-&gt;listActiveVariables-&gt;clear();
</del><ins>+            {
+                m_ui-&gt;listActiveHeaders-&gt;clear();
+            }
</ins><span class="cx"> 
</span><span class="cx">             _channel_model-&gt;takeRow(item-&gt;index().row());
</span><del>-            _inactive_channel_model-&gt;insertRow(0, item);
</del><ins>+            _inactive_channel_model-&gt;appendRow(item);
+            _event_sort_model-&gt;setUUIDFilter(&quot;&quot;);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -107,7 +126,6 @@
</span><span class="cx">             {
</span><span class="cx">                 activeChannelSelected(_channel_model-&gt;indexFromItem(item));
</span><span class="cx">             }
</span><del>-        item-&gt;setText(QString(&quot;%1 - %2&quot;).arg(ch-&gt;getUUID(), ch-&gt;getCurrentStateHeader(&quot;Channel-State&quot;)));
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     foreach (QStandardItem *item, _inactive_channel_model-&gt;findItems(&quot;*&quot;, Qt::MatchWildcard | Qt::MatchRecursive))
</span><span class="lines">@@ -117,38 +135,62 @@
</span><span class="cx">             {
</span><span class="cx">                 inactiveChannelSelected(_inactive_channel_model-&gt;indexFromItem(item));
</span><span class="cx">             }
</span><del>-        item-&gt;setText(QString(&quot;%1 - %2&quot;).arg(ch-&gt;getUUID(), ch-&gt;getCurrentStateHeader(&quot;Channel-State&quot;)));
</del><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RealtimeStatisticsDialog::activeChannelSelected(QModelIndex index)
</span><span class="cx"> {
</span><del>-    m_ui-&gt;listActiveVariables-&gt;clear();
</del><span class="cx"> 
</span><ins>+    m_ui-&gt;listActiveHeaders-&gt;clear();
+
</ins><span class="cx">     Channel * ch = _sm-&gt;getChannel(index.data(Qt::UserRole).toString());
</span><span class="cx">     if (!ch)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    foreach (QString key, ch-&gt;getCurrentStateVariables().keys())
-    {
-        m_ui-&gt;listActiveVariables-&gt;addItem(QString(&quot;%1 = %2&quot;).arg(key, ch-&gt;getCurrentStateVariables().value(key)));
-    }
</del><ins>+    _event_sort_model-&gt;setUUIDFilter(ch-&gt;getUUID());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RealtimeStatisticsDialog::inactiveChannelSelected(QModelIndex index)
</span><span class="cx"> {
</span><del>-    m_ui-&gt;listInactiveVariables-&gt;clear();
</del><ins>+    m_ui-&gt;listActiveHeaders-&gt;clear();
</ins><span class="cx"> 
</span><span class="cx">     Channel * ch = _sm-&gt;getInactiveChannel(index.data(Qt::UserRole).toString());
</span><span class="cx">     if (!ch)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    foreach (QString key, ch-&gt;getCurrentStateVariables().keys())
</del><ins>+    _event_sort_model-&gt;setUUIDFilter(ch-&gt;getUUID());
+}
+
+void RealtimeStatisticsDialog::activeEventSelected(QModelIndex index)
+{
+    Channel *ch = _sm-&gt;getChannel(index.data(Qt::UserRole).toString());
+    if (!ch)
+        return;
+
+    m_ui-&gt;listActiveHeaders-&gt;clear();
+
+    Event * e = ch-&gt;getEvent(index.row());
+    foreach (QString key, e-&gt;getHeaders().keys())
</ins><span class="cx">     {
</span><del>-        m_ui-&gt;listInactiveVariables-&gt;addItem(QString(&quot;%1 = %2&quot;).arg(key, ch-&gt;getCurrentStateVariables().value(key)));
</del><ins>+        m_ui-&gt;listActiveHeaders-&gt;addItem(QString(&quot;%1 = %2&quot;).arg(key, e-&gt;getHeaders().value(key)));
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RealtimeStatisticsDialog::inactiveEventSelected(QModelIndex index)
+{
+    Channel *ch = _sm-&gt;getInactiveChannel(index.data(Qt::UserRole).toString());
+    if (!ch)
+        return;
+
+    m_ui-&gt;listInactiveHeaders-&gt;clear();
+
+    Event * e = ch-&gt;getEvent(index.row());
+    foreach (QString key, e-&gt;getHeaders().keys())
+    {
+        m_ui-&gt;listInactiveHeaders-&gt;addItem(QString(&quot;%1 = %2&quot;).arg(key, e-&gt;getHeaders().value(key)));
+    }
+}
+
</ins><span class="cx"> void RealtimeStatisticsDialog::activeCallSelectionChanged()
</span><span class="cx"> {
</span><span class="cx">     QList&lt;QListWidgetItem *&gt; selection = m_ui-&gt;listActiveCalls-&gt;selectedItems();
</span><span class="lines">@@ -212,3 +254,13 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><ins>+
+void RealtimeStatisticsDialog::newEvent(Channel *ch, Event *e)
+{
+    if (!ch &amp;&amp; !e)
+        return;
+
+    QStandardItem *item = new QStandardItem(e-&gt;getEventName());
+    item-&gt;setData(ch-&gt;getUUID(), Qt::UserRole);
+    _event_model-&gt;appendRow(item);
+}
</ins></span></pre></div>
<a id="freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimestatisticsdialogh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.h (14571 => 14572)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.h        2009-08-19 18:34:29 UTC (rev 14571)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.h        2009-08-19 22:05:18 UTC (rev 14572)
</span><span class="lines">@@ -8,9 +8,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> class MonitorStateMachine;
</span><ins>+class Event;
</ins><span class="cx"> class Channel;
</span><span class="cx"> class Call;
</span><span class="cx"> class ChannelSortModel;
</span><ins>+class EventSortModel;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class RealtimeStatisticsDialog : public QDialog {
</span><span class="lines">@@ -29,18 +31,27 @@
</span><span class="cx">     void channelStateChanged(Channel *);
</span><span class="cx">     void activeChannelSelected(QModelIndex);
</span><span class="cx">     void inactiveChannelSelected(QModelIndex);
</span><ins>+    void activeEventSelected(QModelIndex);
+    void inactiveEventSelected(QModelIndex);
</ins><span class="cx">     void activeCallSelectionChanged();
</span><span class="cx">     void inactiveCallSelectionChanged();
</span><span class="cx">     void callCreate(Call *);
</span><span class="cx">     void callDestroy(Call *);
</span><ins>+    void newEvent(Channel *, Event *);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     Ui::RealtimeStatisticsDialog *m_ui;
</span><span class="cx">     MonitorStateMachine *_sm;
</span><ins>+    /* Channel models */
</ins><span class="cx">     QStandardItemModel *_channel_model;
</span><span class="cx">     ChannelSortModel *_channel_sort_model;
</span><span class="cx">     QStandardItemModel *_inactive_channel_model;
</span><span class="cx">     ChannelSortModel *_inactive_channel_sort_model;
</span><ins>+    /* Event models */
+    QStandardItemModel *_event_model;
+    EventSortModel *_event_sort_model;
+    QStandardItemModel *_inactive_event_model;
+    EventSortModel *_inactive_event_sort_model;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #endif // REALTIMESTATISTICSDIALOG_H
</span></span></pre></div>
<a id="freeswitchtrunkcontribjmesquitafsguisrcpluginsconsolepluginrealtimestatisticsdialogui"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.ui (14571 => 14572)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.ui        2009-08-19 18:34:29 UTC (rev 14571)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/realtimestatisticsdialog.ui        2009-08-19 22:05:18 UTC (rev 14572)
</span><span class="lines">@@ -6,8 +6,8 @@
</span><span class="cx">    &lt;rect&gt;
</span><span class="cx">     &lt;x&gt;0&lt;/x&gt;
</span><span class="cx">     &lt;y&gt;0&lt;/y&gt;
</span><del>-    &lt;width&gt;612&lt;/width&gt;
-    &lt;height&gt;534&lt;/height&gt;
</del><ins>+    &lt;width&gt;1186&lt;/width&gt;
+    &lt;height&gt;496&lt;/height&gt;
</ins><span class="cx">    &lt;/rect&gt;
</span><span class="cx">   &lt;/property&gt;
</span><span class="cx">   &lt;property name=&quot;windowTitle&quot;&gt;
</span><span class="lines">@@ -16,7 +16,7 @@
</span><span class="cx">   &lt;property name=&quot;sizeGripEnabled&quot;&gt;
</span><span class="cx">    &lt;bool&gt;true&lt;/bool&gt;
</span><span class="cx">   &lt;/property&gt;
</span><del>-  &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout_2&quot;&gt;
</del><ins>+  &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_6&quot;&gt;
</ins><span class="cx">    &lt;item&gt;
</span><span class="cx">     &lt;widget class=&quot;QTabWidget&quot; name=&quot;tabWidget&quot;&gt;
</span><span class="cx">      &lt;property name=&quot;currentIndex&quot;&gt;
</span><span class="lines">@@ -28,58 +28,73 @@
</span><span class="cx">       &lt;/attribute&gt;
</span><span class="cx">       &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_5&quot;&gt;
</span><span class="cx">        &lt;item&gt;
</span><del>-        &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout&quot;&gt;
-         &lt;item&gt;
-          &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox&quot;&gt;
-           &lt;property name=&quot;title&quot;&gt;
-            &lt;string&gt;Channels&lt;/string&gt;
-           &lt;/property&gt;
-           &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout&quot;&gt;
-            &lt;item&gt;
-             &lt;widget class=&quot;QListView&quot; name=&quot;listActiveChannels&quot;&gt;
-              &lt;property name=&quot;editTriggers&quot;&gt;
-               &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
-              &lt;/property&gt;
-              &lt;property name=&quot;alternatingRowColors&quot;&gt;
-               &lt;bool&gt;true&lt;/bool&gt;
-              &lt;/property&gt;
-             &lt;/widget&gt;
-            &lt;/item&gt;
-           &lt;/layout&gt;
-          &lt;/widget&gt;
-         &lt;/item&gt;
-         &lt;item&gt;
-          &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_3&quot;&gt;
-           &lt;property name=&quot;title&quot;&gt;
-            &lt;string&gt;Calls&lt;/string&gt;
-           &lt;/property&gt;
-           &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_3&quot;&gt;
-            &lt;item&gt;
-             &lt;widget class=&quot;QListWidget&quot; name=&quot;listActiveCalls&quot;&gt;
-              &lt;property name=&quot;editTriggers&quot;&gt;
-               &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
-              &lt;/property&gt;
-              &lt;property name=&quot;alternatingRowColors&quot;&gt;
-               &lt;bool&gt;true&lt;/bool&gt;
-              &lt;/property&gt;
-              &lt;property name=&quot;selectionMode&quot;&gt;
-               &lt;enum&gt;QAbstractItemView::ExtendedSelection&lt;/enum&gt;
-              &lt;/property&gt;
-             &lt;/widget&gt;
-            &lt;/item&gt;
-           &lt;/layout&gt;
-          &lt;/widget&gt;
-         &lt;/item&gt;
-        &lt;/layout&gt;
</del><ins>+        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_3&quot;&gt;
+         &lt;property name=&quot;title&quot;&gt;
+          &lt;string&gt;Calls&lt;/string&gt;
+         &lt;/property&gt;
+         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_3&quot;&gt;
+          &lt;item&gt;
+           &lt;widget class=&quot;QListWidget&quot; name=&quot;listActiveCalls&quot;&gt;
+            &lt;property name=&quot;editTriggers&quot;&gt;
+             &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;alternatingRowColors&quot;&gt;
+             &lt;bool&gt;true&lt;/bool&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;selectionMode&quot;&gt;
+             &lt;enum&gt;QAbstractItemView::ExtendedSelection&lt;/enum&gt;
+            &lt;/property&gt;
+           &lt;/widget&gt;
+          &lt;/item&gt;
+         &lt;/layout&gt;
+        &lt;/widget&gt;
</ins><span class="cx">        &lt;/item&gt;
</span><span class="cx">        &lt;item&gt;
</span><ins>+        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox&quot;&gt;
+         &lt;property name=&quot;title&quot;&gt;
+          &lt;string&gt;Channels&lt;/string&gt;
+         &lt;/property&gt;
+         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout&quot;&gt;
+          &lt;item&gt;
+           &lt;widget class=&quot;QListView&quot; name=&quot;listActiveChannels&quot;&gt;
+            &lt;property name=&quot;editTriggers&quot;&gt;
+             &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;alternatingRowColors&quot;&gt;
+             &lt;bool&gt;true&lt;/bool&gt;
+            &lt;/property&gt;
+           &lt;/widget&gt;
+          &lt;/item&gt;
+         &lt;/layout&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item&gt;
+        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_4&quot;&gt;
+         &lt;property name=&quot;title&quot;&gt;
+          &lt;string&gt;Events&lt;/string&gt;
+         &lt;/property&gt;
+         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_4&quot;&gt;
+          &lt;item&gt;
+           &lt;widget class=&quot;QListView&quot; name=&quot;listActiveEvents&quot;&gt;
+            &lt;property name=&quot;editTriggers&quot;&gt;
+             &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;alternatingRowColors&quot;&gt;
+             &lt;bool&gt;true&lt;/bool&gt;
+            &lt;/property&gt;
+           &lt;/widget&gt;
+          &lt;/item&gt;
+         &lt;/layout&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item&gt;
</ins><span class="cx">         &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_2&quot;&gt;
</span><span class="cx">          &lt;property name=&quot;title&quot;&gt;
</span><del>-          &lt;string&gt;Variables&lt;/string&gt;
</del><ins>+          &lt;string&gt;Headers&lt;/string&gt;
</ins><span class="cx">          &lt;/property&gt;
</span><span class="cx">          &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_2&quot;&gt;
</span><span class="cx">           &lt;item&gt;
</span><del>-           &lt;widget class=&quot;QListWidget&quot; name=&quot;listActiveVariables&quot;&gt;
</del><ins>+           &lt;widget class=&quot;QListWidget&quot; name=&quot;listActiveHeaders&quot;&gt;
</ins><span class="cx">             &lt;property name=&quot;editTriggers&quot;&gt;
</span><span class="cx">              &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
</span><span class="cx">             &lt;/property&gt;
</span><span class="lines">@@ -100,66 +115,81 @@
</span><span class="cx">       &lt;attribute name=&quot;title&quot;&gt;
</span><span class="cx">        &lt;string&gt;Inactive&lt;/string&gt;
</span><span class="cx">       &lt;/attribute&gt;
</span><del>-      &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_12&quot;&gt;
</del><ins>+      &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_11&quot;&gt;
</ins><span class="cx">        &lt;item&gt;
</span><del>-        &lt;layout class=&quot;QVBoxLayout&quot; name=&quot;verticalLayout_4&quot;&gt;
-         &lt;item&gt;
-          &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_7&quot;&gt;
-           &lt;property name=&quot;title&quot;&gt;
-            &lt;string&gt;Channels&lt;/string&gt;
-           &lt;/property&gt;
-           &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_9&quot;&gt;
-            &lt;item&gt;
-             &lt;widget class=&quot;QListView&quot; name=&quot;listInactiveChannels&quot;&gt;
-              &lt;property name=&quot;editTriggers&quot;&gt;
-               &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
-              &lt;/property&gt;
-              &lt;property name=&quot;alternatingRowColors&quot;&gt;
-               &lt;bool&gt;true&lt;/bool&gt;
-              &lt;/property&gt;
-             &lt;/widget&gt;
-            &lt;/item&gt;
-           &lt;/layout&gt;
-          &lt;/widget&gt;
-         &lt;/item&gt;
-         &lt;item&gt;
-          &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_8&quot;&gt;
-           &lt;property name=&quot;title&quot;&gt;
-            &lt;string&gt;Calls&lt;/string&gt;
-           &lt;/property&gt;
-           &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_10&quot;&gt;
-            &lt;item&gt;
-             &lt;widget class=&quot;QListWidget&quot; name=&quot;listInactiveCalls&quot;&gt;
-              &lt;property name=&quot;editTriggers&quot;&gt;
-               &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
-              &lt;/property&gt;
-              &lt;property name=&quot;alternatingRowColors&quot;&gt;
-               &lt;bool&gt;true&lt;/bool&gt;
-              &lt;/property&gt;
-              &lt;property name=&quot;selectionMode&quot;&gt;
-               &lt;enum&gt;QAbstractItemView::ExtendedSelection&lt;/enum&gt;
-              &lt;/property&gt;
-             &lt;/widget&gt;
-            &lt;/item&gt;
-           &lt;/layout&gt;
-          &lt;/widget&gt;
-         &lt;/item&gt;
-        &lt;/layout&gt;
</del><ins>+        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_8&quot;&gt;
+         &lt;property name=&quot;title&quot;&gt;
+          &lt;string&gt;Calls&lt;/string&gt;
+         &lt;/property&gt;
+         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_10&quot;&gt;
+          &lt;item&gt;
+           &lt;widget class=&quot;QListWidget&quot; name=&quot;listInactiveCalls&quot;&gt;
+            &lt;property name=&quot;editTriggers&quot;&gt;
+             &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;alternatingRowColors&quot;&gt;
+             &lt;bool&gt;true&lt;/bool&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;selectionMode&quot;&gt;
+             &lt;enum&gt;QAbstractItemView::ExtendedSelection&lt;/enum&gt;
+            &lt;/property&gt;
+           &lt;/widget&gt;
+          &lt;/item&gt;
+         &lt;/layout&gt;
+        &lt;/widget&gt;
</ins><span class="cx">        &lt;/item&gt;
</span><span class="cx">        &lt;item&gt;
</span><del>-        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_9&quot;&gt;
</del><ins>+        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_7&quot;&gt;
</ins><span class="cx">          &lt;property name=&quot;title&quot;&gt;
</span><del>-          &lt;string&gt;Variables&lt;/string&gt;
</del><ins>+          &lt;string&gt;Channels&lt;/string&gt;
</ins><span class="cx">          &lt;/property&gt;
</span><del>-         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_11&quot;&gt;
</del><ins>+         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_9&quot;&gt;
</ins><span class="cx">           &lt;item&gt;
</span><del>-           &lt;widget class=&quot;QListWidget&quot; name=&quot;listInactiveVariables&quot;&gt;
</del><ins>+           &lt;widget class=&quot;QListView&quot; name=&quot;listInactiveChannels&quot;&gt;
</ins><span class="cx">             &lt;property name=&quot;editTriggers&quot;&gt;
</span><span class="cx">              &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
</span><span class="cx">             &lt;/property&gt;
</span><span class="cx">             &lt;property name=&quot;alternatingRowColors&quot;&gt;
</span><span class="cx">              &lt;bool&gt;true&lt;/bool&gt;
</span><span class="cx">             &lt;/property&gt;
</span><ins>+           &lt;/widget&gt;
+          &lt;/item&gt;
+         &lt;/layout&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item&gt;
+        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_6&quot;&gt;
+         &lt;property name=&quot;title&quot;&gt;
+          &lt;string&gt;Events&lt;/string&gt;
+         &lt;/property&gt;
+         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_8&quot;&gt;
+          &lt;item&gt;
+           &lt;widget class=&quot;QListView&quot; name=&quot;listInactiveEvents&quot;&gt;
+            &lt;property name=&quot;editTriggers&quot;&gt;
+             &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;alternatingRowColors&quot;&gt;
+             &lt;bool&gt;true&lt;/bool&gt;
+            &lt;/property&gt;
+           &lt;/widget&gt;
+          &lt;/item&gt;
+         &lt;/layout&gt;
+        &lt;/widget&gt;
+       &lt;/item&gt;
+       &lt;item&gt;
+        &lt;widget class=&quot;QGroupBox&quot; name=&quot;groupBox_5&quot;&gt;
+         &lt;property name=&quot;title&quot;&gt;
+          &lt;string&gt;Headers&lt;/string&gt;
+         &lt;/property&gt;
+         &lt;layout class=&quot;QHBoxLayout&quot; name=&quot;horizontalLayout_7&quot;&gt;
+          &lt;item&gt;
+           &lt;widget class=&quot;QListWidget&quot; name=&quot;listInactiveHeaders&quot;&gt;
+            &lt;property name=&quot;editTriggers&quot;&gt;
+             &lt;set&gt;QAbstractItemView::NoEditTriggers&lt;/set&gt;
+            &lt;/property&gt;
+            &lt;property name=&quot;alternatingRowColors&quot;&gt;
+             &lt;bool&gt;true&lt;/bool&gt;
+            &lt;/property&gt;
</ins><span class="cx">             &lt;property name=&quot;sortingEnabled&quot;&gt;
</span><span class="cx">              &lt;bool&gt;false&lt;/bool&gt;
</span><span class="cx">             &lt;/property&gt;
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>