| 54 | } |
| 55 | |
| 56 | void FindToolBarPrivate::initUI() |
| 57 | { |
| 58 | QHBoxLayout *mainLayout = new QHBoxLayout(q); |
| 59 | mainLayout->setContentsMargins(10, 6, 10, 6); |
| 60 | |
| 61 | findEdit = new DLineEdit(q); |
| 62 | findEdit->setPlaceholderText(FindToolBar::tr("Find")); |
| 63 | findEdit->setMinimumWidth(100); |
| 64 | |
| 65 | replaceEdit = new DLineEdit(q); |
| 66 | replaceEdit->setPlaceholderText(FindToolBar::tr("Replace")); |
| 67 | replaceEdit->setMinimumWidth(100); |
| 68 | |
| 69 | findPrevButton = new DIconButton(q); |
| 70 | findPrevButton->setIcon(QIcon::fromTheme("go-up")); |
| 71 | |
| 72 | findNextButton = new DIconButton(q); |
| 73 | findNextButton->setIcon(QIcon::fromTheme("go-down")); |
| 74 | |
| 75 | replaceButton = new DPushButton(FindToolBar::tr("Replace"), q); |
| 76 | replaceAllButton = new DPushButton(FindToolBar::tr("Replace All"), q); |
| 77 | replaceFindButton = new DPushButton(FindToolBar::tr("Replace && Find"), q); |
| 78 | |
| 79 | closeButton = new DIconButton(DStyle::SP_CloseButton, q); |
| 80 | closeButton->setIconSize(QSize(30, 30)); |
| 81 | closeButton->setFixedSize(30, 30); |
| 82 | closeButton->setEnabledCircle(true); |
| 83 | closeButton->setFlat(true); |
| 84 | |
| 85 | mainLayout->addWidget(findEdit); |
| 86 | mainLayout->addWidget(replaceEdit); |
| 87 | mainLayout->addWidget(findPrevButton); |
| 88 | mainLayout->addWidget(findNextButton); |
| 89 | mainLayout->addWidget(replaceButton); |
| 90 | mainLayout->addWidget(replaceAllButton); |
| 91 | mainLayout->addWidget(replaceFindButton); |
| 92 | mainLayout->addWidget(closeButton); |
| 93 | |
| 94 | q->setFocusProxy(findEdit); |
| 95 | } |
| 96 | |
| 97 | void FindToolBarPrivate::initConnection() |
| 98 | { |
no test coverage detected