DecodeAsDialog::DecodeAsDialog(QWidget *parent, capture_file *cf, bool create_new) : QDialog(parent), ui(new Ui::DecodeAsDialog), cap_file_(cf), table_names_combo_box_(NULL), selector_combo_box_(NULL) { ui->setupUi(this); ui->deleteToolButton->setEnabled(false); GList *cur; for (cur = decode_as_list; cur; cur = cur->next) { decode_as_t *entry = (decode_as_t *) cur->data; QString table_ui_name = get_dissector_table_ui_name(entry->table_name); if (!table_ui_name.isEmpty()) { ui_name_to_name_[table_ui_name] = entry->table_name; } } connect(wsApp, SIGNAL(preferencesChanged()), this, SLOT(fillTable())); fillTable(); if (create_new) on_newToolButton_clicked(); }
void WiresharkApplication::setConfigurationProfile(const gchar *profile_name) { char *gdp_path, *dp_path; char *rf_path; int rf_open_errno; gchar *err_msg = NULL; /* First check if profile exists */ if (!profile_exists(profile_name, FALSE)) { if (profile_exists(profile_name, TRUE)) { char *pf_dir_path, *pf_dir_path2, *pf_filename; /* Copy from global profile */ if (create_persconffile_profile(profile_name, &pf_dir_path) == -1) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't create directory\n\"%s\":\n%s.", pf_dir_path, g_strerror(errno)); g_free(pf_dir_path); } if (copy_persconffile_profile(profile_name, profile_name, TRUE, &pf_filename, &pf_dir_path, &pf_dir_path2) == -1) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.", pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno)); g_free(pf_filename); g_free(pf_dir_path); g_free(pf_dir_path2); } } else { /* No personal and no global profile exists */ return; } } /* Then check if changing to another profile */ if (profile_name && strcmp (profile_name, get_profile_name()) == 0) { return; } /* Get the current geometry, before writing it to disk */ emit profileChanging(); if (profile_exists(get_profile_name(), FALSE)) { /* Write recent file for profile we are leaving, if it still exists */ write_profile_recent(); } /* Set profile name and update the status bar */ set_profile_name (profile_name); emit profileNameChanged(profile_name); /* Apply new preferences */ readConfigurationFiles (&gdp_path, &dp_path, true); if (!recent_read_profile_static(&rf_path, &rf_open_errno)) { simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, "Could not open common recent file\n\"%s\": %s.", rf_path, g_strerror(rf_open_errno)); g_free(rf_path); } if (recent.gui_fileopen_remembered_dir && test_for_directory(recent.gui_fileopen_remembered_dir) == EISDIR) { set_last_open_dir(recent.gui_fileopen_remembered_dir); } timestamp_set_type (recent.gui_time_format); timestamp_set_precision(recent.gui_time_precision); timestamp_set_seconds_type (recent.gui_seconds_format); packet_list_enable_color(recent.packet_list_colorize); tap_update_timer_.setInterval(prefs.tap_update_interval); prefs_to_capture_opts(); prefs_apply_all(); #ifdef HAVE_LIBPCAP update_local_interfaces(); #endif setMonospaceFont(prefs.gui_qt_font_name); emit columnsChanged(); emit preferencesChanged(); emit recentFilesRead(); emit filterExpressionsChanged(); emit checkDisplayFilter(); /* Enable all protocols and disable from the disabled list */ proto_enable_all(); if (gdp_path == NULL && dp_path == NULL) { set_disabled_protos_list(); set_disabled_heur_dissector_list(); } /* Reload color filters */ if (!color_filters_reload(&err_msg, color_filter_add_cb)) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", err_msg); g_free(err_msg); } emit localInterfaceListChanged(); emit packetDissectionChanged(); }
mAsciLexerChucK::mAsciLexerChucK() : QsciLexerJava() { preferencesChanged(); }
void SettingsDialog::writeApplicationSettings(const Settings & settings) { global()->settings() = settings; emit preferencesChanged(); }
void SettingsDialog::writeApplicationSettings() { global()->settings() = preferencesFromWidgetValues(); emit preferencesChanged(); }
void WiresharkApplication::setConfigurationProfile(const gchar *profile_name) { char *gdp_path, *dp_path; char *rf_path; int rf_open_errno; /* First check if profile exists */ if (!profile_exists(profile_name, FALSE)) { if (profile_exists(profile_name, TRUE)) { char *pf_dir_path, *pf_dir_path2, *pf_filename; /* Copy from global profile */ if (create_persconffile_profile(profile_name, &pf_dir_path) == -1) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't create directory\n\"%s\":\n%s.", pf_dir_path, g_strerror(errno)); g_free(pf_dir_path); } if (copy_persconffile_profile(profile_name, profile_name, TRUE, &pf_filename, &pf_dir_path, &pf_dir_path2) == -1) { simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't copy file \"%s\" in directory\n\"%s\" to\n\"%s\":\n%s.", pf_filename, pf_dir_path2, pf_dir_path, g_strerror(errno)); g_free(pf_filename); g_free(pf_dir_path); g_free(pf_dir_path2); } } else { /* No personal and no global profile exists */ return; } } /* Then check if changing to another profile */ if (profile_name && strcmp (profile_name, get_profile_name()) == 0) { return; } /* Get the current geometry, before writing it to disk */ emit profileChanging(); if (profile_exists(get_profile_name(), FALSE)) { /* Write recent file for profile we are leaving, if it still exists */ write_profile_recent(); } /* Set profile name and update the status bar */ set_profile_name (profile_name); emit profileNameChanged(profile_name); /* Reset current preferences and apply the new */ prefs_reset(); // menu_prefs_reset(); (void) readConfigurationFiles (&gdp_path, &dp_path); recent_read_profile_static(&rf_path, &rf_open_errno); if (rf_path != NULL && rf_open_errno != 0) { simple_dialog(ESD_TYPE_WARN, ESD_BTN_OK, "Could not open common recent file\n\"%s\": %s.", rf_path, g_strerror(rf_open_errno)); } if (recent.gui_fileopen_remembered_dir && test_for_directory(recent.gui_fileopen_remembered_dir) == EISDIR) { set_last_open_dir(recent.gui_fileopen_remembered_dir); } timestamp_set_type (recent.gui_time_format); timestamp_set_seconds_type (recent.gui_seconds_format); color_filters_enable(recent.packet_list_colorize); tap_update_timer_.setInterval(prefs.tap_update_interval); prefs_to_capture_opts(); prefs_apply_all(); emit preferencesChanged(); emit columnsChanged(); emit recentFilesRead(); emit filterExpressionsChanged(); // macros_post_update(); /* Enable all protocols and disable from the disabled list */ proto_enable_all(); if (gdp_path == NULL && dp_path == NULL) { set_disabled_protos_list(); set_disabled_heur_dissector_list(); } /* Reload color filters */ color_filters_reload(); // user_font_apply(); /* Update menus with new recent values */ // menu_recent_read_finished(); }
DiveCalculatedTissue::DiveCalculatedTissue() { preferencesChanged(); }
AbstractProfilePolygonItem::AbstractProfilePolygonItem(): QObject(), QGraphicsPolygonItem(), hAxis(NULL), vAxis(NULL), dataModel(NULL), hDataColumn(-1), vDataColumn(-1) { connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(preferencesChanged())); }
void mAPreferencesWindow::ok() { loadGUIToSettings(); preferencesChanged(); close(); }
void Preferences::emitPreferencesChanged() { emit preferencesChanged(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), logfileIndicator (new QLabel ( this)), ui(new Ui::MainWindow) { ui->setupUi(this); this->setWindowTitle( tr("QT Logger") ); version = "1.1.2"; this->setMouseTracking(true); this->setBackgroundRole(QPalette::Base); QCoreApplication::setOrganizationName("openhpsdr"); QCoreApplication::setOrganizationDomain("openhpsdr.org"); QCoreApplication::setApplicationName("QtLogger"); //logfileIndicator->setStyleSheet (QString ("QLabel {color:red}")); logfileIndicator->setPixmap(QPixmap(":/icons/filefoldergrey16.svg")); logfileIndicator->setToolTip(QString("Logfile: No file") ); About *about = new About(); about->setVersion( version ); Help *help = new Help(); data = new Data(); data->setMinimumHeader(); add = new addDialog( this ); readDefinitions(":/xml/adif_codes_2.2.7.xml"); add->loadmodeComboBox( modes ); add->loadcountryComboBox( country ); add->loadsubdivisionsComboBox( subdivisions ); add->loadbandsData( bands ); last = new lastContact( this ); pref = new Preferences( this ); pref->setPreferences( QString("radio"), settings.value("preference_radio").toString() ); pref->setPreferences( QString("location"), settings.value("preference_location").toString() ); pref->setPreferences( QString("event"), settings.value("preference_event").toString() ); pref->setPreferences( QString("owner"), settings.value("preference_owner").toString() ); pref->setPreferences( QString("qsl"), settings.value("preference_qsl").toString() ); pref->setPreferences( QString("callfilter"), settings.value("callsign_filter").toString() ); add->callsign_filter = pref->getPreferences("callfilter"); udpSocket = new QUdpSocket(this); udpSocket->bind( 11500, QUdpSocket::ShareAddress ); statusBar ()->addPermanentWidget (logfileIndicator); ui->tableView->verticalScrollBar()->setValue(ui->tableView->verticalScrollBar()->maximum()); deleteFlag = false; connect(udpSocket, SIGNAL(readyRead()), this, SLOT(processPendingDatagrams())); connect(ui->actionQuit,SIGNAL(triggered()),this,SLOT(closeDown())); connect(ui->actionAbout,SIGNAL(triggered()),about,SLOT(aboutMessage())); connect(ui->actionHelp,SIGNAL(triggered()),help,SLOT(show())); connect(ui->actionPreferences,SIGNAL(triggered()),pref,SLOT(show())); connect(pref,SIGNAL(preferencesChanged()),this,SLOT(updateView())); connect(ui->actionOpen,SIGNAL(triggered()),data,SLOT(readData())); connect(ui->actionLast_Contact,SIGNAL(triggered()),last,SLOT(show())); connect(ui->actionOpen,SIGNAL(triggered()),this,SLOT(updateStatus())); connect(ui->actionSave,SIGNAL(triggered()),this,SLOT(writeData())); connect(ui->actionSupport_Directory,SIGNAL(triggered()),this,SLOT(setSupportDirectory())); connect(ui->actionLog_Directory,SIGNAL(triggered()),this,SLOT(setLogDirectory())); connect(ui->tableView,SIGNAL(clicked(QModelIndex)),this,SLOT(removeTableRow(QModelIndex))); connect(ui->tableView,SIGNAL(activated(QModelIndex)),ui->tableView,SLOT(resizeRowsToContents())); connect(ui->actionAdd,SIGNAL(triggered()),add,SLOT(show())); connect(add,SIGNAL(newdata()),this,SLOT(update())); connect(data,SIGNAL(refresh()),this,SLOT(update())); connect(ui->actionDelete,SIGNAL(toggled(bool)),this,SLOT(setDeleteFlag(bool))); connect(add,SIGNAL(ownerChanged()),this,SLOT(updateOwner())); connect(add,SIGNAL(prefixChanged(QString)),last->proxyModel,SLOT(setFilterRegExp(QString))); connect(add,SIGNAL(prefixChanged(QString)),last,SLOT(setCallLabel(QString))); connect(add,SIGNAL(prefixChanged(QString)),add->proxyModel,SLOT(setFilterRegExp(QString))); }