QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RRulerQt Class Reference

Widget that displays the current mouse position. More...

#include <RRulerQt.h>

Inheritance diagram for RRulerQt:
RRuler RCoordinateListener RPaletteListener

Public Member Functions

virtual QFont getFont () const
 
virtual void paintTick (int pos, bool major, const QString &label)
 
 RRulerQt (QWidget *parent=0)
 Copyright (c) 2011-2018 by Andrew Mustun.
 
virtual void setOrientation (Qt::Orientation orientation)
 
virtual QSize sizeHint () const
 
virtual void updateCoordinate (RDocumentInterface *documentInterface)
 
virtual void updatePalette ()
 This method is called whenever the current palette has changed.
 
virtual void updateViewport ()
 
virtual ~RRulerQt ()
 Destructor.
 
- Public Member Functions inherited from RRuler
Qt::Orientation getOrientation () const
 
 RRuler ()
 
void setGraphicsView (RGraphicsView *view)
 
void setOrientation (Qt::Orientation orientation)
 
virtual ~RRuler ()
 
- Public Member Functions inherited from RCoordinateListener
virtual ~RCoordinateListener ()
 
- Public Member Functions inherited from RPaletteListener
virtual ~RPaletteListener ()
 

Protected Member Functions

void paintEvent (QPaintEvent *)
 

Properties

Qt::Orientation orientation
 

Private Attributes

QImage buffer
 
QPainterPath cursorArrowH
 
QPainterPath cursorArrowV
 
RVector cursorPosition
 
int darkGuiBackground
 
QSize hint
 
QSize lastSize
 
QPainter * painter
 
bool viewportChanged
 

Additional Inherited Members

- Protected Attributes inherited from RRuler
Qt::Orientation orientation
 
RGraphicsViewview
 

Detailed Description

Widget that displays the current mouse position.

Usually shown in the status bar of an application.

Scriptable:\nThis class is available in script environments.\n

Constructor & Destructor Documentation

◆ RRulerQt()

RRulerQt::RRulerQt ( QWidget * parent = 0)

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. Constructor

◆ ~RRulerQt()

RRulerQt::~RRulerQt ( )
virtual

Destructor.

Member Function Documentation

◆ getFont()

QFont RRulerQt::getFont ( ) const
virtual

Implements RRuler.

◆ paintEvent()

void RRulerQt::paintEvent ( QPaintEvent * e)
protected

◆ paintTick()

void RRulerQt::paintTick ( int pos,
bool major,
const QString & label )
virtual

Implements RRuler.

◆ setOrientation()

void RRulerQt::setOrientation ( Qt::Orientation orientation)
virtual

◆ sizeHint()

QSize RRulerQt::sizeHint ( ) const
virtual

◆ updateCoordinate()

void RRulerQt::updateCoordinate ( RDocumentInterface * documentInterface)
virtual

Implements RCoordinateListener.

◆ updatePalette()

virtual void RRulerQt::updatePalette ( )
inlinevirtual

This method is called whenever the current palette has changed.

Implements RPaletteListener.

◆ updateViewport()

void RRulerQt::updateViewport ( )
virtual

Implements RRuler.

Member Data Documentation

◆ buffer

QImage RRulerQt::buffer
private

◆ cursorArrowH

QPainterPath RRulerQt::cursorArrowH
private

◆ cursorArrowV

QPainterPath RRulerQt::cursorArrowV
private

◆ cursorPosition

RVector RRulerQt::cursorPosition
private

◆ darkGuiBackground

int RRulerQt::darkGuiBackground
private

◆ hint

QSize RRulerQt::hint
mutableprivate

◆ lastSize

QSize RRulerQt::lastSize
private

◆ painter

QPainter* RRulerQt::painter
private

◆ viewportChanged

bool RRulerQt::viewportChanged
private

Property Documentation

◆ orientation

Qt::Orientation RRulerQt::orientation
readwrite

The documentation for this class was generated from the following files: