2 * This file is part of the PulseView project.
4 * Copyright (C) 2017 Soeren Apel <soeren@apelpie.net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #include <boost/version.hpp>
25 #include <QApplication>
27 #include <QDialogButtonBox>
28 #include <QFileDialog>
29 #include <QFormLayout>
31 #include <QHBoxLayout>
33 #include <QMainWindow>
34 #include <QMessageBox>
35 #include <QPushButton>
39 #include <QTextBrowser>
40 #include <QTextDocument>
41 #include <QTextStream>
42 #include <QVBoxLayout>
44 #include "settings.hpp"
46 #include "pv/devicemanager.hpp"
47 #include "pv/globalsettings.hpp"
48 #include "pv/logging.hpp"
50 #include <libsigrokcxx/libsigrokcxx.hpp>
53 #include <libsigrokdecode/libsigrokdecode.h>
56 using std::shared_ptr;
62 * Special version of a QListView that has the width of the first column as minimum size.
64 * @note Inspired by https://github.com/qt-creator/qt-creator/blob/master/src/plugins/coreplugin/dialogs/settingsdialog.cpp
66 class PageListWidget: public QListWidget
72 setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
75 QSize sizeHint() const final
77 int width = sizeHintForColumn(0) + frameWidth() * 2 + 5;
78 if (verticalScrollBar()->isVisible())
79 width += verticalScrollBar()->width();
80 return QSize(width, 100);
84 Settings::Settings(DeviceManager &device_manager, QWidget *parent) :
85 QDialog(parent, nullptr),
86 device_manager_(device_manager)
91 log_view_ = create_log_view();
94 page_list = new PageListWidget();
95 page_list->setViewMode(QListView::ListMode);
96 page_list->setMovement(QListView::Static);
97 page_list->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
99 pages = new QStackedWidget;
101 page_list->setCurrentIndex(page_list->model()->index(0, 0));
103 // Create the rest of the dialog
104 QHBoxLayout *tab_layout = new QHBoxLayout;
105 tab_layout->addWidget(page_list);
106 tab_layout->addWidget(pages, Qt::AlignLeft);
108 QDialogButtonBox *button_box = new QDialogButtonBox(
109 QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
111 QVBoxLayout* root_layout = new QVBoxLayout(this);
112 root_layout->addLayout(tab_layout);
113 root_layout->addWidget(button_box);
115 connect(button_box, SIGNAL(accepted()), this, SLOT(accept()));
116 connect(button_box, SIGNAL(rejected()), this, SLOT(reject()));
117 connect(page_list, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
118 this, SLOT(on_page_changed(QListWidgetItem*, QListWidgetItem*)));
120 // Start to record changes
121 GlobalSettings settings;
122 settings.start_tracking();
125 void Settings::create_pages()
128 pages->addWidget(get_view_settings_form(pages));
130 QListWidgetItem *viewButton = new QListWidgetItem(page_list);
131 viewButton->setIcon(QIcon(":/icons/settings-views.svg"));
132 viewButton->setText(tr("Views"));
133 viewButton->setTextAlignment(Qt::AlignVCenter);
134 viewButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
138 pages->addWidget(get_decoder_settings_form(pages));
140 QListWidgetItem *decoderButton = new QListWidgetItem(page_list);
141 decoderButton->setIcon(QIcon(":/icons/add-decoder.svg"));
142 decoderButton->setText(tr("Decoders"));
143 decoderButton->setTextAlignment(Qt::AlignVCenter);
144 decoderButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
148 pages->addWidget(get_about_page(pages));
150 QListWidgetItem *aboutButton = new QListWidgetItem(page_list);
151 aboutButton->setIcon(QIcon(":/icons/information.svg"));
152 aboutButton->setText(tr("About"));
153 aboutButton->setTextAlignment(Qt::AlignVCenter);
154 aboutButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
157 pages->addWidget(get_logging_page(pages));
159 QListWidgetItem *loggingButton = new QListWidgetItem(page_list);
160 loggingButton->setIcon(QIcon(":/icons/information.svg"));
161 loggingButton->setText(tr("Logging"));
162 loggingButton->setTextAlignment(Qt::AlignVCenter);
163 loggingButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
166 QCheckBox *Settings::create_checkbox(const QString& key, const char* slot) const
168 GlobalSettings settings;
170 QCheckBox *cb = new QCheckBox();
171 cb->setChecked(settings.value(key).toBool());
172 connect(cb, SIGNAL(stateChanged(int)), this, slot);
176 QPlainTextEdit *Settings::create_log_view() const
178 GlobalSettings settings;
180 QPlainTextEdit *log_view = new QPlainTextEdit();
182 log_view->setReadOnly(true);
183 log_view->setWordWrapMode(QTextOption::NoWrap);
184 log_view->setCenterOnScroll(true);
186 log_view->appendHtml(logging.get_log());
187 connect(&logging, SIGNAL(logged_text(QString)),
188 log_view, SLOT(appendHtml(QString)));
193 QWidget *Settings::get_view_settings_form(QWidget *parent) const
195 GlobalSettings settings;
198 QWidget *form = new QWidget(parent);
199 QVBoxLayout *form_layout = new QVBoxLayout(form);
201 // Trace view settings
202 QGroupBox *trace_view_group = new QGroupBox(tr("Trace View"));
203 form_layout->addWidget(trace_view_group);
205 QFormLayout *trace_view_layout = new QFormLayout();
206 trace_view_group->setLayout(trace_view_layout);
208 cb = create_checkbox(GlobalSettings::Key_View_ColoredBG,
209 SLOT(on_view_coloredBG_changed(int)));
210 trace_view_layout->addRow(tr("Use colored trace &background"), cb);
212 cb = create_checkbox(GlobalSettings::Key_View_ZoomToFitDuringAcq,
213 SLOT(on_view_zoomToFitDuringAcq_changed(int)));
214 trace_view_layout->addRow(tr("Constantly perform &zoom-to-fit during acquisition"), cb);
216 cb = create_checkbox(GlobalSettings::Key_View_ZoomToFitAfterAcq,
217 SLOT(on_view_zoomToFitAfterAcq_changed(int)));
218 trace_view_layout->addRow(tr("Perform a zoom-to-&fit when acquisition stops"), cb);
220 cb = create_checkbox(GlobalSettings::Key_View_TriggerIsZeroTime,
221 SLOT(on_view_triggerIsZero_changed(int)));
222 trace_view_layout->addRow(tr("Show time zero at the trigger"), cb);
224 cb = create_checkbox(GlobalSettings::Key_View_StickyScrolling,
225 SLOT(on_view_stickyScrolling_changed(int)));
226 trace_view_layout->addRow(tr("Always keep &newest samples at the right edge during capture"), cb);
228 cb = create_checkbox(GlobalSettings::Key_View_ShowSamplingPoints,
229 SLOT(on_view_showSamplingPoints_changed(int)));
230 trace_view_layout->addRow(tr("Show data &sampling points"), cb);
232 cb = create_checkbox(GlobalSettings::Key_View_ShowAnalogMinorGrid,
233 SLOT(on_view_showAnalogMinorGrid_changed(int)));
234 trace_view_layout->addRow(tr("Show analog minor grid in addition to div grid"), cb);
236 QComboBox *thr_disp_mode_cb = new QComboBox();
237 thr_disp_mode_cb->addItem(tr("None"), GlobalSettings::ConvThrDispMode_None);
238 thr_disp_mode_cb->addItem(tr("Background"), GlobalSettings::ConvThrDispMode_Background);
239 thr_disp_mode_cb->addItem(tr("Dots"), GlobalSettings::ConvThrDispMode_Dots);
240 thr_disp_mode_cb->setCurrentIndex(
241 settings.value(GlobalSettings::Key_View_ConversionThresholdDispMode).toInt());
242 connect(thr_disp_mode_cb, SIGNAL(currentIndexChanged(int)),
243 this, SLOT(on_view_conversionThresholdDispMode_changed(int)));
244 trace_view_layout->addRow(tr("Conversion threshold display mode (analog traces only)"), thr_disp_mode_cb);
246 QSpinBox *default_div_height_sb = new QSpinBox();
247 default_div_height_sb->setRange(20, 1000);
248 default_div_height_sb->setSuffix(tr(" pixels"));
249 default_div_height_sb->setValue(
250 settings.value(GlobalSettings::Key_View_DefaultDivHeight).toInt());
251 connect(default_div_height_sb, SIGNAL(valueChanged(int)), this,
252 SLOT(on_view_defaultDivHeight_changed(int)));
253 trace_view_layout->addRow(tr("Default analog trace div height"), default_div_height_sb);
255 QSpinBox *default_logic_height_sb = new QSpinBox();
256 default_logic_height_sb->setRange(5, 1000);
257 default_logic_height_sb->setSuffix(tr(" pixels"));
258 default_logic_height_sb->setValue(
259 settings.value(GlobalSettings::Key_View_DefaultLogicHeight).toInt());
260 connect(default_logic_height_sb, SIGNAL(valueChanged(int)), this,
261 SLOT(on_view_defaultLogicHeight_changed(int)));
262 trace_view_layout->addRow(tr("Default logic trace height"), default_logic_height_sb);
267 QWidget *Settings::get_decoder_settings_form(QWidget *parent) const
272 QWidget *form = new QWidget(parent);
273 QVBoxLayout *form_layout = new QVBoxLayout(form);
276 QGroupBox *decoder_group = new QGroupBox(tr("Decoders"));
277 form_layout->addWidget(decoder_group);
279 QFormLayout *decoder_layout = new QFormLayout();
280 decoder_group->setLayout(decoder_layout);
282 cb = create_checkbox(GlobalSettings::Key_Dec_InitialStateConfigurable,
283 SLOT(on_dec_initialStateConfigurable_changed(int)));
284 decoder_layout->addRow(tr("Allow configuration of &initial signal state"), cb);
294 static gint sort_pds(gconstpointer a, gconstpointer b)
296 const struct srd_decoder *sda, *sdb;
298 sda = (const struct srd_decoder *)a;
299 sdb = (const struct srd_decoder *)b;
300 return strcmp(sda->id, sdb->id);
304 QWidget *Settings::get_about_page(QWidget *parent) const
307 struct srd_decoder *dec;
310 QLabel *icon = new QLabel();
311 icon->setPixmap(QPixmap(QString::fromUtf8(":/icons/pulseview.svg")));
313 /* Setup the version field */
314 QLabel *version_info = new QLabel();
315 version_info->setText(tr("%1 %2<br />%3<br /><a href=\"http://%4\">%4</a>")
316 .arg(QApplication::applicationName(),
317 QApplication::applicationVersion(),
318 tr("GNU GPL, version 3 or later"),
319 QApplication::organizationDomain()));
320 version_info->setOpenExternalLinks(true);
322 shared_ptr<sigrok::Context> context = device_manager_.context();
326 s.append("<style type=\"text/css\"> tr .id { white-space: pre; padding-right: 5px; } </style>");
331 s.append("<tr><td colspan=\"2\"><b>" +
332 tr("Libraries and features:") + "</b></td></tr>");
334 s.append(QString("<tr><td><i>%1</i></td><td>%2</td></tr>")
335 .arg(QString("Qt"), qVersion()));
336 s.append(QString("<tr><td><i>%1</i></td><td>%2</td></tr>")
337 .arg(QString("glibmm"), PV_GLIBMM_VERSION));
338 s.append(QString("<tr><td><i>%1</i></td><td>%2</td></tr>")
339 .arg(QString("Boost"), BOOST_LIB_VERSION));
341 s.append(QString("<tr><td><i>%1</i></td><td>%2/%3 (rt: %4/%5)</td></tr>")
342 .arg(QString("libsigrok"), SR_PACKAGE_VERSION_STRING,
343 SR_LIB_VERSION_STRING, sr_package_version_string_get(),
344 sr_lib_version_string_get()));
346 GSList *l_orig = sr_buildinfo_libs_get();
347 for (GSList *l = l_orig; l; l = l->next) {
348 GSList *m = (GSList *)l->data;
349 const char *lib = (const char *)m->data;
350 const char *version = (const char *)m->next->data;
351 s.append(QString("<tr><td><i>- %1</i></td><td>%2</td></tr>")
352 .arg(QString(lib), QString(version)));
353 g_slist_free_full(m, g_free);
355 g_slist_free(l_orig);
357 char *host = sr_buildinfo_host_get();
358 s.append(QString("<tr><td><i>- Host</i></td><td>%1</td></tr>")
359 .arg(QString(host)));
362 char *scpi_backends = sr_buildinfo_scpi_backends_get();
363 s.append(QString("<tr><td><i>- SCPI backends</i></td><td>%1</td></tr>")
364 .arg(QString(scpi_backends)));
365 g_free(scpi_backends);
368 s.append(QString("<tr><td><i>%1</i></td><td>%2/%3 (rt: %4/%5)</td></tr>")
369 .arg(QString("libsigrokdecode"), SRD_PACKAGE_VERSION_STRING,
370 SRD_LIB_VERSION_STRING, srd_package_version_string_get(),
371 srd_lib_version_string_get()));
373 l_orig = srd_buildinfo_libs_get();
374 for (GSList *l = l_orig; l; l = l->next) {
375 GSList *m = (GSList *)l->data;
376 const char *lib = (const char *)m->data;
377 const char *version = (const char *)m->next->data;
378 s.append(QString("<tr><td><i>- %1</i></td><td>%2</td></tr>")
379 .arg(QString(lib), QString(version)));
380 g_slist_free_full(m, g_free);
382 g_slist_free(l_orig);
384 host = srd_buildinfo_host_get();
385 s.append(QString("<tr><td><i>- Host</i></td><td>%1</td></tr>")
386 .arg(QString(host)));
390 s.append("<tr><td colspan=\"2\"></td></tr>");
391 s.append("<tr><td colspan=\"2\"><b>" +
392 tr("Firmware search paths:") + "</b></td></tr>");
394 l_orig = sr_resourcepaths_get(SR_RESOURCE_FIRMWARE);
395 for (GSList *l = l_orig; l; l = l->next)
396 s.append(QString("<tr><td colspan=\"2\">%1</td></tr>").arg(
397 QString((char*)l->data)));
398 g_slist_free_full(l_orig, g_free);
401 s.append("<tr><td colspan=\"2\"></td></tr>");
402 s.append("<tr><td colspan=\"2\"><b>" +
403 tr("Protocol decoder search paths:") + "</b></td></tr>");
405 l_orig = srd_searchpaths_get();
406 for (GSList *l = l_orig; l; l = l->next)
407 s.append(QString("<tr><td colspan=\"2\">%1</td></tr>").arg(
408 QString((char*)l->data)));
409 g_slist_free_full(l_orig, g_free);
412 /* Set up the supported field */
413 s.append("<tr><td colspan=\"2\"></td></tr>");
414 s.append("<tr><td colspan=\"2\"><b>" +
415 tr("Supported hardware drivers:") + "</b></td></tr>");
416 for (auto entry : context->drivers()) {
417 s.append(QString("<tr><td class=\"id\"><i>%1</i></td><td>%2</td></tr>")
418 .arg(QString::fromUtf8(entry.first.c_str()),
419 QString::fromUtf8(entry.second->long_name().c_str())));
422 s.append("<tr><td colspan=\"2\"></td></tr>");
423 s.append("<tr><td colspan=\"2\"><b>" +
424 tr("Supported input formats:") + "</b></td></tr>");
425 for (auto entry : context->input_formats()) {
426 s.append(QString("<tr><td class=\"id\"><i>%1</i></td><td>%2</td></tr>")
427 .arg(QString::fromUtf8(entry.first.c_str()),
428 QString::fromUtf8(entry.second->description().c_str())));
431 s.append("<tr><td colspan=\"2\"></td></tr>");
432 s.append("<tr><td colspan=\"2\"><b>" +
433 tr("Supported output formats:") + "</b></td></tr>");
434 for (auto entry : context->output_formats()) {
435 s.append(QString("<tr><td class=\"id\"><i>%1</i></td><td>%2</td></tr>")
436 .arg(QString::fromUtf8(entry.first.c_str()),
437 QString::fromUtf8(entry.second->description().c_str())));
441 s.append("<tr><td colspan=\"2\"></td></tr>");
442 s.append("<tr><td colspan=\"2\"><b>" +
443 tr("Supported protocol decoders:") + "</b></td></tr>");
444 GSList *sl = g_slist_copy((GSList *)srd_decoder_list());
445 sl = g_slist_sort(sl, sort_pds);
446 for (const GSList *l = sl; l; l = l->next) {
447 dec = (struct srd_decoder *)l->data;
448 s.append(QString("<tr><td class=\"id\"><i>%1</i></td><td>%2</td></tr>")
449 .arg(QString::fromUtf8(dec->id),
450 QString::fromUtf8(dec->longname)));
455 s.append("</table>");
457 QTextDocument *supported_doc = new QTextDocument();
458 supported_doc->setHtml(s);
460 QTextBrowser *support_list = new QTextBrowser();
461 support_list->setDocument(supported_doc);
463 QGridLayout *layout = new QGridLayout();
464 layout->addWidget(icon, 0, 0, 1, 1);
465 layout->addWidget(version_info, 0, 1, 1, 1);
466 layout->addWidget(support_list, 1, 1, 1, 1);
468 QWidget *page = new QWidget(parent);
469 page->setLayout(layout);
474 QWidget *Settings::get_logging_page(QWidget *parent) const
476 GlobalSettings settings;
479 QSpinBox *loglevel_sb = new QSpinBox();
480 loglevel_sb->setMaximum(SR_LOG_SPEW);
481 loglevel_sb->setValue(logging.get_log_level());
482 connect(loglevel_sb, SIGNAL(valueChanged(int)), this,
483 SLOT(on_log_logLevel_changed(int)));
485 QHBoxLayout *loglevel_layout = new QHBoxLayout();
486 loglevel_layout->addWidget(new QLabel(tr("Log level:")));
487 loglevel_layout->addWidget(loglevel_sb);
489 // Background buffer size
490 QSpinBox *buffersize_sb = new QSpinBox();
491 buffersize_sb->setSuffix(tr(" lines"));
492 buffersize_sb->setMaximum(Logging::MAX_BUFFER_SIZE);
493 buffersize_sb->setValue(
494 settings.value(GlobalSettings::Key_Log_BufferSize).toInt());
495 connect(buffersize_sb, SIGNAL(valueChanged(int)), this,
496 SLOT(on_log_bufferSize_changed(int)));
498 QHBoxLayout *buffersize_layout = new QHBoxLayout();
499 buffersize_layout->addWidget(new QLabel(tr("Length of background buffer:")));
500 buffersize_layout->addWidget(buffersize_sb);
503 QPushButton *save_log_pb = new QPushButton(
504 QIcon::fromTheme("document-save-as", QIcon(":/icons/document-save-as.png")),
505 tr("&Save to File"));
506 connect(save_log_pb, SIGNAL(clicked(bool)),
507 this, SLOT(on_log_saveToFile_clicked(bool)));
510 QPushButton *pop_out_pb = new QPushButton(
511 QIcon::fromTheme("window-new", QIcon(":/icons/window-new.png")),
513 connect(pop_out_pb, SIGNAL(clicked(bool)),
514 this, SLOT(on_log_popOut_clicked(bool)));
516 QHBoxLayout *control_layout = new QHBoxLayout();
517 control_layout->addLayout(loglevel_layout);
518 control_layout->addLayout(buffersize_layout);
519 control_layout->addWidget(save_log_pb);
520 control_layout->addWidget(pop_out_pb);
522 QVBoxLayout *root_layout = new QVBoxLayout();
523 root_layout->addLayout(control_layout);
524 root_layout->addWidget(log_view_);
526 QWidget *page = new QWidget(parent);
527 page->setLayout(root_layout);
532 void Settings::accept()
534 GlobalSettings settings;
535 settings.stop_tracking();
540 void Settings::reject()
542 GlobalSettings settings;
543 settings.undo_tracked_changes();
548 void Settings::on_page_changed(QListWidgetItem *current, QListWidgetItem *previous)
553 pages->setCurrentIndex(page_list->row(current));
556 void Settings::on_view_zoomToFitDuringAcq_changed(int state)
558 GlobalSettings settings;
559 settings.setValue(GlobalSettings::Key_View_ZoomToFitDuringAcq, state ? true : false);
562 void Settings::on_view_zoomToFitAfterAcq_changed(int state)
564 GlobalSettings settings;
565 settings.setValue(GlobalSettings::Key_View_ZoomToFitAfterAcq, state ? true : false);
568 void Settings::on_view_triggerIsZero_changed(int state)
570 GlobalSettings settings;
571 settings.setValue(GlobalSettings::Key_View_TriggerIsZeroTime, state ? true : false);
574 void Settings::on_view_coloredBG_changed(int state)
576 GlobalSettings settings;
577 settings.setValue(GlobalSettings::Key_View_ColoredBG, state ? true : false);
580 void Settings::on_view_stickyScrolling_changed(int state)
582 GlobalSettings settings;
583 settings.setValue(GlobalSettings::Key_View_StickyScrolling, state ? true : false);
586 void Settings::on_view_showSamplingPoints_changed(int state)
588 GlobalSettings settings;
589 settings.setValue(GlobalSettings::Key_View_ShowSamplingPoints, state ? true : false);
592 void Settings::on_view_showAnalogMinorGrid_changed(int state)
594 GlobalSettings settings;
595 settings.setValue(GlobalSettings::Key_View_ShowAnalogMinorGrid, state ? true : false);
598 void Settings::on_view_conversionThresholdDispMode_changed(int state)
600 GlobalSettings settings;
601 settings.setValue(GlobalSettings::Key_View_ConversionThresholdDispMode, state);
604 void Settings::on_view_defaultDivHeight_changed(int value)
606 GlobalSettings settings;
607 settings.setValue(GlobalSettings::Key_View_DefaultDivHeight, value);
610 void Settings::on_view_defaultLogicHeight_changed(int value)
612 GlobalSettings settings;
613 settings.setValue(GlobalSettings::Key_View_DefaultLogicHeight, value);
616 void Settings::on_dec_initialStateConfigurable_changed(int state)
618 GlobalSettings settings;
619 settings.setValue(GlobalSettings::Key_Dec_InitialStateConfigurable, state ? true : false);
622 void Settings::on_log_logLevel_changed(int value)
624 logging.set_log_level(value);
627 void Settings::on_log_bufferSize_changed(int value)
629 GlobalSettings settings;
630 settings.setValue(GlobalSettings::Key_Log_BufferSize, value);
633 void Settings::on_log_saveToFile_clicked(bool checked)
637 const QString file_name = QFileDialog::getSaveFileName(
638 this, tr("Save Log"), "", tr("Log Files (*.txt *.log);;All Files (*)"));
640 if (file_name.isEmpty())
643 QFile file(file_name);
644 if (file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
645 QTextStream out_stream(&file);
646 out_stream << log_view_->toPlainText();
648 if (out_stream.status() == QTextStream::Ok) {
649 QMessageBox msg(this);
650 msg.setText(tr("Success"));
651 msg.setInformativeText(tr("Log saved to %1.").arg(file_name));
652 msg.setStandardButtons(QMessageBox::Ok);
653 msg.setIcon(QMessageBox::Information);
660 QMessageBox msg(this);
661 msg.setText(tr("Error"));
662 msg.setInformativeText(tr("File %1 could not be written to.").arg(file_name));
663 msg.setStandardButtons(QMessageBox::Ok);
664 msg.setIcon(QMessageBox::Warning);
668 void Settings::on_log_popOut_clicked(bool checked)
672 // Create the window as a sub-window so it closes when the main window closes
673 QMainWindow *window = new QMainWindow(nullptr, Qt::SubWindow);
675 window->setObjectName(QString::fromUtf8("Log Window"));
676 window->setWindowTitle(tr("%1 Log").arg(PV_TITLE));
678 // Use same width/height as the settings dialog
679 window->resize(width(), height());
681 window->setCentralWidget(create_log_view());
685 } // namespace dialogs