[qt] Make DSO filter nonexclusive (replace QRadioButton with QCheckBox)

pull/3/head
Hleb Valoshka 2019-07-08 15:05:22 +03:00
parent 6295f4d1af
commit c07c36e70c
2 changed files with 11 additions and 8 deletions

View File

@ -431,26 +431,29 @@ DeepSkyBrowser::DeepSkyBrowser(CelestiaCore* _appCore, QWidget* parent, InfoPane
QGridLayout* dsoGroupLayout = new QGridLayout();
// Buttons to select filtering criterion for dsos
globularsButton = new QRadioButton(_("Globulars"));
globularsButton = new QCheckBox(_("Globulars"));
connect(globularsButton, SIGNAL(clicked()), this, SLOT(slotRefreshTable()));
dsoGroupLayout->addWidget(globularsButton, 0, 0);
galaxiesButton = new QRadioButton(_("Galaxies"));
galaxiesButton = new QCheckBox(_("Galaxies"));
connect(galaxiesButton, SIGNAL(clicked()), this, SLOT(slotRefreshTable()));
dsoGroupLayout->addWidget(galaxiesButton, 0, 1);
nebulaeButton = new QRadioButton(_("Nebulae"));
nebulaeButton = new QCheckBox(_("Nebulae"));
connect(nebulaeButton, SIGNAL(clicked()), this, SLOT(slotRefreshTable()));
dsoGroupLayout->addWidget(nebulaeButton, 1, 0);
openClustersButton = new QRadioButton(_("Open Clusters"));
openClustersButton = new QCheckBox(_("Open Clusters"));
connect(openClustersButton, SIGNAL(clicked()), this, SLOT(slotRefreshTable()));
dsoGroupLayout->addWidget(openClustersButton, 1, 1);
dsoGroup->setLayout(dsoGroupLayout);
layout->addWidget(dsoGroup);
globularsButton->setChecked(true);
galaxiesButton->setChecked(true);
nebulaeButton->setChecked(true);
openClustersButton->setChecked(true);
// Additional filtering controls
QGroupBox* filterGroup = new QGroupBox(_("Filter"));

View File

@ -57,10 +57,10 @@ Q_OBJECT
QLabel* searchResultLabel{nullptr};
QRadioButton* globularsButton{nullptr};
QRadioButton* galaxiesButton{nullptr};
QRadioButton* nebulaeButton{nullptr};
QRadioButton* openClustersButton{nullptr};
QCheckBox* globularsButton{nullptr};
QCheckBox* galaxiesButton{nullptr};
QCheckBox* nebulaeButton{nullptr};
QCheckBox* openClustersButton{nullptr};
QLineEdit* objectTypeFilterBox{nullptr};