| 4263 | } |
| 4264 | |
| 4265 | void EventBrowser::CreateFilterDialog() |
| 4266 | { |
| 4267 | // we create this dialog manually since it's relatively simple, and it needs fairly tight |
| 4268 | // integration with the main window |
| 4269 | m_FilterSettings.Dialog = new QDialog(this); |
| 4270 | |
| 4271 | QDialogButtonBox *buttons = new QDialogButtonBox(this); |
| 4272 | RDLabel *explainTitle = new RDLabel(this); |
| 4273 | RDLabel *listLabel = new RDLabel(this); |
| 4274 | RDLabel *filterLabel = new RDLabel(this); |
| 4275 | CollapseGroupBox *settingsGroup = new CollapseGroupBox(this); |
| 4276 | QToolButton *saveFilter = new QToolButton(this); |
| 4277 | |
| 4278 | QMenu *importExportMenu = new QMenu(this); |
| 4279 | |
| 4280 | QVBoxLayout *settingsLayout = new QVBoxLayout(); |
| 4281 | m_FilterSettings.ShowParams = new QCheckBox(this); |
| 4282 | m_FilterSettings.ShowAll = new QCheckBox(this); |
| 4283 | m_FilterSettings.UseCustom = new QCheckBox(this); |
| 4284 | |
| 4285 | m_FilterSettings.Notes = new RDLabel(this); |
| 4286 | m_FilterSettings.FuncDocs = new RDTextEdit(this); |
| 4287 | m_FilterSettings.Filter = new RDTextEdit(this); |
| 4288 | m_FilterSettings.FuncList = new QListWidget(this); |
| 4289 | m_FilterSettings.Explanation = new RDTreeWidget(this); |
| 4290 | |
| 4291 | m_FilterSettings.Dialog->setWindowTitle(tr("Event Filter Configuration")); |
| 4292 | m_FilterSettings.Dialog->setWindowFlags(m_FilterSettings.Dialog->windowFlags() & |
| 4293 | ~Qt::WindowContextHelpButtonHint); |
| 4294 | m_FilterSettings.Dialog->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); |
| 4295 | m_FilterSettings.Dialog->setMinimumSize(QSize(600, 600)); |
| 4296 | |
| 4297 | settingsGroup->setTitle(tr("General settings")); |
| 4298 | { |
| 4299 | m_FilterSettings.ShowParams->setText(tr("Show parameter names and values")); |
| 4300 | m_FilterSettings.ShowParams->setToolTip( |
| 4301 | tr("Show parameter names in event names well as the values.")); |
| 4302 | m_FilterSettings.ShowParams->setCheckable(true); |
| 4303 | |
| 4304 | QObject::connect(m_FilterSettings.ShowParams, &QCheckBox::toggled, |
| 4305 | [this](bool on) { m_Model->SetShowParameterNames(on); }); |
| 4306 | |
| 4307 | m_FilterSettings.ShowAll->setText(tr("Show all parameters")); |
| 4308 | m_FilterSettings.ShowAll->setToolTip( |
| 4309 | tr("Show all parameters in each event, instead of only the most relevant.")); |
| 4310 | m_FilterSettings.ShowAll->setCheckable(true); |
| 4311 | |
| 4312 | QObject::connect(m_FilterSettings.ShowAll, &QCheckBox::toggled, |
| 4313 | [this](bool on) { m_Model->SetShowAllParameters(on); }); |
| 4314 | |
| 4315 | m_FilterSettings.UseCustom->setText(tr("Show custom action names")); |
| 4316 | m_FilterSettings.UseCustom->setToolTip( |
| 4317 | tr("Show custom action names for e.g. indirect draws where the explicit parameters are not " |
| 4318 | "as directly useful.")); |
| 4319 | m_FilterSettings.UseCustom->setCheckable(true); |
| 4320 | |
| 4321 | QObject::connect(m_FilterSettings.UseCustom, &QCheckBox::toggled, |
| 4322 | [this](bool on) { m_Model->SetUseCustomActionNames(on); }); |
nothing calls this directly
no test coverage detected