QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RMainWindowQt Class Reference

Base class for a Qt based MDI main application window. More...

#include <RMainWindowQt.h>

Inheritance diagram for RMainWindowQt:
RMainWindow RProgressHandler RMessageHandler

List of all members.

Public Slots

void currentTabChanged (int index)
 Part of the workaround for QMdiArea bug with events filtering through all stacked windows:
void quit ()
 Closes the application window.
void subWindowActivated (QMdiSubWindow *sw)

Signals

void closeRequested ()
void commandPrompt (const QString &text)
 Emmitted when the command prompt is requested to change.
void dragEnter (QDragEnterEvent *event)
void drop (QDropEvent *event)
void escape ()
void leftMouseTip (const QString &message)
 Emmitted when the left mouse button tip is requested to change.
void progress (int value)
void progressCanceled ()
void progressEnd ()
void progressText (const QString &label)
void resumedTab (RMdiChildQt *mdiChild)
void rightMouseTip (const QString &message)
 Emmitted when the right mouse button tip is requested to change.
void userCommand (const QString &message)
void userInfo (const QString &message)
void userMessage (const QString &message)
void userWarning (const QString &message, bool messageBox)

Public Member Functions

virtual void cancelProgress ()
virtual void escapeEvent ()
virtual RDocumentgetDocument ()
virtual RDocumentInterfacegetDocumentInterface ()
virtual int getHeight ()
QMdiArea * getMdiArea ()
RMdiChildQtgetMdiChild ()
virtual int getPositionX ()
virtual int getPositionY ()
QTabBar * getTabBar ()
virtual int getWidth ()
virtual void handleUserCommand (const QString &message)
virtual void handleUserInfo (const QString &message)
virtual void handleUserMessage (const QString &message)
virtual void handleUserWarning (const QString &message, bool messageBox=false)
virtual void move (int x, int y)
 Moves the application window to the given x / y position.
virtual void postCloseEvent ()
virtual void postSelectionChangedEvent ()
virtual void postTransactionEvent (RTransaction &t, bool onlyChanges=false, RS::EntityType entityTypeFilter=RS::EntityAll)
virtual bool readSettings ()
 Restores the application window settings (size, position, ...).
virtual void resize (int width, int height)
 Resizes the application window to the given width and height.
 RMainWindowQt (QWidget *parent=0, bool hasMdiArea=true)
 Copyright (c) 2011-2013 by Andrew Mustun.
virtual void setCommandPrompt (const QString &text="")
virtual void setGraphicsViewCursor (const QCursor &cursor)
 Sets the cursor of all graphics views in all MDI children.
virtual void setLeftMouseTip (const QString &text="")
virtual void setProgress (int value)
virtual void setProgressEnd ()
virtual void setProgressText (const QString &text="")
virtual void setRightMouseTip (const QString &text="")
virtual void writeSettings ()
 Stores the application window settings (size, position, ...).
- Public Member Functions inherited from RMainWindow
void addBlockListener (RBlockListener *l)
 Adds a listener for block change / add / remove events.
void addCoordinateListener (RCoordinateListener *l)
 Adds a listener for coordinate events.
void addFocusListener (RFocusListener *l)
 Adds a listener for focus changes.
void addInterTransactionListener (RInterTransactionListener *l)
 Adds a listener for transaction in progress events.
void addLayerListener (RLayerListener *l)
 Adds a listener for layer change / add / remove events.
void addPenListener (RPenListener *l)
 Adds a listener for pen change events.
void addPropertyListener (RPropertyListener *l)
 Adds a listener for property events.
void addSelectionListener (RSelectionListener *l)
 Adds a listener for selection events.
void addSnapListener (RSnapListener *l)
 Adds a listener for snap mode changes.
void addTransactionListener (RTransactionListener *l)
 Adds a listener for transaction events.
void addUcsListener (RUcsListener *l)
 Adds a listener for UCS change / add / remove events.
void addViewFocusListener (RViewFocusListener *l)
 Adds a listener for view focus changes.
void addViewListener (RViewListener *l)
 Adds a listener for view change / add / remove events.
void notifyBlockListeners (RDocumentInterface *documentInterface)
 Notifies all block listeners that at least one block object has changed.
void notifyCoordinateListeners (RDocumentInterface *documentInterface)
 Notifies all coordinate listeners that the coordinate has changed to position.
void notifyFocusListeners (RDocumentInterface *documentInterface)
 Notifies all focus listeners.
void notifyInterTransactionListeners (RDocument *document, RTransaction *transaction=NULL)
 Notifies all transaction in progress listeners.
void notifyLayerListeners (RDocumentInterface *documentInterface)
 Notifies all layer listeners that at least one layer object has changed.
void notifyListeners (bool withNull=false)
void notifyPenListeners (RDocumentInterface *documentInterface)
 Notifies all pen listeners that the current pen has changed.
void notifyPropertyListeners (RDocument *document, bool onlyChanges=false, RS::EntityType entityTypeFilter=RS::EntityAll)
 Notifies all property listeners that the current property has changed.
