41 , m_mainWindow(parent)
43 QVBoxLayout *
const layout =
new QVBoxLayout(
this);
44 layout->setContentsMargins(2, 2, 2, 2);
45 setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
51 QAction selectAllAction(tr(
"Select all"));
52 selectAllAction.setShortcut(QKeySequence::SelectAll);
53 BT_CONNECT(&selectAllAction, &QAction::triggered,
57 copyAction.setShortcut(QKeySequence(Qt::CTRL | Qt::Key_C));
62 menu.addAction(&selectAllAction);
63 menu.addAction(©Action);
64 if (
btApp->debugMode()) {
66 auto *
const debugAction =
67 new QAction(tr(
"DEBUG: Show raw text"),
this);
68 BT_CONNECT(debugAction, &QAction::triggered,
this,
71 window->setReadOnly(
true);
76 menu.addAction(debugAction);
78 menu.exec(QCursor::pos());
81 [
this](QUrl
const & url) {
82 auto const decodedLink(
85 if (!decodedLink || !decodedLink->module)
88 auto const *
const m = decodedLink->module;
89 std::unique_ptr<CSwordKey> key(m->createKey());
90 key->setKey(decodedLink->key);
92 setInfo(key->renderedText(), m->language()->abbrev());
A QTextBrowser subclass which adds the ability to start drags for references.