| 100 | } |
| 101 | |
| 102 | void PdfDebugWidget::createWidgets() |
| 103 | { |
| 104 | _viewer = new PdfDebugViewer(); |
| 105 | |
| 106 | QVBoxLayout *layout = new QVBoxLayout(); |
| 107 | layout->setMargin(0); |
| 108 | |
| 109 | QToolBar *toolBar = new QToolBar("ToolBar", this); |
| 110 | toolBar->setIconSize(QSize(30, 30)); |
| 111 | |
| 112 | _ationPrev = new QAction(this); |
| 113 | _ationPrev->setText(tr("<")); |
| 114 | _ationPrev->setShortcut(QKeySequence::MoveToPreviousPage); |
| 115 | connect(_ationPrev, &QAction::triggered, this, &PdfDebugWidget::previous); |
| 116 | toolBar->addAction(_ationPrev); |
| 117 | addAction(_ationPrev); |
| 118 | |
| 119 | _pageLineEdit = new QLineEdit(); |
| 120 | _pageLineEdit->setMaximumWidth(50); |
| 121 | toolBar->addWidget(_pageLineEdit); |
| 122 | |
| 123 | _pageLabel = new QLabel(); |
| 124 | toolBar->addWidget(_pageLabel); |
| 125 | |
| 126 | _ationNext = new QAction(this); |
| 127 | _ationNext->setText(tr(">")); |
| 128 | _ationNext->setShortcut(QKeySequence::MoveToNextPage); |
| 129 | connect(_ationNext, &QAction::triggered, this, &PdfDebugWidget::next); |
| 130 | toolBar->addAction(_ationNext); |
| 131 | addAction(_ationNext); |
| 132 | |
| 133 | layout->addWidget(toolBar); |
| 134 | layout->addWidget(_viewer); |
| 135 | |
| 136 | setLayout(layout); |
| 137 | } |