void stopBlinkingCursor();
void startBlinkingCursor();
-protected:
- ///
+ /// Process Key pressed event.
+ /// This needs to be public because it is accessed externally by GuiView.
void processKeySym(LyXKeySymPtr key, key_modifier::state state);
+protected:
/// cause the display of the given area of the work area
virtual void expose(int x, int y, int w, int h) = 0;
///
#include "GuiImplementation.h"
#include "GuiWorkArea.h"
+#include "QLyXKeySym.h"
#include "QLMenubar.h"
#include "QLToolbar.h"
#include "QCommandBuffer.h"
#include <QVBoxLayout>
#include <boost/bind.hpp>
+#include <boost/shared_ptr.hpp>
using std::endl;
using std::string;
}
+bool GuiView::event(QEvent * e)
+{
+ // Useful debug code:
+ /*
+ switch (e->type())
+ {
+ case QEvent::WindowActivate:
+ case QEvent::ActivationChange:
+ case QEvent::WindowDeactivate:
+ case QEvent::Paint:
+ case QEvent::Enter:
+ case QEvent::Leave:
+ case QEvent::HoverEnter:
+ case QEvent::HoverLeave:
+ case QEvent::HoverMove:
+ case QEvent::StatusTip:
+ break;
+ default:
+ */
+
+ if (e->type() == QEvent::ShortcutOverride) {
+ QKeyEvent * ke = static_cast<QKeyEvent*>(e);
+ if (ke->key() == Qt::Key_Tab) {
+ boost::shared_ptr<QLyXKeySym> sym(new QLyXKeySym);
+ sym->set(ke);
+ work_area_->processKeySym(sym, key_modifier::none);
+ e->accept();
+ centralWidget()->setFocus();
+ return true;
+ }
+ }
+ //} for the debug switch above.
+
+ return QMainWindow::event(e);
+}
+
+
void GuiView::show()
{
QMainWindow::setWindowTitle(qt_("LyX"));
*/
virtual void setWindowTitle(lyx::docstring const & t, lyx::docstring const & it);
+ /// in order to catch Tab key press.
+ bool event(QEvent * e);
+
QTimer statusbar_timer_;
/// command buffer