void notifyPropertyListeners (RDocument &document, REntity &entity)
 Notifies all property listeners that the current property is the given entity.
void notifyPropertyListeners ()
 Notifies all property listeners that no properties are currently relevant.
void notifySelectionListeners (RDocumentInterface *documentInterface)
 Notifies all selection listeners that the current selection has changed.
void notifySnapListeners (RDocumentInterface *documentInterface)
 Notifies all snap mode listeners.
void notifyTransactionListeners (RDocument *document, RTransaction *transaction=NULL)
 Notifies all transaction listeners.
void notifyUcsListeners (RDocumentInterface *documentInterface)
 Notifies all UCS listeners that at least one UCS object has changed.
void notifyViewFocusListeners (RGraphicsView *view)
 Notifies all view focus listeners.
void notifyViewListeners (RDocumentInterface *documentInterface)
 Notifies all view listeners that at least one view object has changed.
void propertyChangeEvent (RPropertyEvent &event)
void removeBlockListener (RBlockListener *l)
void removeCoordinateListener (RCoordinateListener *l)
void removeFocusListener (RFocusListener *l)
void removeInterTransactionListener (RInterTransactionListener *l)
void removeLayerListener (RLayerListener *l)
void removePenListener (RPenListener *l)
void removePropertyListener (RPropertyListener *l)
void removeSelectionListener (RSelectionListener *l)
void removeSnapListener (RSnapListener *l)
void removeTransactionListener (RTransactionListener *l)
void removeUcsListener (RUcsListener *l)
void removeViewFocusListener (RViewFocusListener *l)
void removeViewListener (RViewListener *l)
 RMainWindow ()
void ucsSetEvent (const QString &ucsName)
 Called immediately after the user has activated a new UCS to be used as current UCS.
virtual ~RMainWindow ()
- Public Member Functions inherited from RProgressHandler
 RProgressHandler ()
virtual void setProgressEnabled (bool on)

Static Public Member Functions

static RMainWindowQtgetMainWindow ()
- Static Public Member Functions inherited from RMainWindow
static RDocumentInterfacegetDocumentInterfaceStatic ()
static bool hasMainWindow ()
static void installMessageHandler ()
static void messageHandler (QtMsgType type, const char *msg)

Protected Slots

void notifyListenersSlot (QMdiSubWindow *mdiChild)
void suspendAndResume (QMdiSubWindow *mdiChild)
void updateGuiActions (QMdiSubWindow *mdiChild=NULL)
void updateScenes (QMdiSubWindow *mdiChild)

Protected Member Functions

virtual void closeEvent (QCloseEvent *e)
virtual void dragEnterEvent (QDragEnterEvent *event)
virtual void dropEvent (QDropEvent *event)
virtual bool event (QEvent *e)

Protected Attributes

QMdiArea * mdiArea
- Protected Attributes inherited from RMainWindow
QList< RBlockListener * > blockListeners
QList< RCoordinateListener * > coordinateListeners
QList< RFocusListener * > focusListeners
QList
< RInterTransactionListener * > 
interTransactionListeners
QList< RLayerListener * > layerListeners
QMutex mutex
QList< RPenListener * > penListeners
QList< RPropertyListener * > propertyListeners
QList< RSelectionListener * > selectionListeners
QList< RSnapListener * > snapListeners
QList< RTransactionListener * > transactionListeners
QList< RUcsListener * > ucsListeners
QList< RViewFocusListener * > viewFocusListeners
QList< RViewListener * > viewListeners
- Protected Attributes inherited from RProgressHandler
bool progressEnabled

Additional Inherited Members

- Static Protected Attributes inherited from RMainWindow
static RMainWindowmainWindow = NULL
 Copyright (c) 2011-2013 by Andrew Mustun.

Detailed Description

Base class for a Qt based MDI main application window.

Scriptable:
This class is wrapped for script environments.

Constructor & Destructor Documentation

RMainWindowQt::RMainWindowQt ( QWidget *  parent = 0,
bool  hasMdiArea = true 
)

Copyright (c) 2011-2013 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.


Member Function Documentation

void RMainWindowQt::cancelProgress ( )
virtual
void RMainWindowQt::closeEvent ( QCloseEvent *  e)
protectedvirtual
void RMainWindowQt::closeRequested ( )
signal
void RMainWindowQt::commandPrompt ( const QString &  text)
signal

Emmitted when the command prompt is requested to change.

void RMainWindowQt::currentTabChanged ( int  index)
slot

Part of the workaround for QMdiArea bug with events filtering through all stacked windows:

void RMainWindowQt::dragEnter ( QDragEnterEvent *  event)
signal
void RMainWindowQt::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual
void RMainWindowQt::drop ( QDropEvent *  event)
signal
void RMainWindowQt::dropEvent ( QDropEvent *  event)
protectedvirtual
void RMainWindowQt::escape ( )
signal
void RMainWindowQt::escapeEvent ( void  )
virtual

Implements RMainWindow.

bool RMainWindowQt::event ( QEvent *  e)
protectedvirtual
RDocument * RMainWindowQt::getDocument ( )
virtual
Returns:
Pointer to the document that is currently open and has the focus or NULL if no document is open.

