message("* qt/gui")
-set(THIS_LIB_VERSION 2.19.6)
+set(THIS_LIB_VERSION 2.19.7)
#include(cotire)
#include(PrecompiledHeader)
void Dlg_LogViewer::set_font(const QFont &font)
{
TextBox->setFont(font);
+ config_t *p_cfg = using_flags->get_config_ptr();
if(!(font.toString().isEmpty())) {
- memset(config.logwindow_font, 0x00, sizeof(config.logwindow_font));
- snprintf(config.logwindow_font, sizeof(config.logwindow_font) - 1, "%s", font.toString().toLocal8Bit().constData());
+ memset(p_cfg->logwindow_font, 0x00, sizeof(p_cfg->logwindow_font));
+ snprintf(p_cfg->logwindow_font, sizeof(p_cfg->logwindow_font) - 1, "%s", font.toString().toLocal8Bit().constData());
}
}
int height = s.height();
if(width < 320) width = 320;
if(height < 200) height = 200;
- config.logwindow_height = height;
- config.logwindow_width = width;
+ config_t *p_cfg = using_flags->get_config_ptr();
+
+ p_cfg->logwindow_height = height;
+ p_cfg->logwindow_width = width;
}
connect(this, SIGNAL(sig_text_append(QString)), TextBox, SLOT(append(QString)));
MasterLayout = new QGridLayout;
FontDlgButton = new QPushButton(QApplication::translate("LogWindow", "Set Font", 0),this);
- if(strlen(config.logwindow_font) > 0) {
+
+ config_t *p_cfg = using_flags->get_config_ptr();
+
+ if(strlen(p_cfg->logwindow_font) > 0) {
QFont font;
- font.fromString(QString::fromLocal8Bit(config.logwindow_font));
+ font.fromString(QString::fromLocal8Bit(p_cfg->logwindow_font));
TextBox->setFont(font);
}
connect(FontDlgButton, SIGNAL(pressed()), this, SLOT(rise_font_dialog()));
UpdateTimer->start();
this->setLayout(MasterLayout);
- int w = config.logwindow_width;
- int h = config.logwindow_height;
+ int w = p_cfg->logwindow_width;
+ int h = p_cfg->logwindow_height;
if(w < 320) w = 320;
if(h < 200) h = 200;
this->resize(w, h);
#include "qt_debugger_tmpl.h"
#include "qt_lineeditplus.h"
#include "osd_base.h"
-#include "../../config.h"
void CSP_Debugger_Tmpl::set_string_attr(QString color, bool is_strong)
{
text_command->setFont(font);
text->setFont(font);
if(!(font.toString().isEmpty())) {
- memset(config.debugwindow_font, 0x00, sizeof(config.debugwindow_font));
- snprintf(config.debugwindow_font, sizeof(config.debugwindow_font) - 1, "%s", font.toString().toLocal8Bit().constData());
+ memset(p_cfg->debugwindow_font, 0x00, sizeof(p_cfg->debugwindow_font));
+ snprintf(p_cfg->debugwindow_font, sizeof(p_cfg->debugwindow_font) - 1, "%s", font.toString().toLocal8Bit().constData());
}
}
int height = s.height();
if(width < 320) width = 320;
if(height < 200) height = 200;
- config.debugwindow_height = height;
- config.debugwindow_width = width;
+ p_cfg->debugwindow_height = height;
+ p_cfg->debugwindow_width = width;
}
CSP_Debugger_Tmpl::CSP_Debugger_Tmpl(OSD_BASE* p_osd, QWidget *parent) : QWidget(parent, Qt::Window)
{
widget = this;
-
+ p_cfg = p_osd->get_config_flags()->get_config_ptr();
parent_object = parent;
text = new QTextEdit(this);
text->setReadOnly(true);
text_command->setEnabled(true);
text_command->clear();
call_font_dialog = new QPushButton(QApplication::translate("Debugger", "Set Font", 0),this);
- if(strlen(config.debugwindow_font) > 0) {
+
+
+ if(strlen(p_cfg->debugwindow_font) > 0) {
QFont font;
- font.fromString(QString::fromLocal8Bit(config.debugwindow_font));
+ font.fromString(QString::fromLocal8Bit(p_cfg->debugwindow_font));
text->setFont(font);
text_command->setFont(font);
}
VBoxWindow->addWidget(text);
VBoxWindow->addWidget(text_command);
- int w = config.debugwindow_width;
- int h = config.debugwindow_height;
+ int w = p_cfg->debugwindow_width;
+ int h = p_cfg->debugwindow_height;
if(w < 320) w = 320;
if(h < 200) h = 200;
#include <string>
#include "../../fileio.h"
+#include "../../config.h"
QT_BEGIN_NAMESPACE
{
Q_OBJECT
protected:
+ config_t *p_cfg;
QObject *parent_object;
QWidget *widget;
QTextEdit *text;
bool string_is_strong;
QString text_color;
QStringList complete_list;
- public:
+
+public:
CSP_Debugger_Tmpl(OSD_BASE* p_osd, QWidget *parent);
~CSP_Debugger_Tmpl();
//virtual void closeEvent(QCloseEvent *event);