Modified: freeswitch/trunk/contrib/jmesquita/fsgui/resources/consolepage.ui (14297 => 14298)
--- freeswitch/trunk/contrib/jmesquita/fsgui/resources/consolepage.ui 2009-07-18 19:57:50 UTC (rev 14297)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/resources/consolepage.ui 2009-07-19 01:36:33 UTC (rev 14298)
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>570</width>
- <height>443</height>
+ <width>392</width>
+ <height>301</height>
</rect>
</property>
<property name="sizePolicy">
@@ -19,98 +19,146 @@
<property name="windowTitle">
<string>consolePage</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <widget class="QTextEdit" name="textConsole"/>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <widget class="QTabWidget" name="serverTabs">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="tabPosition">
+ <enum>QTabWidget::West</enum>
+ </property>
+ <property name="tabShape">
+ <enum>QTabWidget::Triangular</enum>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <property name="movable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="tabConsole">
+ <attribute name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/preferences/images/utilities-terminal.svg</normaloff>:/preferences/images/utilities-terminal.svg</iconset>
+ </attribute>
+ <attribute name="title">
+ <string>Console</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QLineEdit" name="lineCmd"/>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QTextEdit" name="textConsole"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLineEdit" name="lineCmd"/>
+ </item>
+ <item>
+ <widget class="QPushButton" name="btnSend">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Send</string>
+ </property>
+ <property name="shortcut">
+ <string>Return</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>LogLevel</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QComboBox" name="comboLogLevel">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <item>
+ <property name="text">
+ <string>Console</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Alert</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Crit</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Err</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Warning</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Notice</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Info</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Debug</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</item>
- <item>
- <widget class="QPushButton" name="btnSend">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Send</string>
- </property>
- <property name="shortcut">
- <string>Return</string>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- </item>
</layout>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>LogLevel</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QComboBox" name="comboLogLevel">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <item>
- <property name="text">
- <string>Console</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Alert</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Crit</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Err</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Warning</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Notice</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Info</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Debug</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
+ </widget>
+ <widget class="QWidget" name="tabExtensions">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <attribute name="icon">
+ <iconset resource="resources.qrc">
+ <normaloff>:/preferences/network-idle.png</normaloff>:/preferences/network-idle.png</iconset>
+ </attribute>
+ <attribute name="title">
+ <string>Extensions</string>
+ </attribute>
+ </widget>
+ </widget>
</item>
</layout>
</widget>
- <resources/>
+ <resources>
+ <include location="resources.qrc"/>
+ </resources>
<connections/>
</ui>
Modified: freeswitch/trunk/contrib/jmesquita/fsgui/resources/fs_gui.ui (14297 => 14298)
--- freeswitch/trunk/contrib/jmesquita/fsgui/resources/fs_gui.ui 2009-07-18 19:57:50 UTC (rev 14297)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/resources/fs_gui.ui 2009-07-19 01:36:33 UTC (rev 14298)
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>296</width>
- <height>303</height>
+ <width>728</width>
+ <height>523</height>
</rect>
</property>
<property name="windowTitle">
@@ -25,23 +25,9 @@
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
- <string>Console</string>
+ <string>Server Name</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QTextEdit" name="textConsole">
- <property name="undoRedoEnabled">
- <bool>false</bool>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- <property name="textInteractionFlags">
- <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
- </property>
- </widget>
- </item>
- </layout>
+ <layout class="QVBoxLayout" name="verticalLayout"/>
</widget>
<widget class="QWidget" name="tab_2">
<property name="enabled">
@@ -60,7 +46,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>296</width>
+ <width>728</width>
<height>26</height>
</rect>
</property>
@@ -147,7 +133,9 @@
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
- <resources/>
+ <resources>
+ <include location="resources.qrc"/>
+ </resources>
<connections>
<connection>
<sender>actionQuit</sender>
Modified: freeswitch/trunk/contrib/jmesquita/fsgui/resources/resources.qrc (14297 => 14298)
--- freeswitch/trunk/contrib/jmesquita/fsgui/resources/resources.qrc 2009-07-18 19:57:50 UTC (rev 14297)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/resources/resources.qrc 2009-07-19 01:36:33 UTC (rev 14298)
@@ -1,5 +1,6 @@
<RCC>
- <qresource prefix="/preferences" >
- <file>images/utilities-terminal.svg</file>
- </qresource>
+ <qresource prefix="/preferences" >
+ <file>network-idle.png</file>
+ <file>images/utilities-terminal.svg</file>
+ </qresource>
</RCC>
Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/consolepage.cpp (14297 => 14298)
--- freeswitch/trunk/contrib/jmesquita/fsgui/src/consolepage.cpp 2009-07-18 19:57:50 UTC (rev 14297)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/consolepage.cpp 2009-07-19 01:36:33 UTC (rev 14298)
@@ -46,6 +46,7 @@
consolePage::consolePage(QWidget *parent) :
QWidget(parent),
m_ui(new Ui::consolePage),
+ eslConnection(NULL),
histCompleter(new cmdHistory),
lineCmdEventFilter(new keyPressEventFilter(histCompleter))
{
@@ -54,7 +55,9 @@
this, SLOT(loglevelChanged(int)));
setConsoleBackground();
m_ui->lineCmd->installEventFilter(lineCmdEventFilter);
- eslConnection = NULL;
+
+ /* Just for now */
+ m_ui->serverTabs->removeTab(1);
}
consolePage::~consolePage()
{
@@ -161,6 +164,9 @@
}
void consolePage::gotConnectedSlot()
{
+ QSettings settings(SETTINGS_ORGANIZATION, SETTINGS_APPLICATION);
+ m_ui->textConsole->setTextColor(settings.value(QString("Log-Level-0-Color"), Qt::black).value<QColor>());
+
appendConsoleText(tr("Connected!"));
m_ui->lineCmd->setEnabled(eslConnection->connected());
m_ui->comboLogLevel->setEnabled(eslConnection->connected());
@@ -171,6 +177,9 @@
}
void consolePage::gotDisconnectedSlot()
{
+ QSettings settings(SETTINGS_ORGANIZATION, SETTINGS_APPLICATION);
+ m_ui->textConsole->setTextColor(settings.value(QString("Log-Level-0-Color"), Qt::black).value<QColor>());
+
appendConsoleText(tr("Disconnected!"));
m_ui->lineCmd->setEnabled(eslConnection->connected());
m_ui->comboLogLevel->setEnabled(eslConnection->connected());
@@ -178,6 +187,9 @@
}
void consolePage::connectionFailedSlot(QString msg)
{
+ QSettings settings(SETTINGS_ORGANIZATION, SETTINGS_APPLICATION);
+ m_ui->textConsole->setTextColor(settings.value(QString("Log-Level-0-Color"), Qt::black).value<QColor>());
+
appendConsoleText("Connection Failed: "+msg);
m_ui->lineCmd->setEnabled(eslConnection->connected());
m_ui->comboLogLevel->setEnabled(eslConnection->connected());
@@ -185,7 +197,8 @@
}
void consolePage::gotEventSlot(ESLevent * event)
{
- m_ui->textConsole->setTextColor(Qt::black);
+ QSettings settings(SETTINGS_ORGANIZATION, SETTINGS_APPLICATION);
+ m_ui->textConsole->setTextColor(settings.value(QString("Log-Level-0-Color"), Qt::black).value<QColor>());
if (event->getBody())
{
QString text = event->getBody();
@@ -201,9 +214,9 @@
}
void consolePage::gotConsoleEventSlot(ESLeventLog * event)
{
- m_ui->textConsole->setTextColor(event->getConsoleColor());
if (event->getBody())
{
+ m_ui->textConsole->setTextColor(event->getConsoleColor());
QString text = event->getBody();
if (text.endsWith("\r\n"))
@@ -217,6 +230,8 @@
}
void consolePage::loglevelChanged(int loglevel)
{
+ QSettings settings(SETTINGS_ORGANIZATION, SETTINGS_APPLICATION);
+ m_ui->textConsole->setTextColor(settings.value(QString("Log-Level-0-Color"), Qt::black).value<QColor>());
if (!eslConnection->connected())
{
appendConsoleText(QString("Cannot change loglevel if not connected."));