Implements RMainWindow.

RDocumentInterface * RMainWindowQt::getDocumentInterface ( )
virtual
Returns:
Pointer to the document interface of the document that is currently open and has the focus or NULL if no document is open.

Implements RMainWindow.

int RMainWindowQt::getHeight ( )
virtual
Returns:
Height of the main application window.

Implements RMainWindow.

RMainWindowQt * RMainWindowQt::getMainWindow ( )
static

Reimplemented from RMainWindow.

QMdiArea * RMainWindowQt::getMdiArea ( )
RMdiChildQt * RMainWindowQt::getMdiChild ( )
int RMainWindowQt::getPositionX ( )
virtual
Returns:
X position of the main application window (distance from left of screen).

Implements RMainWindow.

int RMainWindowQt::getPositionY ( )
virtual
Returns:
Y position of the main application window (distance from top of screen).

Implements RMainWindow.

QTabBar * RMainWindowQt::getTabBar ( )
int RMainWindowQt::getWidth ( )
virtual
Returns:
Width of the main application window.

Implements RMainWindow.

void RMainWindowQt::handleUserCommand ( const QString &  message)
virtual

Reimplemented from RMainWindow.

void RMainWindowQt::handleUserInfo ( const QString &  message)
virtual

Reimplemented from RMainWindow.

void RMainWindowQt::handleUserMessage ( const QString &  message)
virtual

Reimplemented from RMainWindow.

void RMainWindowQt::handleUserWarning ( const QString &  message,
bool  messageBox = false 
)
virtual

Reimplemented from RMainWindow.

void RMainWindowQt::leftMouseTip ( const QString &  message)
signal

Emmitted when the left mouse button tip is requested to change.

void RMainWindowQt::move ( int  x,
int  y 
)
virtual

Moves the application window to the given x / y position.

Implements RMainWindow.

void RMainWindowQt::notifyListenersSlot ( QMdiSubWindow *  mdiChild)
protectedslot
void RMainWindowQt::postCloseEvent ( )
virtual

Implements RMainWindow.

void RMainWindowQt::postSelectionChangedEvent ( )
virtual

Implements RMainWindow.

void RMainWindowQt::postTransactionEvent ( RTransaction t,
bool  onlyChanges = false,
RS::EntityType  entityTypeFilter = RS::EntityAll 
)
virtual

Implements RMainWindow.

void RMainWindowQt::progress ( int  value)
signal
void RMainWindowQt::progressCanceled ( )
signal
void RMainWindowQt::progressEnd ( )
signal
void RMainWindowQt::progressText ( const QString &  label)
signal
void RMainWindowQt::quit ( )
virtualslot

Closes the application window.

Implements RMainWindow.

bool RMainWindowQt::readSettings ( )
virtual

Restores the application window settings (size, position, ...).

Reimplemented from RMainWindow.

void RMainWindowQt::resize ( int  width,
int  height 
)
virtual

Resizes the application window to the given width and height.

Implements RMainWindow.

void RMainWindowQt::resumedTab ( RMdiChildQt mdiChild)
signal
void RMainWindowQt::rightMouseTip ( const QString &  message)
signal

Emmitted when the right mouse button tip is requested to change.

void RMainWindowQt::setCommandPrompt ( const QString &  text = "")
virtual

Implements RMainWindow.

void RMainWindowQt::setGraphicsViewCursor ( const QCursor &  cursor)
virtual

Sets the cursor of all graphics views in all MDI children.

Necessary as workaround for Qt cursor bug (cursor inconsistent with multiple widgets on top of each other in MDI area).

Implements RMainWindow.

void RMainWindowQt::setLeftMouseTip ( const QString &  text = "")
virtual

Implements RMainWindow.

void RMainWindowQt::setProgress ( int  value)
virtual

Implements RProgressHandler.

void RMainWindowQt::setProgressEnd ( )
virtual

Implements RProgressHandler.

void RMainWindowQt::setProgressText ( const QString &  text = "")
virtual

Implements RProgressHandler.

void RMainWindowQt::setRightMouseTip ( const QString &  text = "")
virtual

Implements RMainWindow.

void RMainWindowQt::subWindowActivated ( QMdiSubWindow *  sw)
slot
void RMainWindowQt::suspendAndResume ( QMdiSubWindow *  mdiChild)
protectedslot
void RMainWindowQt::updateGuiActions ( QMdiSubWindow *  mdiChild = NULL)
protectedslot
void RMainWindowQt::updateScenes ( QMdiSubWindow *  mdiChild)
protectedslot
void RMainWindowQt::userCommand ( const QString &  message)
signal
void RMainWindowQt::userInfo ( const QString &  message)
signal
void RMainWindowQt::userMessage ( const QString &  message)
signal
void RMainWindowQt::userWarning ( const QString &  message,
bool  messageBox 
)
signal
void RMainWindowQt::writeSettings ( )
virtual

Stores the application window settings (size, position, ...).

Reimplemented from RMainWindow.


Member Data Documentation

QMdiArea* RMainWindowQt::mdiArea
protected

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