QCAD
Open Source 2D CAD
|
Event handler class. More...
#include <REventHandler.h>
Public Slots | |
void | dragEnter (QDragEnterEvent *event) |
void | horizontalScrolled (double pos) |
void | updateSnapInfo (QPainter *painter, RSnap *snap, RSnapRestriction *restriction) |
Called on every repaint of a view to update snap related information. More... | |
void | updateTextLabel (QPainter *painter, const RTextLabel &textLabel) |
Handles drop into the drawing area. More... | |
void | verticalScrolled (double pos) |
void | viewportChanged () |
Called whenever the current viewport changed through panning or zooming. More... | |
Public Member Functions | |
void | drawInfoLabel (QPainter *painter, const RTextLabel &textLabel) |
void | drawSnapLabel (QPainter *painter, const RVector &pos, const RVector &posRestriction, const QString &text) |
REventHandler (QWidget *widget=NULL, RDocumentInterface *documentInterface=NULL) | |
Copyright (c) 2011-2018 by Andrew Mustun. More... | |
Static Public Member Functions | |
static QList< QUrl > | getUrlsFromMimeData (QMimeData *mimeData) |
static bool | isUrl (const QString &urlString) |
Private Attributes | |
RDocumentInterface * | documentInterface |
RGraphicsView * | graphicsView |
RRulerQt * | hruler |
QScrollBar * | hsb |
RRulerQt * | vruler |
QScrollBar * | vsb |
QWidget * | widget |
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.
REventHandler::REventHandler | ( | QWidget * | widget = NULL , |
RDocumentInterface * | di = NULL |
||
) |
Copyright (c) 2011-2018 by Andrew Mustun.
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.
|
slot |
void REventHandler::drawInfoLabel | ( | QPainter * | painter, |
const RTextLabel & | textLabel | ||
) |
void REventHandler::drawSnapLabel | ( | QPainter * | painter, |
const RVector & | pos, | ||
const RVector & | posRestriction, | ||
const QString & | text | ||
) |
|
static |
|
slot |
|
static |
|
slot |
Called on every repaint of a view to update snap related information.
painter | QPainter for the view in screen coordinates. |
snap | Current snap. |
|
slot |
Handles drop into the drawing area.
event | QDropEvent |
|
slot |
|
slot |
Called whenever the current viewport changed through panning or zooming.
Updates the scroll bars, rulers, etc.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |