Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/console_settings.ui (15476 => 15477)
--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/console_settings.ui 2009-11-15 04:13:39 UTC (rev 15476)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/console_settings.ui 2009-11-15 04:53:55 UTC (rev 15477)
@@ -6,16 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
- <width>438</width>
+ <width>483</width>
<height>387</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout_9">
+ <layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="minimumSize">
@@ -24,18 +24,12 @@
<height>318</height>
</size>
</property>
- <property name="maximumSize">
- <size>
- <width>372</width>
- <height>318</height>
- </size>
- </property>
<property name="title">
<string>Colors</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<widget class="QLineEdit" name="lineConsole">
<property name="minimumSize">
@@ -105,6 +99,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnConsoleFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -178,6 +179,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnAlertFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -251,6 +259,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnCritFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -324,6 +339,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnErrorFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -397,6 +419,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnWarningFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -470,6 +499,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnNoticeFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -543,6 +579,13 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnInfoFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
<item>
@@ -616,24 +659,18 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QPushButton" name="btnDebugFont">
+ <property name="text">
+ <string>Font</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>
</widget>
</item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
<item>
Modified: freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoleplugin.cpp (15476 => 15477)
--- freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoleplugin.cpp 2009-11-15 04:13:39 UTC (rev 15476)
+++ freeswitch/trunk/contrib/jmesquita/fsgui/src/plugins/consoleplugin/consoleplugin.cpp 2009-11-15 04:53:55 UTC (rev 15477)
@@ -83,6 +83,22 @@
consoleConfigPage->setupUi(base);
+ QObject::connect(consoleConfigPage->btnConsoleFont, SIGNAL(clicked()),
+ this, SLOT(changeConsoleFont()));
+ QObject::connect(consoleConfigPage->btnAlertFont, SIGNAL(clicked()),
+ this, SLOT(changeAlertFont()));
+ QObject::connect(consoleConfigPage->btnCritFont, SIGNAL(clicked()),
+ this, SLOT(changeCriticalFont()));
+ QObject::connect(consoleConfigPage->btnErrorFont, SIGNAL(clicked()),
+ this, SLOT(changeErrorFont()));
+ QObject::connect(consoleConfigPage->btnWarningFont, SIGNAL(clicked()),
+ this, SLOT(changeWarningFont()));
+ QObject::connect(consoleConfigPage->btnNoticeFont, SIGNAL(clicked()),
+ this, SLOT(changeNoticeFont()));
+ QObject::connect(consoleConfigPage->btnInfoFont, SIGNAL(clicked()),
+ this, SLOT(changeInfoFont()));
+ QObject::connect(consoleConfigPage->btnDebugFont, SIGNAL(clicked()),
+ this, SLOT(changeDebugFont()));
QObject::connect(consoleConfigPage->btnBackgroundConsole, SIGNAL(clicked()),
this, SLOT(changeConsoleBackgroundColor()));
QObject::connect(consoleConfigPage->btnBackgroundAlert, SIGNAL(clicked()),
@@ -218,13 +234,21 @@
settings.beginGroup("Console");
consoleConfigPage->lineConsole->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_EMERG)).value<QPalette>());
+ consoleConfigPage->lineConsole->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_EMERG)).value<QFont>());
consoleConfigPage->lineAlert->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_ALERT)).value<QPalette>());
+ consoleConfigPage->lineAlert->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_ALERT)).value<QFont>());
consoleConfigPage->lineCritical->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_CRIT)).value<QPalette>());
+ consoleConfigPage->lineCritical->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_CRIT)).value<QFont>());
consoleConfigPage->lineError->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_ERROR)).value<QPalette>());
+ consoleConfigPage->lineError->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_ERROR)).value<QFont>());
consoleConfigPage->lineWarning->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_WARNING)).value<QPalette>());
+ consoleConfigPage->lineWarning->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_WARNING)).value<QFont>());
consoleConfigPage->lineNotice->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_NOTICE)).value<QPalette>());
+ consoleConfigPage->lineNotice->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_NOTICE)).value<QFont>());
consoleConfigPage->lineInfo->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_INFO)).value<QPalette>());
+ consoleConfigPage->lineInfo->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_INFO)).value<QFont>());
consoleConfigPage->lineDebug->setPalette(settings.value(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_DEBUG)).value<QPalette>());;
+ consoleConfigPage->lineDebug->setFont(settings.value(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_DEBUG)).value<QFont>());
settings.endGroup();
}
@@ -234,16 +258,104 @@
QSettings settings;
settings.beginGroup("Console");
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_EMERG), consoleConfigPage->lineConsole->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_EMERG), consoleConfigPage->lineConsole->font());
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_ALERT), consoleConfigPage->lineAlert->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_ALERT), consoleConfigPage->lineAlert->font());
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_CRIT), consoleConfigPage->lineCritical->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_CRIT), consoleConfigPage->lineCritical->font());
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_ERROR), consoleConfigPage->lineError->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_ERROR), consoleConfigPage->lineError->font());
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_WARNING), consoleConfigPage->lineWarning->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_WARNING), consoleConfigPage->lineWarning->font());
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_NOTICE), consoleConfigPage->lineNotice->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_NOTICE), consoleConfigPage->lineNotice->font());
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_INFO), consoleConfigPage->lineInfo->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_INFO), consoleConfigPage->lineInfo->font());
settings.setValue(QString("log-level-%1-palette").arg(ESL_LOG_LEVEL_DEBUG), consoleConfigPage->lineDebug->palette());
+ settings.setValue(QString("log-level-%1-font").arg(ESL_LOG_LEVEL_DEBUG), consoleConfigPage->lineDebug->font());
settings.endGroup();
}
+void ConsolePlugin::changeConsoleFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineConsole->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineConsole->setFont(font);
+ }
+}
+
+void ConsolePlugin::changeAlertFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineAlert->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineAlert->setFont(font);
+ }
+}
+
+void ConsolePlugin::changeWarningFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineWarning->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineWarning->setFont(font);
+ }
+}
+
+void ConsolePlugin::changeCriticalFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineCritical->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineCritical->setFont(font);
+ }
+}
+
+void ConsolePlugin::changeErrorFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineError->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineError->setFont(font);
+ }
+}
+
+void ConsolePlugin::changeNoticeFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineNotice->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineNotice->setFont(font);
+ }
+}
+
+void ConsolePlugin::changeInfoFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineInfo->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineInfo->setFont(font);
+ }
+}
+
+void ConsolePlugin::changeDebugFont()
+{
+ bool ok;
+ QFont font = QFontDialog::getFont(&ok, consoleConfigPage->lineDebug->font(), this);
+ if (ok)
+ {
+ consoleConfigPage->lineDebug->setFont(font);
+ }
+}
+
void ConsolePlugin::changeConsoleBackgroundColor()
{
QColor color = QColorDialog::getColor(consoleConfigPage->lineConsole->palette().color(QPalette::Base), this);