| 27 | using namespace SigDigger; |
| 28 | |
| 29 | BookmarkManagerDialog::BookmarkManagerDialog(QWidget *parent) : |
| 30 | QDialog(parent), |
| 31 | ui(new Ui::BookmarkManagerDialog) |
| 32 | { |
| 33 | this->removeDelegate = new ButtonDelegate(this, "&Remove"); |
| 34 | this->editDelegate = new ButtonDelegate(this, "&Edit"); |
| 35 | |
| 36 | ui->setupUi(this); |
| 37 | |
| 38 | this->model = new BookmarkTableModel( |
| 39 | this, |
| 40 | &Suscan::Singleton::get_instance()->getBookmarkMap()); |
| 41 | this->proxy = new QSortFilterProxyModel(this); |
| 42 | this->proxy->setSourceModel(this->model); |
| 43 | |
| 44 | this->ui->bookmarkView->setModel(this->model); |
| 45 | this->ui->bookmarkView->setSortingEnabled(false); |
| 46 | |
| 47 | this->editDialog = new AddBookmarkDialog(this); |
| 48 | this->editDialog->setWindowTitle("Edit bookmark"); |
| 49 | |
| 50 | this->ui->bookmarkView->setItemDelegateForColumn( |
| 51 | 5, |
| 52 | this->editDelegate); |
| 53 | |
| 54 | this->ui->bookmarkView->setItemDelegateForColumn( |
| 55 | 6, |
| 56 | this->removeDelegate); |
| 57 | |
| 58 | QHeaderView *headerView = this->ui->bookmarkView->horizontalHeader(); |
| 59 | headerView->setStretchLastSection(false); |
| 60 | headerView->setSectionResizeMode(4, QHeaderView::Stretch); |
| 61 | |
| 62 | this->connectAll(); |
| 63 | } |
| 64 | |
| 65 | void |
| 66 | BookmarkManagerDialog::connectAll(void) |
nothing calls this directly
no test coverage detected