* src/frontends/qt4/GuiWorkArea.[Ch]:

- reimplement doubleClickTimeout() from the qt3 frontend
	   in order to get triple clicking working (bug 3272).
	   This is just an emultation of triple clicking, since qt does not have
	   a mouseTripleClickEvent()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17588 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-03-27 08:05:31 +00:00
parent ff7dd5e06c
commit 7cce9b87f8
2 changed files with 13 additions and 3 deletions

View File

@ -421,10 +421,8 @@ void GuiWorkArea::keyPressEvent(QKeyEvent * e)
}
void GuiWorkArea::mouseDoubleClickEvent(QMouseEvent * e)
void GuiWorkArea::doubleClickTimeout()
{
dc_event_ = double_click(e);
if (!dc_event_.active)
return;
@ -437,6 +435,16 @@ void GuiWorkArea::mouseDoubleClickEvent(QMouseEvent * e)
}
void GuiWorkArea::mouseDoubleClickEvent(QMouseEvent * e)
{
dc_event_ = double_click(e);
// doubleClickInterval() is just too long.
QTimer::singleShot(int(QApplication::doubleClickInterval() / 1.5),
this, SLOT(doubleClickTimeout()));
}
void GuiWorkArea::resizeEvent(QResizeEvent * ev)
{
QAbstractScrollArea::resizeEvent(ev);

View File

@ -155,6 +155,8 @@ public Q_SLOTS:
* emits an 'int' action.
*/
void adjustViewWithScrollBar(int action = 0);
///
void doubleClickTimeout();
private:
/// The slot connected to SyntheticMouseEvent::timeout.