diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-24 01:49:02 +0000 |
commit | 5de3dd4762ca33a0f92e79ffa4fe2ff67069d531 (patch) | |
tree | bad482b7afa4cdf47422d60a5dd2c61c7e333b09 /src/viewiface.cpp | |
download | ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.tar.gz ktechlab-5de3dd4762ca33a0f92e79ffa4fe2ff67069d531.zip |
Added KDE3 version of ktechlab
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1095338 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/viewiface.cpp')
-rw-r--r-- | src/viewiface.cpp | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/src/viewiface.cpp b/src/viewiface.cpp new file mode 100644 index 0000000..592b0fe --- /dev/null +++ b/src/viewiface.cpp @@ -0,0 +1,142 @@ +/*************************************************************************** + * Copyright (C) 2005 by David Saxton * + * david@bluehaze.org * + * * + * This program 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 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#include "circuitview.h" +#include "document.h" +#include "flowcodeview.h" +#include "mechanicsview.h" +#include "textview.h" +#include "viewiface.h" + + +//BEGIN class ViewIface +ViewIface::ViewIface( View * view ) + : DCOPObject("View") +{ + m_pView = view; +} + +ViewIface::~ ViewIface( ) +{ +} + +DCOPRef ViewIface::document( ) +{ + return DCOPRef( m_pView->document()->dcopObject() ); +} + +bool ViewIface::isFocused( ) +{ + return m_pView->isFocused(); +} + +bool ViewIface::close( ) +{ + return m_pView->closeView(); +} + +void ViewIface::zoomIn( ) +{ + m_pView->viewZoomIn(); +} + +void ViewIface::zoomOut( ) +{ + m_pView->viewZoomOut(); +} + +bool ViewIface::canZoomIn( ) +{ + return m_pView->canZoomIn(); +} + +bool ViewIface::canZoomOut( ) +{ + return m_pView->canZoomOut(); +} + +void ViewIface::actualSize( ) +{ + m_pView->actualSize(); +} +//END class ViewIface + + + +//BEGIN class TextViewIface +TextViewIface::TextViewIface( TextView * view ) + : ViewIface(view) +{ + m_pTextView = view; +} + +void TextViewIface::toggleBreakpoint( ) +{ + m_pTextView->toggleBreakpoint(); +} + +bool TextViewIface::gotoLine( const int line ) +{ + return m_pTextView->gotoLine(line); +} +//END class TextViewIface + + + +//BEGIN class ItemViewIface +ItemViewIface::ItemViewIface( ItemView * view ) + : ViewIface(view) +{ + m_pItemView = view; +} + +double ItemViewIface::zoomLevel( ) +{ + return m_pItemView->zoomLevel(); +} +//END class ItemViewIface + + + +//BEGIN class MechanicsViewIface +MechanicsViewIface::MechanicsViewIface( MechanicsView * view ) + : ItemViewIface(view) +{ + m_pMechanicsView = view; +} +//END class ICNViewIface + + + +//BEGIN class ICNViewIface +ICNViewIface::ICNViewIface( ICNView * view ) + : ItemViewIface(view) +{ + m_pICNView = view; +} +//END class ICNViewIface + + + +//BEGIN class CircuitViewIface +CircuitViewIface::CircuitViewIface( CircuitView * view ) + : ICNViewIface(view) +{ + m_pCircuitView = view; +} +//END class CircuitViewIface + + +//BEGIN class FlowCodeViewIface +FlowCodeViewIface::FlowCodeViewIface( FlowCodeView * view ) + : ICNViewIface(view) +{ +} +//END class FlowCodeViewIface |