void LogCtxMenu::refreshUI () { if (m_widget->isVisible()) { setConfigValuesToUI(m_log_widget.m_config); } }
Connection::Connection (QString const & app_name, QObject * parent) : QThread(parent) , ActionAble(QStringList(qobject_cast<MainWindow *>(parent)->dockManager().path()) << app_name) , m_app_name(app_name) , m_main_window(qobject_cast<MainWindow *>(parent)) , m_src_stream(e_Stream_TCP) , m_src_protocol(e_Proto_TLV) , m_config() , m_app_data() , m_storage_idx(-2) , m_recv_bytes(0) , m_marked_for_close(false) , m_curr_preset() , m_control_bar(0) , m_file_tlv_stream(0) , m_file_csv_stream(0) , m_file_size(0) , m_buffer(e_ringbuff_size) , m_current_cmd() , m_decoded_cmds(e_ringcmd_size) , m_storage(0) , m_tcp_dump_stream(0) , m_tcpstream(0) { qDebug("Connection::Connection() this=0x%08x", this); m_control_bar = new ControlBarCommon(); m_config.m_auto_scroll = getGlobalConfig().m_auto_scroll; m_config.m_level = getGlobalConfig().m_level; m_config.m_buffered = getGlobalConfig().m_buffered; m_config.m_time_units_str = getGlobalConfig().m_time_units_str; m_config.m_time_units = getGlobalConfig().m_time_units; m_config.m_font = getGlobalConfig().m_font; m_config.m_fontsize = getGlobalConfig().m_fontsize; static int counter = 0; m_storage_idx = counter; ++counter; setConfigValuesToUI(m_config); connect(m_control_bar->ui->levelSpinBox, SIGNAL(valueChanged(int)), this, SLOT(onGuiLevelValueChanged(int))); connect(m_control_bar->ui->buffCheckBox, SIGNAL(stateChanged(int)), this, SLOT(onBufferingStateChanged(int))); connect(m_control_bar->ui->presetComboBox, SIGNAL(activated(int)), this, SLOT(onPresetChanged(int))); connect(m_control_bar->ui->activatePresetButton, SIGNAL(clicked()), this, SLOT(onPresetApply())); connect(m_control_bar->ui->presetSaveButton, SIGNAL(clicked()), this, SLOT(onPresetSave())); connect(m_control_bar->ui->presetAddButton, SIGNAL(clicked()), this, SLOT(onPresetAdd())); connect(m_control_bar->ui->presetRmButton, SIGNAL(clicked()), this, SLOT(onPresetRm())); connect(m_control_bar->ui->presetResetButton, SIGNAL(clicked()), this, SLOT(onPresetReset())); connect(m_control_bar->ui->logSlider, SIGNAL(valueChanged(int)), this, SLOT(onLogsStateChanged(int))); connect(m_control_bar->ui->plotSlider, SIGNAL(valueChanged(int)), this, SLOT(onPlotsStateChanged(int))); connect(m_control_bar->ui->tableSlider, SIGNAL(valueChanged(int)), this, SLOT(onTablesStateChanged(int))); connect(m_control_bar->ui->ganttSlider, SIGNAL(valueChanged(int)), this, SLOT(onGanttsStateChanged(int))); }
void Connection::loadConfig (QString const & preset_name) { QString const path = mkAppPresetPath(getGlobalConfig().m_appdir, getAppName(), preset_name); QString const fname = path + "/" + getAppName() + ".xml"; bool const loaded = loadConfigTemplate(m_config, fname); if (!loaded) { m_config = ConnectionConfig(); //m_config.m_tag = tag_backup; // defaultConfigFor destroys tag } setConfigValuesToUI(m_config); }
void LogCtxMenu::onShowContextMenu (QPoint const & pos) { bool const visible = m_widget->isVisible(); m_widget->setVisible(!visible); if (m_widget->isVisible()) { //m_log_widget.m_connection->getMainWindow()->restoreDockedWidgetGeometry(); setConfigValuesToUI(m_log_widget.m_config); if (m_widget->isFloating()) m_widget->move(pos); } }
void FrameView::onShowContextMenu (QPoint const & pos) { qDebug("%s this=0x%08x", __FUNCTION__, this); QRect widgetRect = geometry(); m_config_ui.onShowContextMenu(QCursor::pos()); Ui::SettingsFrameView * ui = m_config_ui.ui(); setConfigValuesToUI(m_config); connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(onApplyButton())); connect(ui->clearDataButton, SIGNAL(clicked()), this, SLOT(onClearAllDataButton())); connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(onSaveButton())); connect(ui->resetButton, SIGNAL(clicked()), this, SLOT(onResetViewButton())); //connect(ui->defaultButton, SIGNAL(clicked()), this, SLOT(onDefaultButton())); }
void GanttWidget::onShowContextMenu (QPoint const & pos) { //qDebug("%s this=0x%08x", __FUNCTION__, this); m_config_ui->onShowContextMenu(QCursor::pos()); Ui::SettingsGantt * ui = m_config_ui->ui(); setConfigValuesToUI(m_config); connect(ui->applyButton, SIGNAL(clicked()), this, SLOT(onApplyButton())); connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(onSaveButton())); connect(ui->ganttViewComboBox, SIGNAL(activated(int)), this, SLOT(onGanttViewActivate(int))); connect(ui->fitSelectionButton, SIGNAL(clicked()), this, SLOT(onFitSelectionButton())); connect(ui->fitAllButton, SIGNAL(clicked()), this, SLOT(onFitAllButton())); connect(ui->fitFrameButton, SIGNAL(clicked()), this, SLOT(onFitFrameButton())); connect(ui->prevFrameButton, SIGNAL(clicked()), this, SLOT(onPrevFrameButton())); connect(ui->nextFrameButton, SIGNAL(clicked()), this, SLOT(onNextFrameButton())); connect(ui->nextFrameButton, SIGNAL(valueChanged(int)), this, SLOT(onFrameValueChanged(int))); }
void GanttWidget::onDefaultButton () { GanttConfig defaults; //defaults.partialLoadFrom(m_config); setConfigValuesToUI(defaults); }
void GanttWidget::onResetButton () { setConfigValuesToUI(m_config); }
void FrameView::onDefaultButton () { FrameViewConfig defaults; //defaults.partialLoadFrom(m_config); setConfigValuesToUI(defaults); }