Warning, file /sdk/ktechlab/src/viewiface.cpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /***************************************************************************
0002  *   Copyright (C) 2005 by David Saxton                                    *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #include "viewiface.h"
0012 #include "circuitview.h"
0013 #include "document.h"
0014 #include "flowcodeview.h"
0015 #include "mechanicsview.h"
0016 #include "textview.h"
0017 
0018 // BEGIN class ViewIface
0019 ViewIface::ViewIface(View *view)
0020     : DCOPObject(/* "View" TODO */)
0021 {
0022     m_pView = view;
0023 }
0024 
0025 ViewIface::~ViewIface()
0026 {
0027 }
0028 
0029 DCOPRef ViewIface::document()
0030 {
0031     return DCOPRef(); // TODO m_pView->document()->dcopObject() );
0032 }
0033 
0034 bool ViewIface::hasFocus()
0035 {
0036     return m_pView->hasFocus();
0037 }
0038 
0039 bool ViewIface::close()
0040 {
0041     return m_pView->closeView();
0042 }
0043 
0044 void ViewIface::zoomIn()
0045 {
0046     m_pView->viewZoomIn();
0047 }
0048 
0049 void ViewIface::zoomOut()
0050 {
0051     m_pView->viewZoomOut();
0052 }
0053 
0054 bool ViewIface::canZoomIn()
0055 {
0056     return m_pView->canZoomIn();
0057 }
0058 
0059 bool ViewIface::canZoomOut()
0060 {
0061     return m_pView->canZoomOut();
0062 }
0063 
0064 void ViewIface::actualSize()
0065 {
0066     m_pView->actualSize();
0067 }
0068 // END class ViewIface
0069 
0070 // BEGIN class TextViewIface
0071 TextViewIface::TextViewIface(TextView *view)
0072     : ViewIface(view)
0073 {
0074     m_pTextView = view;
0075 }
0076 
0077 void TextViewIface::toggleBreakpoint()
0078 {
0079     m_pTextView->toggleBreakpoint();
0080 }
0081 
0082 bool TextViewIface::gotoLine(const int line)
0083 {
0084     return m_pTextView->gotoLine(line);
0085 }
0086 // END class TextViewIface
0087 
0088 // BEGIN class ItemViewIface
0089 ItemViewIface::ItemViewIface(ItemView *view)
0090     : ViewIface(view)
0091 {
0092     m_pItemView = view;
0093 }
0094 
0095 double ItemViewIface::zoomLevel()
0096 {
0097     return m_pItemView->zoomLevel();
0098 }
0099 // END class ItemViewIface
0100 
0101 // BEGIN class MechanicsViewIface
0102 MechanicsViewIface::MechanicsViewIface(MechanicsView *view)
0103     : ItemViewIface(view)
0104 {
0105     m_pMechanicsView = view;
0106 }
0107 // END class ICNViewIface
0108 
0109 // BEGIN class ICNViewIface
0110 ICNViewIface::ICNViewIface(ICNView *view)
0111     : ItemViewIface(view)
0112 {
0113     m_pICNView = view;
0114 }
0115 // END class ICNViewIface
0116 
0117 // BEGIN class CircuitViewIface
0118 CircuitViewIface::CircuitViewIface(CircuitView *view)
0119     : ICNViewIface(view)
0120 {
0121     m_pCircuitView = view;
0122 }
0123 // END class CircuitViewIface
0124 
0125 // BEGIN class FlowCodeViewIface
0126 FlowCodeViewIface::FlowCodeViewIface(FlowCodeView *view)
0127     : ICNViewIface(view)
0128 {
0129 }
0130 // END class FlowCodeViewIface