Skip to content

REventHandler

Class in GUI Module
Header: #include <src/gui/REventHandler.h>
Inherits: QObject

Event handler class.

For each new document that is created or opened, an event handler is created to handle various events for the life time of the document.

Scriptable: This class is available in script environments.

\generateScriptShell

REventHandler(QWidget *widget=NULL, RDocumentInterface *documentInterface=NULL)
void drawInfoLabel(RGraphicsViewWorker *worker, const RTextLabel &textLabel)
void drawSnapLabel(RGraphicsViewWorker *worker, const RVector &pos, const RVector &posRestriction, const QString &text)
static QList< QUrl > getUrlsFromMimeData(QMimeData *mimeData)
static bool isUrl(const QString &urlString)
void dragEnter(QDragEnterEvent *event)
void horizontalScrolled(double pos)
void updateSnapInfo(RGraphicsViewWorker *worker, RSnap *snap, RSnapRestriction *restriction)
Called on every repaint of a view to update snap related information.
void updateTextLabel(RGraphicsViewWorker *worker, const RTextLabel &textLabel)
Handles drop into the drawing area.
void verticalScrolled(double pos)
void viewportChanged()
Called whenever the current viewport changed through panning or zooming.
RDocumentInterface * documentInterface
RGraphicsView * graphicsView
RRulerQt * hruler
QScrollBar * hsb
RRulerQt * vruler
QScrollBar * vsb
QWidget * widget

REventHandler::REventHandler(QWidget *widget=NULL, RDocumentInterface *documentInterface=NULL)

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD. Event handler for scroll, drag and drop, snap info.

void REventHandler::drawInfoLabel(RGraphicsViewWorker *worker, const RTextLabel &textLabel)

void REventHandler::drawSnapLabel(RGraphicsViewWorker *worker, const RVector &pos, const RVector &posRestriction, const QString &text)

static QList< QUrl > REventHandler::getUrlsFromMimeData(QMimeData *mimeData)

static

static bool REventHandler::isUrl(const QString &urlString)

static

void REventHandler::dragEnter(QDragEnterEvent *event)

void REventHandler::horizontalScrolled(double pos)

void REventHandler::updateSnapInfo(RGraphicsViewWorker *worker, RSnap *snap, RSnapRestriction *restriction)

Called on every repaint of a view to update snap related information.

Parameters:

  • painter: QPainter for the view in screen coordinates.
  • snap: Current snap.

void REventHandler::updateTextLabel(RGraphicsViewWorker *worker, const RTextLabel &textLabel)

Handles drop into the drawing area.

Parameters:

  • event: QDropEvent

void REventHandler::verticalScrolled(double pos)

void REventHandler::viewportChanged()

Called whenever the current viewport changed through panning or zooming.

Updates the scroll bars, rulers, etc.

RDocumentInterface* REventHandler::documentInterface

private

RGraphicsView* REventHandler::graphicsView

private

RRulerQt* REventHandler::hruler

private

QScrollBar* REventHandler::hsb

private

RRulerQt* REventHandler::vruler

private

QScrollBar* REventHandler::vsb

private

QWidget* REventHandler::widget

private