new signal: BaseTextEditor::lineContextMenuRequested(TextEditor::ITextEditor *editor, int line, QMenu *menu);

To be useful and used by the bookmarkmanager, this has to move to ITextEditor.
This commit is contained in:
mae
2008-12-04 19:33:23 +01:00
parent e594815842
commit 4fd9f1e6f7
2 changed files with 7 additions and 0 deletions

View File

@@ -79,6 +79,7 @@
#include <QtGui/QToolBar>
#include <QtGui/QToolTip>
#include <QtGui/QInputDialog>
#include <QtGui/QMenu>
using namespace TextEditor;
using namespace TextEditor::Internal;
@@ -2430,6 +2431,11 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
} else {
d->extraAreaToggleMarkBlockNumber = cursor.blockNumber();
}
} else if (e->button() == Qt::RightButton) {
QMenu * contextMenu = new QMenu(this);
emit lineContextMenuRequested(editableInterface(), cursor.blockNumber(), contextMenu);
if (!contextMenu->isEmpty())
contextMenu->exec(e->globalPos());
}
} else if (d->extraAreaSelectionAnchorBlockNumber >= 0) {
QTextCursor selection = cursor;