Skip to content

Commit fdaa27a

Browse files
committed
Update dialog header for table selection
1 parent 57e7e01 commit fdaa27a

1 file changed

Lines changed: 6 additions & 12 deletions

File tree

src/publisher_select_dialog.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#pragma once
22
#include <QDialog>
3-
#include <QLabel>
4-
#include <QListWidget>
5-
#include <QAbstractButton>
6-
#include <unordered_set>
7-
#include <map>
8-
#include <QCheckBox>
3+
#include <QStringList>
94

105
#include "ui_publisher_select_dialog.h"
116

@@ -19,27 +14,26 @@ class PublisherSelectDialog : public QDialog
1914
Q_OBJECT
2015
private:
2116
Ui::PublisherSelect *_ui;
22-
std::map<std::string, std::pair<QLabel *, QCheckBox *>> _topic_widgets;
2317

2418
public:
2519
explicit PublisherSelectDialog(QWidget *parent = nullptr)
2620
: QDialog(parent), _ui(new Ui::PublisherSelect)
2721
{
2822
_ui->setupUi(this);
23+
_ui->listTopics->verticalHeader()->setVisible(false);
24+
QStringList labels;
25+
labels.push_back("Topic name");
26+
_ui->listTopics->setHorizontalHeaderLabels(labels);
2927
}
3028

3129
Ui::PublisherSelect *ui() { return _ui; }
3230

33-
void setTopicWidgets(const std::map<std::string, std::pair<QLabel *, QCheckBox *>> &widgets)
34-
{
35-
_topic_widgets = widgets;
36-
}
37-
3831
~PublisherSelectDialog()
3932
{
4033
delete _ui;
4134
}
4235

4336
private slots:
4437
void on_lineEditFilter_textChanged(const QString &search_string);
38+
void on_listTopics_itemSelectionChanged();
4539
};

0 commit comments

Comments
 (0)